Skip to Content
APIEndpointsReject prompt suggestions

Reject prompt suggestions

Rejects one or more suggestions. They stay in the review queue’s history (never deleted) and stop appearing in List prompt suggestions’ default status=proposed view.

Nothing is created and no quota is consumed.

Bulk-shaped only. There is no single-suggestion reject endpoint; send one id for the single-row case.

Requires the write:prompts scope.

POST /v1/brands/{brand_id}/prompts/suggestions/reject

Authorization

HeaderTypeRequired
AuthorizationBearer asky_sk_…required
Idempotency-Keystringrequired

Path parameters

ParameterTypeRequiredDescription
brand_iduuidrequiredFrom List brands

Body

application/json

FieldTypeRequiredDescription
suggestion_idsuuid[], 1-200requiredFrom List prompt suggestions
reasonstring, up to 280 charsoptionalRecorded on every rejected row

Request

curl --request POST \ --url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/prompts/suggestions/reject' \ --header 'Authorization: Bearer <api-key>' \ --header 'Idempotency-Key: 5b0e77d2-13a9-4f6a-8ce1-9a3f5e21c0aa' \ --header 'Content-Type: application/json' \ --data '{"suggestion_ids": ["1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"], "reason": "Too close to an existing prompt"}'

Response

{ "data": { "rejected": ["1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"], "already_rejected": [] }, "request_id": "req_5b0e77d213a94f6a8ce1" }

Response fields

FieldTypeDescription
data.rejecteduuid[]required. Ids actually rejected by this call
data.already_rejecteduuid[]required. Ids that were already rejected before this call — a no-op
request_idstringrequired. Also returned as the x-request-id header. Quote it when contacting support

Errors

StatusCodeWhen
400invalid_requestsuggestion_ids is empty, over 200 entries, contains an id not found for this brand, or contains an id that is promoted/accepted (and not already rejected)
401invalid_tokenThe key is missing, malformed, or does not exist
403insufficient_scopeThe key does not carry write:prompts
403plan_requiredThis workspace is not enabled for API writes
404not_foundThe brand does not exist, or this key is not allowed to reach it
429rate_limitedOver 60 requests per minute

Notes

Validation is all-or-nothing. An id that is missing, belongs to another brand, or was already accepted refuses the entire call and names every offender — unlike the app’s own bulk reject, which reports per-row failures under a 200.

Replaying an already-rejected id is safe. It comes back in already_rejected rather than causing an error, so this endpoint is safe to retry after a timeout.

Rejecting a promoted suggestion always fails. Once a suggestion created a tracked prompt, the decision is final on this endpoint. There is currently no way to delete a prompt through this API; remove it from the app if it needs to go away.

Last updated on