Edit prompt suggestions
Changes one or more proposed suggestions’ text, market codes, tags, or topic before you decide on
them. Only allowed while a suggestion is still proposed — edit before you
accept or
reject, not after.
Bulk-shaped only, and each entry in updates can change different fields — this is not “apply
one change to many suggestions”, it is “apply N independent edits in one call”.
Requires the write:prompts scope.
PATCH /v1/brands/{brand_id}/prompts/suggestionsAuthorization
| 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 |
Body
application/json
| Field | Type | Required | Description |
|---|---|---|---|
updates | object[], 1-200 | required | One entry per suggestion to edit |
updates[].suggestion_id | uuid | required | From List prompt suggestions |
updates[].suggested_prompt | string, 5-500 chars | optional | New prompt text |
updates[].country_codes | string[], 1-10 | optional | Replaces the market codes |
updates[].tag_ids | uuid[], up to 20 | optional | Replaces the tag list. [] clears it |
updates[].topic_id | uuid | null | optional | Move to this topic, or null to uncategorise |
Request
cURL
curl --request PATCH \
--url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/prompts/suggestions' \
--header 'Authorization: Bearer <api-key>' \
--header 'Idempotency-Key: 5b0e77d2-13a9-4f6a-8ce1-9a3f5e21c0aa' \
--header 'Content-Type: application/json' \
--data '{"updates": [{"suggestion_id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d", "country_codes": ["US", "GB"]}]}'Response
200
{
"data": {
"updated": ["1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"]
},
"request_id": "req_5b0e77d213a94f6a8ce1"
}Response fields
| Field | Type | Description |
|---|---|---|
data.updated | uuid[] | required. Ids actually updated by this call, same order as updates minus duplicates |
request_id | string | required. Also returned as the x-request-id header. Quote it when contacting support |
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | updates is empty, over 200 entries, contains a duplicate suggestion_id, an id not found for this brand, an id that is not proposed, over-length text, a malformed market code, or a tag_ids/topic_id not owned by this brand |
| 401 | invalid_token | The key is missing, malformed, or does not exist |
| 403 | insufficient_scope | The key does not carry write:prompts |
| 403 | plan_required | This workspace is not enabled for API writes |
| 404 | not_found | The brand does not exist, or this key is not allowed to reach it |
| 429 | rate_limited | Over 60 requests per minute |
Notes
Validation is all-or-nothing, across the whole batch. One malformed field anywhere in
updates refuses every edit in the call and names every offender — unlike the app’s own bulk
edit, which applies whatever validates and reports the rest as per-row failures under a 200.
Nothing in the batch is written unless everything validates.
Omit a field to leave it unchanged; there is no way to “unset” text or markets. tag_ids: []
clears tags and topic_id: null uncategorises — those are the only fields with an explicit clear.
Only proposed suggestions are editable. Accepted, rejected or promoted suggestions are
final; edit before you decide, not after.