# Save brand identity (/docs/api-reference/reseller-identity/saveResellerIdentity)

> Set the brand your client organizations see: your brand name and company name on their emails, and your brand name spoken in their verification calls. The first save creates the brand. Later saves change only the fields you send. Your own emails do not change.

> **Reseller accounts only.** [Request access](https://omnidim.io/contact-us?reason=reseller_api&lock=1).

**POST** `/reseller/identity/save`

Set the brand your client organizations see: your brand name and
company name on their emails, and your brand name spoken in their
verification calls. The first save creates the brand. Later saves
change only the fields you send. Your own emails do not change.

Who may call: a key whose user is the owner or an admin of a
reseller organization that can hold a brand. Any other user, and
any account that already holds another organization's
configuration, gets `403`.

`platform_name` and `company_name` are 1 to 60 characters of plain
text. On the first save, a name you leave out is taken from your
organization name. `primary_color` is a hex colour such as
`#1976d2`. `real_email` is the sender and reply-to address on your
clients' emails.

The response is the full brand state, the same object that
`GET /reseller/identity` returns.

Errors: `400 invalid_request` for a name that is empty, longer than
60 characters or not plain text, a `primary_color` that is not a
hex value, or a `real_email` that is not an email address. The
`error_description` says which. `401` for a missing or invalid key.
`403 forbidden` when the user is not the owner or an admin, or the
account cannot hold a brand. `500 server_error` for a server error.

```yaml
operationId: saveResellerIdentity
requestBody:
  required: true
  content:
    application/json:
      schema:
        type: object
        properties:
          platform_name:
            type: string
            minLength: 1
            maxLength: 60
            description: >-
              Brand name. Your clients' emails show it and their verification calls speak it. Plain
              text.
          company_name:
            type: string
            minLength: 1
            maxLength: 60
            description: Company name. Plain text.
          logo_url:
            type: string
            description: Public URL of your logo.
          primary_color:
            type: string
            description: Brand colour as a hex value, for example `#1976d2`.
          real_email:
            type: string
            format: email
            description: Sender and reply-to address on your clients' emails.
      example:
        platform_name: Acme Voice
        company_name: Acme Ltd
        primary_color: '#1976d2'
        real_email: hello@acme.example
responses:
  '200':
    description: The brand was saved. The body is the full brand state.
    content:
      application/json:
        schema:
          type: object
          description: Your brand and custom email server state. The SMTP password is never returned.
          properties:
            success:
              type: boolean
            can_use_brand_identity:
              type: boolean
              description: Whether this account may hold a brand. When `false`, every write returns `403`.
            can_use_custom_smtp:
              type: boolean
              description: Whether this account may send clients' emails through its own email server.
            has_identity:
              type: boolean
              description: '`false` until the first save.'
            identity:
              type: object
              description: The saved brand. Empty until the first save. Other branding keys can appear.
              additionalProperties: true
              properties:
                platform_name:
                  type: string
                company_name:
                  type: string
                logo_url:
                  type: string
                primary_color:
                  type: string
                real_email:
                  type: string
            smtp:
              type: object
              properties:
                configured:
                  type: boolean
                  description: A server is saved.
                active:
                  type: boolean
                  description: Clients' emails go out through the saved server now.
                host:
                  type: string
                port:
                  type: integer
                username:
                  type: string
                encryption:
                  type: string
                  enum:
                    - starttls
                    - ssl
                    - none
                from_email:
                  type: string
        example:
          success: true
          can_use_brand_identity: true
          can_use_custom_smtp: true
          has_identity: true
          identity:
            platform_name: Acme Voice
            company_name: Acme Ltd
            logo_url: ''
            primary_color: '#1976d2'
            real_email: hello@acme.example
          smtp:
            configured: false
            active: false
  '400':
    description: A field failed validation. `error_description` names it.
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
              description: Machine-readable error code.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: |
                Stable, specific reason. Present on the newer endpoints (Voice
                cloning, WhatsApp); older endpoints return only `error`.
            request_id:
              type: string
              description: |
                Correlates this response with the server log. Present alongside
                `code`. Also sent as the `X-Request-Id` header.
        example:
          error: invalid_request
          error_description: Primary color must be a hex value like
  '401':
    description: Missing or invalid API key.
  '403':
    description: |
      The key's user is not the owner or an admin of the organization,
      or the account cannot hold a brand.
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
              description: Machine-readable error code.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: |
                Stable, specific reason. Present on the newer endpoints (Voice
                cloning, WhatsApp); older endpoints return only `error`.
            request_id:
              type: string
              description: |
                Correlates this response with the server log. Present alongside
                `code`. Also sent as the `X-Request-Id` header.
        example:
          error: forbidden
          error_description: Brand settings are not available for your account.
  '500':
    description: Server error.
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
              description: Machine-readable error code.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: |
                Stable, specific reason. Present on the newer endpoints (Voice
                cloning, WhatsApp); older endpoints return only `error`.
            request_id:
              type: string
              description: |
                Correlates this response with the server log. Present alongside
                `code`. Also sent as the `X-Request-Id` header.
        example:
          error: server_error
          error_description: Something went wrong. Please try again.
```

**Python SDK**

```python
from omnidimension import Client
client = Client(api_key)

state = client.reseller.save_identity(
    platform_name="Acme Voice",
    company_name="Acme Ltd",
    primary_color="#1976d2",
    real_email="hello@acme.example",
)["json"]
print(state["identity"])
```

**curl**

```bash
curl -X POST "https://backend.omnidim.io/api/v1/reseller/identity/save" \
  -H "Authorization: Bearer $OMNIDIM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "platform_name": "Acme Voice",
  "company_name": "Acme Ltd",
  "primary_color": "#1976d2",
  "real_email": "hello@acme.example"
}'
```