Skip to Content
APIEndpointsDiscard localization draft

Discard localization draft

Deletes a draft that should not be tracked, the way Delete does on a preview in the Markets page. The draft’s current version is read on the server, so a concurrent edit is refused rather than lost. A draft that is still generating cannot be discarded: stop it with Cancel localization jobs instead.

Nothing tracked is touched. An accepted version is a prompt: remove it with Delete prompts, or take it out of some markets only with Update prompt countries.

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

DELETE /v1/brands/{brand_id}/localization/previews/{item_id}

Authorization

HeaderTypeRequired
AuthorizationBearer asky_sk_…required
Idempotency-Keystringrequired

Path parameters

ParameterTypeRequiredDescription
brand_iduuidrequiredFrom List brands
item_iduuidrequireddraft.item_id from List localization jobs

Request

curl --request DELETE \ --url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/localization/previews/{item_id}' \ --header 'Authorization: Bearer <api-key>' \ --header 'Idempotency-Key: 9c4d2e1f-6a7b-4c8d-9e0f-1a2b3c4d5e6f'

Response

{ "data": { "item_id": "0a1b2c3d-4e5f-4a6b-8c7d-9e8f7a6b5c4d", "discarded": true }, "request_id": "req_6d2a81c35bf9470e92ab" }

Errors

StatusCodeWhen
409conflictThe draft is still being generated, was already accepted, or changed since it was read
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 or draft does not exist, or this key is not allowed to reach it
429rate_limitedOver the per-minute limit for this endpoint
Last updated on