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
| Header | Type | Required |
|---|---|---|
Authorization | Bearer asky_sk_… | required |
Idempotency-Key | string | required |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
brand_id | uuid | required | From List brands |
item_id | uuid | required | draft.item_id from List localization jobs |
Request
cURL
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
200
{
"data": {
"item_id": "0a1b2c3d-4e5f-4a6b-8c7d-9e8f7a6b5c4d",
"discarded": true
},
"request_id": "req_6d2a81c35bf9470e92ab"
}Errors
| Status | Code | When |
|---|---|---|
| 409 | conflict | The draft is still being generated, was already accepted, or changed since it was read |
| 401 | invalid_token | The key is missing, malformed, or does not exist |
| 403 | insufficient_scope | The key does not carry write:localization |
| 403 | plan_required | This workspace is not enabled for API writes |
| 404 | not_found | The brand or draft does not exist, or this key is not allowed to reach it |
| 429 | rate_limited | Over the per-minute limit for this endpoint |
Last updated on