Accept prompt suggestion
Not available yet. Write endpoints are documented ahead of implementation so the contract can be reviewed. No API key can call them today: every key is minted read-only, and a workspace must hold the write entitlement before one can be issued that is not.
Accepts a suggestion, creating a tracked prompt from it. The suggestion’s topic, funnel stage and language carry over, so the new prompt arrives already classified rather than waiting on background analysis.
This is a billable action: the created prompt consumes an active-prompt slot per market, exactly as Create prompt does.
Requires the write:prompts scope.
POST /v1/brands/{brand_id}/prompts/suggestions/{suggestion_id}/acceptAuthorization
| 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 |
suggestion_id | uuid | required | From List prompt suggestions |
Query parameters
None.
Any parameter you pass returns 400 invalid_request naming the offending key, rather than being
ignored silently.
Body
application/json
| Field | Type | Required | Description |
|---|---|---|---|
country_codes | string[] | optional | Override the suggested markets. Defaults to the suggestion’s own |
tag_ids | uuid[] | optional | Tags to apply to the created prompt |
Request
cURL
curl --request POST \
--url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/prompts/suggestions/8d31a70c-5f24-4e19-b063-9a1c72f4e850/accept' \
--header 'Authorization: Bearer <api-key>' \
--header 'Idempotency-Key: <unique-per-attempt>' \
--header 'Content-Type: application/json' \
--data '{"country_codes":["US","GB"]}'Response
200
{
"data": {
"id": "7c2f5a91-3b8e-4d06-9a44-1e7b30c9f852",
"suggestion_id": "8d31a70c-5f24-4e19-b063-9a1c72f4e850"
},
"request_id": "req_4e7b02cf8a13496db2f5"
}Response fields
| Field | Type | Description |
|---|---|---|
data.id | uuid | required. The prompt that was created, not the suggestion |
data.suggestion_id | uuid | required. Now promoted |
request_id | string | required. Also returned as the x-request-id header. Quote it when contacting support |
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | A parameter is unknown or malformed. The message names it |
| 401 | invalid_token | The key is missing, malformed, or does not exist |
| 401 | token_expired | The key passed its expiry date |
| 401 | token_revoked | The key was revoked |
| 404 | not_found | The brand does not exist, or this key is not allowed to reach it. The two are deliberately indistinguishable |
| 429 | rate_limited | Over 300 requests per minute. See the Retry-After header |
Notes
data.id is the new prompt id, which is what you will want to hold on to. The suggestion id is
returned alongside it so the two can be reconciled.
Accepting is not free. Quota is checked first and 403 plan_required is returned if the plan
has no room, leaving the suggestion untouched so it can be accepted later.
Accepting a suggestion whose text duplicates an existing prompt returns 409 conflict rather than
creating a second copy.