Update Branding
Updates the visual branding for a dock’s recipient portal.
PATCH /v1/docks/:id/branding
Path Parameters
| Parameter | Type | Description |
|---|
id | string | The dock ID |
Request Body
| Parameter | Type | Required | Description |
|---|
primaryColor | string | Optional | Primary brand color as hex (e.g., #003366) |
secondaryColor | string | Optional | Secondary brand color as hex |
customCss | string | Optional | Custom CSS injected into the recipient portal |
Example Request
curl -X PATCH https://api.docyard.io/v1/docks/dock_01HQ3K.../branding \
-H "Authorization: Bearer dk_live_a1b2c3d4..." \
-H "Content-Type: application/json" \
-d '{
"primaryColor": "#003366",
"secondaryColor": "#e6f0ff",
"customCss": ".portal-header { border-bottom: 2px solid #003366; }"
}'
Response
Returns the updated dock object with branding fields.
{
"id": "dock_01HQ3K...",
"name": "Acme Insurance",
"logoUrl": "https://storage.docyard.io/logos/dock_01HQ3K.../logo.png",
"primaryColor": "#003366",
"secondaryColor": "#e6f0ff",
"faviconUrl": null,
"customCss": ".portal-header { border-bottom: 2px solid #003366; }"
}
Error Handling
| Status | Condition |
|---|
400 | Invalid hex color format |
401 | Missing or invalid API key |
404 | Dock not found |
Custom CSS is injected into the recipient portal without sanitization in the current version. Ensure CSS content is validated before submission to prevent XSS vectors.