Cowdidocs

Create or replace an organization's brand

PUT
/v1/branding/{organizationId}

Replaces the brand for organizationId in full, creating it on the first call. primary_color is required; every omitted optional field is cleared, not left unchanged. Requires a WorkOS bearer token whose cowdi_org_id matches organizationId, plus the org:branding:write permission (override with BRANDING_WRITE_PERMISSION). Returns 403 when either check fails.

AuthorizationBearer <token>

Create a client with POST /v1/oauth/clients, then exchange its credentials for an access token. AUTHORIZATION_CODE clients act on behalf of a signed-in user and always use PKCE; CLIENT_CREDENTIALS clients act as themselves. A client may only be granted scopes its creator already holds — read the grantable list from GET /v1/oauth/clients/scopes.

In: header

Path Parameters

organizationId*string

Backend organization id / tenant slug.

Lengthlength <= 255

Request Body

application/json

Full replacement for an organization's brand. primary_color is required; every omitted optional field is cleared, not left unchanged.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/v1/branding/dawa" \  -H "Content-Type: application/json" \  -d '{    "primary_color": "#16a34a"  }'
{  "organization_id": "dawa",  "logo_url": "http://example.com",  "icon_url": "http://example.com",  "font_family": "Inter",  "font_weight": 400,  "primary_color": "#16a34a",  "secondary_color": "#16a34a",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
{  "code": "INVALID_PARAMS",  "description": "user_id must be a UUID",  "identifier": "string",  "invalid_params": [    {      "path": "user_id",      "reason": "must be a UUID",      "sub_code": "string"    }  ]}
{  "code": "INVALID_PARAMS",  "description": "user_id must be a UUID",  "identifier": "string",  "invalid_params": [    {      "path": "user_id",      "reason": "must be a UUID",      "sub_code": "string"    }  ]}
{  "code": "INVALID_PARAMS",  "description": "user_id must be a UUID",  "identifier": "string",  "invalid_params": [    {      "path": "user_id",      "reason": "must be a UUID",      "sub_code": "string"    }  ]}
{  "code": "INVALID_PARAMS",  "description": "user_id must be a UUID",  "identifier": "string",  "invalid_params": [    {      "path": "user_id",      "reason": "must be a UUID",      "sub_code": "string"    }  ]}
{  "code": "INVALID_PARAMS",  "description": "user_id must be a UUID",  "identifier": "string",  "invalid_params": [    {      "path": "user_id",      "reason": "must be a UUID",      "sub_code": "string"    }  ]}