Skip to Content
APIEndpointsReject prompt suggestion

Reject 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.

Rejects a suggestion. It stops appearing in the proposed list and the generator learns not to offer the same shape again.

Nothing is created and no quota is consumed. Requires the write:prompts scope.

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

Authorization

HeaderTypeRequired
AuthorizationBearer asky_sk_…required
Idempotency-Keystringrequired

Path parameters

ParameterTypeRequiredDescription
brand_iduuidrequiredFrom List brands
suggestion_iduuidrequiredFrom 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

FieldTypeRequiredDescription
reasonstringoptionalFree text. Stored to inform future generation

Request

curl --request POST \ --url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/prompts/suggestions/8d31a70c-5f24-4e19-b063-9a1c72f4e850/reject' \ --header 'Authorization: Bearer <api-key>' \ --header 'Idempotency-Key: <unique-per-attempt>' \ --header 'Content-Type: application/json' \ --data '{"reason":"Not relevant to our market"}'

Response

{ "data": { "id": "8d31a70c-5f24-4e19-b063-9a1c72f4e850" }, "request_id": "req_7f10ab3e6c92450d81ba" }

Response fields

FieldTypeDescription
data.iduuidrequired. The rejected suggestion
request_idstringrequired. Also returned as the x-request-id header. Quote it when contacting support

Errors

StatusCodeWhen
400invalid_requestA parameter is unknown or malformed. The message names it
401invalid_tokenThe key is missing, malformed, or does not exist
401token_expiredThe key passed its expiry date
401token_revokedThe key was revoked
404not_foundThe brand does not exist, or this key is not allowed to reach it. The two are deliberately indistinguishable
429rate_limitedOver 300 requests per minute. See the Retry-After header

Notes

Rejection is reversible only by regenerating suggestions — there is no un-reject.

A reason is optional but worth sending. It is the only feedback the generator receives about why a proposal missed.

Last updated on