---
title: "Create whitelabel"
method: POST
path: "/api/whitelabels"
tags: ["whitelabels"]
---

# Create whitelabel

`POST /api/whitelabels`

## Request

- Base URL: `https://beta.getsales.io/id/v1`
- URL: `https://beta.getsales.io/id/v1/api/whitelabels`
- Auth: HTTP bearer and API key in header `Team-SID`

Register a brand on a custom domain, born pending_domain: nothing serves until the reseller points the host's CNAME at the platform and activate_whitelabel proves it. Needs the White label entitlement on the workspace's share (403 whitelabel_not_enabled). domain is a bare lowercase FQDN, unique across the platform (409 domain_already_taken; 409 domain_held_by_deleted_whitelabel while a deleted brand still holds it, support releases it); the artwork is given as https URLs (the files are uploaded in the app); the palette is #rrggbb per slot; email_from_name and email_reply_to sign the clients' mail at once, email_from_address only after verify_whitelabel_email_domain proves its domain. The setup chain: create, hand over the CNAME, activate, poll get_whitelabel with include ssl_certificate until active.

Contract:
- MCP tool `create_whitelabel`, registry package `mcp.id/whitelabels`, mount `id.partner`.
- Operation `create`, response envelope `create`.
- Flags: none.

## Request body

- CreateWhitelabelRequest: Request body of `create_whitelabel`.
  - `name` string, required: The brand name, 1..255 chars.
  - `domain` string, required: The app and login host, bare lowercase FQDN (app.reseller.com): no scheme, no path.
  - `logo_url` string, nullable: https URL of the horizontal logo; null clears it. The file itself is uploaded in the app.
  - `icon_url` string, nullable: https URL of the square mark; null clears it.
  - `login_image_url` string, nullable: https URL of the login artwork; null clears it.
  - `palette` object, nullable: Brand colors, #rrggbb each; null = the platform defaults.
    - `primary_color` string, nullable: Buttons and links, #rrggbb; null = the platform default.
    - `accent_color` string, nullable: The accent, #rrggbb; null = the platform default.
    - `login_background_color` string, nullable: The login page background, #rrggbb; null = the platform default.
  - `email_from_name` string, nullable: The From name on the clients' mail; null = the brand name.
  - `email_reply_to` string, email, nullable: The Reply-To on the clients' mail; null = none.
  - `email_from_address` string, email, nullable: The brand's own sender address; refused on a host SendGrid cannot authenticate (422 email_domain_invalid), a platform domain (422 email_domain_reserved) or another team's (409 email_domain_already_taken). Proven by verify_whitelabel_email_domain.

## Response `200`

`create` success envelope.

- CreateWhitelabelResponse
  - `success` true, required
  - `operation` 'create', required
  - `item` object, required
    - `sid` string, required: Brand sid (id_wl_...).
    - `team_sid` string, required: The owning reseller team (ts_tm_...).
    - `name` string, required: The brand name the app shell shows and the mail is signed with.
    - `domain` string, required: The app and login host (app.reseller.com), lowercase FQDN, unique platform-wide; read-only once active.
    - `status` 'pending_domain' | 'active' | 'disabled', required: pending_domain = waiting for the CNAME and the certificate; active = the host serves the brand; disabled = switched off, the host falls back to the platform brand.
    - `logo_url` string, nullable, required: The horizontal logo (app shell and email header).
    - `icon_url` string, nullable, required: The square mark or favicon.
    - `login_image_url` string, nullable, required: The login page artwork.
    - `palette` object, nullable, required: Brand colors; null = all platform defaults.
      - `primary_color` string, nullable: Buttons and links, #rrggbb; null = the platform default.
      - `accent_color` string, nullable: The accent, #rrggbb; null = the platform default.
      - `login_background_color` string, nullable: The login page background, #rrggbb; null = the platform default.
    - `email_from_name` string, nullable, required: The From name on the clients' mail; null = the brand name.
    - `email_reply_to` string, nullable, required: The Reply-To on the clients' mail; null = none.
    - `email_from_address` string, nullable, required: The brand's own sender address; mail leaves from it once email_domain is verified, from the platform address under the brand's name until then.
    - `email_domain` object, nullable, required: The proof of the sending domain; null = verify never ran, or the address moved to another domain.
      - `domain` string, required: The domain part of email_from_address, lowercase: what SendGrid authenticates.
      - `status` 'pending' | 'verified' | 'failed', required: pending = records not all found yet; verified = the brand's mail leaves from its own address; failed = see failure_reason.
      - `records` object[], required: The DNS records to publish, in the order SendGrid issued them.
        - `type` string, required: cname (three of them: the return path and two DKIM keys).
        - `host` string, required: The record name to publish at the domain's DNS host.
        - `value` string, required: The CNAME target at SendGrid.
        - `valid` boolean, required: What the last check found for this record.
      - `failure_reason` 'email_domain_rejected' | 'email_domain_not_proven_in_time', nullable, required: email_domain_rejected (SendGrid refused the domain) or email_domain_not_proven_in_time (48 hours lapsed); null unless failed.
      - `checked_at` string, nullable, required: ISO 8601 UTC of the last check against SendGrid.
      - `verified_at` string, nullable, required: ISO 8601 UTC since when it is verified; null while it is not.
    - `created_by` object, required: Who registered the brand.
      - `actor_type` 'user' | 'support' | 'api_key' | 'system' | 'agent', required
      - `actor_sid` string, nullable, required
      - `team_sid` string, required
      - `actor_name` string, nullable: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
      - `oauth_client_sid` string, nullable: The acting OAuth client (id_oc_*); null off the OAuth path.
      - `reason` string, nullable: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
      - `permissions` object, required: Internal audit context: the grant set the actor held at write time. Not a contract.
      - `cluster_id` integer, nullable: Internal audit context: the cluster that served the write.
      - `trace_id` string, nullable: Internal audit context: the trace id of the request that wrote the row.
    - `created_at` string, required: ISO 8601 UTC.
    - `updated_at` string, required: ISO 8601 UTC.
    - `deleted_at` string, nullable, required: ISO 8601 UTC; null = live.
  - `already_exists` boolean, required
  - `meta` object, required
    - `trace_id` string, required: UUID v7; same 128-bit value as the X-Trace-Id header.
    - `span_id` string, required: 16 hex chars, root span of this request.
    - `timestamp` string, required: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
    - `duration_ms` integer, required: Server-side wall clock.
    - `team_sid` string, nullable: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
    - `actor_type` string, nullable: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.

## Other responses

- `4XX`: MCP error envelope. `error.code` is one of validation_failed, nothing_to_update, not_found, relation_not_found, invalid_transition, limit_exceeded, payment_required, duplicate_rejected, conflict, delete_blocked, unauthorized, forbidden, rate_limited, not_implemented.
- `5XX`: MCP error envelope with `error.code` internal_error or service_unavailable.

---

[API](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-id.md) - [All operations](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-id/llms.txt) - [OpenAPI document](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-id/revisions/95e48541fe85?raw)
