Add Color
Learn how to save brand colors to your workspace
Published ·Updated
POST
/v1/brand-assets/colors/addcurl -X POST "https://api.orshot.com/v1/brand-assets/colors/add" \
-H "Authorization: Bearer <ORSHOT_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"value": "<VALUE>",
"type": "<TYPE>",
"tags": []
}'const res = await fetch("https://api.orshot.com/v1/brand-assets/colors/add", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <ORSHOT_API_KEY>",
},
body: JSON.stringify({
"value": "<VALUE>",
"type": "<TYPE>",
"tags": []
}),
});
const data = await res.json();import requests
response = requests.post(
"https://api.orshot.com/v1/brand-assets/colors/add",
headers={"Authorization": "Bearer <ORSHOT_API_KEY>"},
json={
"value": "<VALUE>",
"type": "<TYPE>",
"tags": []
},
)
data = response.json()$ch = curl_init("https://api.orshot.com/v1/brand-assets/colors/add");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer <ORSHOT_API_KEY>",
"Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
"value" => "<VALUE>",
"type" => "<TYPE>",
"tags" => []
]));
$data = json_decode(curl_exec($ch), true);
curl_close($ch);require "net/http"
require "json"
uri = URI("https://api.orshot.com/v1/brand-assets/colors/add")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer <ORSHOT_API_KEY>"
req["Content-Type"] = "application/json"
req.body = {
"value": "<VALUE>",
"type": "<TYPE>",
"tags": []
}.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)Overview#
This endpoint allows you to save a new brand color to your workspace. Supports hex, RGB, HSL, and gradient color values.
https://api.orshot.com/v1/brand-assets/colors/addRequest#
await fetch("https://api.orshot.com/v1/brand-assets/colors/add", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <ORSHOT_API_KEY>",
},
body: JSON.stringify({
type: "hex",
value: "#FF5733",
tags: ["primary", "brand"], // optional
}),
});await fetch("https://api.orshot.com/v1/brand-assets/colors/add", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <ORSHOT_API_KEY>",
},
body: JSON.stringify({
type: "gradient",
value: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
tags: ["gradient", "hero"], // optional
}),
});{
"data": {
"id": 125,
"created_at": "2025-09-11T10:15:30.123Z",
"type": "hex",
"value": "#FF5733",
"workspace_id": 50,
"user_id": "abcdef01-2345-6789-abcd-ef0123456789"
}
}Request Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
value | String | Yes | The color value (e.g., #FF5733, rgb(255, 87, 51), or a CSS gradient) |
type | String | No | Color type: hex, rgb, hsl, or gradient. Defaults to hex |
tags | String[] | No | Array of tags to associate with the color (e.g., ["primary", "brand"]) |
Supported Color Types#
| Type | Example Value |
|---|---|
hex | #FF5733, #FFF, #FF573380 |
rgb | rgb(255, 87, 51) |
hsl | hsl(11, 100%, 60%) |
gradient | linear-gradient(135deg, #667eea 0%, #764ba2 100%) |
Notes#
- Hex colors are validated for correct format (
#RGB,#RRGGBB, or#RRGGBBAA) - The list endpoint returns the 200 most recently added colors
Query Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
embedId | String | No | Embed instance ID. Pair with embedUserId to scope this call to one embed user |
embedUserId | String | No | The same userId your app passes to the embed URL. Requires embedId |
Per-User Libraries#
Pass embedId and embedUserId together to save the color into that embed user's private palette instead of the shared workspace palette. This is how one embed serves many brands or tenants, each with its own brand space.
Omit them and this endpoint behaves exactly as documented above. See Per-User Brand Assets for the full picture.
Rate Limits#
- 30 requests per minute per endpoint
Was this page helpful?
Ready to automate?
Start rendering images, PDFs and videos from your templates in under 2 minutes. Free plan, no credit card.
Get your API key- Image, PDF and video generation via API
- Visual editor with AI and smart layouts
- Zapier, Make, MCP and 50+ integrations
- White-label embed for your own app
- 100 free credits a month, no credit card required