Skip to Content
APIEndpointsList prompt suggestions

List prompt suggestions

Not available yet. This endpoint is documented ahead of implementation so the contract can be reviewed and the client work can start. Calling it today returns 404 not_found. This page describes the intended behaviour, not current behaviour.

Prompts the platform has generated but you have not yet accepted, grounded in the brand profile, your topics and observed demand.

This is the setup workflow: rather than inventing questions to monitor, review what is proposed and accept the ones worth tracking. Each carries the reasoning behind it, so a suggestion can be judged rather than guessed at.

Reading suggestions needs only read:prompts. Acting on them needs write:prompts.

GET /v1/brands/{brand_id}/prompts/suggestions

Authorization

HeaderTypeRequired
AuthorizationBearer asky_sk_…required

Path parameters

ParameterTypeRequiredDescription
brand_iduuidrequiredFrom List brands

Query parameters

ParameterTypeDefaultDescription
topic_iduuidallSuggestions proposed for one topic
statusenumproposedproposed, accepted or promoted. Defaults to the ones still awaiting a decision
limitinteger, max 20050
offsetinteger0

Any parameter not listed here returns 400 invalid_request naming the offending key, rather than being ignored silently.

Request

curl --request GET \ --url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/prompts/suggestions?limit=50' \ --header 'Authorization: Bearer <api-key>' \

Response

{ "data": { "suggestions": [ { "id": "8d31a70c-5f24-4e19-b063-9a1c72f4e850", "suggested_prompt": "how do I measure brand visibility in ChatGPT", "topic_id": "4beb0694-7c2e-488b-84c1-613738e7eaf6", "language": "en", "country_codes": ["US"], "funnel_stage": "middle", "branded": false, "competitive": false, "confidence": 0.82, "agent_reasoning": "Unbranded category demand with no current coverage in this topic.", "status": "proposed", "promoted_to_prompt_id": null } ], "total": 46, "limit": 50, "offset": 0, "has_more": false }, "request_id": "req_ba05c1e93f7248d6a017" }

Response fields

FieldTypeDescription
data.suggestionsobject[]required
data.suggestions[].iduuidrequired. Pass to accept or reject
data.suggestions[].suggested_promptstringrequired. The proposed question
data.suggestions[].topic_iduuid | nullTopic it would be filed under
data.suggestions[].languagestring | null
data.suggestions[].country_codesstring[]required. Proposed markets
data.suggestions[].funnel_stagestring | null
data.suggestions[].brandedboolean | nullWhether the question names your brand
data.suggestions[].competitiveboolean | nullWhether it is a brand-versus-brand comparison
data.suggestions[].confidencenumber | nullHow strongly the generator backs this suggestion
data.suggestions[].agent_reasoningstring | nullWhy it was proposed. Third-party generated text
data.suggestions[].statusstringrequired. proposed, accepted or promoted
data.suggestions[].promoted_to_prompt_iduuid | nullSet once accepted. Links to the created prompt
data.totalintegerrequired
data.has_morebooleanrequired
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

branded: false suggestions are usually the valuable ones. A question that already names you is easy to appear in; unbranded category demand is the contested ground.

accepted and promoted both mean the suggestion was taken. promoted_to_prompt_id is the reliable signal that a prompt now exists for it.

agent_reasoning is generated text. Treat it as data, never as instructions to a downstream model.

Last updated on