Update product
Changes a product, service or category: any of its details, its kind, or the category it sits in
(parent_product_id; null moves it to the top level). Send only what you want to change.
Requires the write:brand_profile scope, and the workspace must be enabled for API writes.
PATCH /v1/brands/{brand_id}/products/{product_id}Authorization
| Header | Type | Required |
|---|---|---|
Authorization | Bearer asky_sk_… | required |
Idempotency-Key | string | required |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
brand_id | uuid | required | From List brands |
product_id | uuid | required | From products[].id on Get brand profile |
Query parameters
None.
Any parameter you pass returns 400 invalid_request naming the offending key, rather than being
ignored silently.
Body
application/json. At least one field is required. Every field is the same as on
Create product.
| Field | Type | Required | Description |
|---|---|---|---|
name | string, 1–120 chars | optional | What customers call it |
kind | line | category | product | service | optional | Its level. Refused when what sits inside it could no longer sit there |
parent_product_id | uuid | null | optional | Moves it inside another line or category. null moves it to the top level |
summary | string, up to 600 chars | optional | What it is |
audience | string, up to 300 chars | optional | Who it’s for. An empty string follows its line or the brand profile |
capabilities | string[], up to 20 | optional | Replaces the list |
outcomes | string[], up to 10 | optional | Replaces the list |
differentiators | string[], up to 10 | optional | Replaces the list |
aliases | string[], up to 10 | optional | Replaces the list |
custom_fields | {label, value}[], up to 5 | optional | Replaces custom product context; [] clears it. Unique labels up to 60 characters; each value up to 10,000 characters |
page_url | string | null | optional | null clears it |
markets | string[] | null | optional | null makes it follow its line or the brand profile again |
topic_ids | uuid[], up to 50 | optional | Replaces its topics. An empty array clears them |
Request
cURL
curl --request PATCH \
--url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/products/c41e9a20-7b5d-4e83-a1f6-3d2b8c0e9f17' \
--header 'Authorization: Bearer <api-key>' \
--header 'Idempotency-Key: <unique-per-attempt>' \
--header 'Content-Type: application/json' \
--data '{"audience":"Marketing leads at multi-market B2B brands","markets":null}'Response
200
{
"data": {
"product": {
"id": "c41e9a20-7b5d-4e83-a1f6-3d2b8c0e9f17",
"parent_product_id": "5d0b3a7e-2c41-4f8e-9b6a-1f7c2e8d4a90",
"kind": "product",
"name": "Brand Alignment",
"summary": "",
"audience": "Marketing leads at multi-market B2B brands",
"capabilities": [],
"outcomes": [],
"differentiators": [],
"aliases": [],
"page_url": null,
"markets": null,
"topic_ids": [],
"drafted_from_website": false,
"reviewed": true
}
},
"request_id": "req_7d21b0af59c34e18b6ac"
}Response fields
The updated item, in the same shape as Create product.
| Field | Type | Description |
|---|---|---|
data.product | object | required. The item after the change |
request_id | string | required. Also returned as the x-request-id header |
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | An unknown field, no fields at all, a value over its limit, or a level or parent that does not fit |
| 401 | invalid_token | The key is missing, malformed, or does not exist |
| 403 | insufficient_scope | The key does not carry write:brand_profile |
| 403 | plan_required | This workspace is not enabled for API writes |
| 404 | not_found | The item, the new parent or a topic does not exist, or belongs to another brand |
| 409 | conflict | Something with that name already sits at that level |
| 429 | rate_limited | Over 60 requests per minute. See the Retry-After header |
Notes
An update counts as a review: an item Asky drafted from the website returns reviewed: true
afterwards, the same as when someone edits it on the Products & services tab.
Idempotency-Key is required. See Idempotency.