# POST Cancel an AI translation

Stop the AI translation currently writing this language draft copy. The job is marked cancelled, the provider batch behind it is cancelled too, and a language left in the `translating` status returns to `draft`. Draft values the translation had already written are kept: cancelling stops further work, it does not undo work already done. This is the only AI translation operation on the API. Starting and retrying a translation are deferred, because each call spends money with an external provider on an unbounded amount of copy — so this operation exists to stop a translation the merchant admin started, which is what unblocks a publish or a delete refused with `ai_translation_in_progress`. A 422 problem with code `ai_translation_not_cancellable` means there is nothing to cancel: `reason` is `no_translation` when the language has never had one, or `not_running` when its most recent translation has already finished, failed, or been cancelled. Read the language `ai_translation` to see which. The write clears the customiser cached storefront configuration and runs the advisory language sync. It never regenerates your Shopify products, product images, or product cache. An `Idempotency-Key` header is required. Requires the `customisers:write` scope. A 400 problem means the `Idempotency-Key` header is missing or malformed. 401, 403, 404, and 429 problems behave as on the read operation, with `customisers:write` as the required scope.

- Source URL: https://www.signcustomiser.com/help/api/v3-post-cancel-an-ai-translation/
- Markdown URL: https://www.signcustomiser.com/help/api/v3-post-cancel-an-ai-translation.md
- Group: Customiser languages
- Method: POST
- Path: /api/v3/customisers/{customiser_id}/languages/{language_code}/cancel-ai-translation
- Auth: Bearer token
- Required scopes: `customisers:write`

## Path parameters

- customiser_id (string, required): The customiser id, from the list customisers operation. Example: 1
- language_code (string, required): The language tag, from the list customiser languages operation. Example: fr

## cURL example

```bash
curl https://web.signcustomiser.com/api/v3/customisers/1/languages/fr/cancel-ai-translation \
  --request POST \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_TOKEN'
```

## Response examples

### 200 AI translation cancelled

```json
{
  "data": {
    "object": "customiser_language",
    "customiser_id": 42,
    "language_code": "fr",
    "source_language_code": "en",
    "display_name": "French",
    "status": "draft",
    "is_default": false,
    "translation_summary": {
      "key_count": 184,
      "required_key_count": 96,
      "translated_key_count": 64,
      "retired_key_count": 0,
      "missing_required_key_count": 32,
      "publishable": false
    },
    "ai_translation": {
      "object": "language_ai_translation",
      "status": "cancelled",
      "cancellable": false,
      "chunks_total": 8,
      "keys_targeted": 184,
      "error_summary": null,
      "started_at": "2026-05-04T09:10:00Z",
      "finished_at": "2026-05-04T09:11:45Z",
      "created_at": "2026-05-04T09:09:58Z",
      "updated_at": "2026-05-04T09:11:45Z"
    },
    "published_at": null,
    "created_at": "2026-05-04T09:09:00Z",
    "updated_at": "2026-05-04T09:11:45Z"
  },
  "links": {
    "self": "https://web.signcustomiser.com/api/v3/customisers/42/languages/fr/cancel-ai-translation",
    "documentation": "https://www.signcustomiser.com/help/api/"
  },
  "meta": {
    "api_version": "v3",
    "request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t"
  }
}
```

### 403 Insufficient scope

```json
{
  "type": "https://www.signcustomiser.com/help/api/problems/insufficient_scope",
  "title": "Insufficient scope",
  "status": 403,
  "code": "insufficient_scope",
  "detail": "This operation requires the customisers:write scope, but the API key grants the following scopes: customisers:read. Create a key that includes the required scope in the merchant admin under Integrate → API Tokens.",
  "required_scopes": [
    "customisers:write"
  ],
  "granted_scopes": [
    "customisers:read"
  ],
  "request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t"
}
```

### 404 Unknown language

```json
{
  "type": "https://www.signcustomiser.com/help/api/problems/resource_not_found",
  "title": "Resource not found",
  "status": 404,
  "code": "resource_not_found",
  "detail": "The requested resource does not exist or does not belong to the authenticated store.",
  "request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t"
}
```

### 422 Nothing to cancel

```json
{
  "type": "https://www.signcustomiser.com/help/api/problems/ai_translation_not_cancellable",
  "title": "AI translation not cancellable",
  "status": 422,
  "code": "ai_translation_not_cancellable",
  "detail": "This language has no AI translation to cancel. Only a queued or running translation can be cancelled; a finished one is already in its final state.",
  "reason": "no_translation",
  "request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t"
}
```
