Skip to Content
APIEndpointsMove prompt into family

Move prompt into family

Makes a standalone prompt a version of another prompt’s family, for example a hand-written German prompt that is really the German version of an English one. A standalone destination becomes a family. The moved prompt adopts the destination’s topic and sub-topic and keeps its text, markets and execution history. Pending drafts on either prompt are invalidated.

Requires the write:localization scope, and the workspace must be enabled for API writes.

POST /v1/brands/{brand_id}/localization/families

Authorization

HeaderTypeRequired
AuthorizationBearer asky_sk_…required
Idempotency-Keystringrequired

Path parameters

ParameterTypeRequiredDescription
brand_iduuidrequiredFrom List brands

Body

application/json

FieldTypeRequiredDescription
prompt_iduuidrequiredThe prompt to move
destination_prompt_iduuidrequiredAny prompt of the family it belongs with

Request

curl --request POST \ --url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/localization/families' \ --header 'Authorization: Bearer <api-key>' \ --header 'Idempotency-Key: 5b0e77d2-13a9-4f6a-8ce1-9a3f5e21c0aa' \ --header 'Content-Type: application/json' \ --data '{"prompt_id": "b6a0c2d4-1e3f-4a5b-8c7d-9e0f1a2b3c4d", "destination_prompt_id": "7c2f5a91-3b8e-4d06-9a44-1e7b30c9f852"}'

Response

{ "data": { "family_id": "3f1d2c9b-6a4e-4b8f-9c2d-1e5a7b3c9d0e", "prompt_id": "b6a0c2d4-1e3f-4a5b-8c7d-9e0f1a2b3c4d", "destination_prompt_id": "7c2f5a91-3b8e-4d06-9a44-1e7b30c9f852" }, "request_id": "req_2f7b90c14ae8471da3cd" }

Errors

StatusCodeWhen
400invalid_requestThe two ids are the same, or one of them is not a prompt of this brand
409conflictThe prompt is already a version of that family
401invalid_tokenThe key is missing, malformed, or does not exist
403insufficient_scopeThe key does not carry write:localization
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 the per-minute limit for this endpoint
Last updated on