Skip to Content
APIEndpointsRemove market

Remove market

Closes a market. Refused while any active prompt is still tracked in that country or a generation job is running there; the message names the counts. The market keeps its languages and comes back unchanged if re-opened.

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

DELETE /v1/brands/{brand_id}/localization/markets

Authorization

HeaderTypeRequired
AuthorizationBearer asky_sk_…required
Idempotency-Keystringrequired

Path parameters

ParameterTypeRequiredDescription
brand_iduuidrequiredFrom List brands

Body

application/json

FieldTypeRequiredDescription
country_codestringrequiredThe market to close

Request

curl --request DELETE \ --url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/localization/markets' \ --header 'Authorization: Bearer <api-key>' \ --header 'Idempotency-Key: 5b0e77d2-13a9-4f6a-8ce1-9a3f5e21c0aa' \ --header 'Content-Type: application/json' \ --data '{"country_code": "DK"}'

Response

{ "data": { "removed": true, "country_code": "DK", "country_name": "Denmark" }, "request_id": "req_2f7b90c14ae8471da3cd" }

Errors

StatusCodeWhen
409conflictPrompts are still tracked in the country or jobs are running there. Nothing is changed
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