Customisers
delete_customiser_language
destructive writeDelete customiser language
Remove a language from a customiser after the merchant has agreed to it.
Overview
Deletes one customiser language and every translation it holds. There is no restore, and a published language leaves the live storefront, so the call requires confirm true and changes nothing without it. The default language, the only published language and the authoring language cannot be deleted, and a language with an AI translation still running is refused until it finishes or is cancelled. Calling with dry_run true first returns the same verdict without deleting anything. It requires the customisers:write scope and an idempotency_key.
Permission
Requires thecustomisers:writepermission. A connection without it answersinsufficient_scopenaming the permission to approve.
Annotations
Prerequisites
- A customiser id from list_customisers and a language code from list_customiser_languages.
- The merchant explicit agreement, sent as confirm true.
- A merchant has connected this store and approved the customisers:write scope.
Side effects
- Deletes the language and every translation row it holds permanently.
- Removes the language from the live storefront if it was published.
- Clears the customiser cached storefront configuration and runs the language sync.
- Claims the idempotency_key for at least 24 hours.
Arguments
The customiser id, from list_customisers.
The BCP 47 language tag the language is addressed by, such as fr or pt-BR, from list_customiser_languages.
Must be true to apply the change, because the language and every translation it holds are removed permanently, and a published language leaves the storefront. Without it the call returns a confirmation_required error and changes nothing.
A client-generated key unique to this logical write, such as a UUID. Required: repeating the call with the same key and the same arguments replays the original result instead of writing twice, and the same key with different arguments is an idempotency_key_conflict.
When true, the deletion is checked against the default, authoring and published-language rules, any running AI translation, and the records that reference the language is checked and nothing is written: the result is the same verdict the apply would have reached, and a problem the apply would have raised comes back as the same tool error. Defaults to false. A dry run claims no key. A dry run does not require the confirm argument.
Result
The deleted language code and the language record as it was immediately before deletion. A dry run returns the delete verdict instead and deletes nothing.
The language code that was addressed.
True when the language was deleted. Absent on a dry run, where nothing is deleted.
The language as it was immediately before deletion, so the caller can report what it removed. Absent on a dry run.
Present and true only when dry_run was requested.
Present only on a dry run, and always true: a failing dry run returns a tool error instead.
Present only on a dry run: the delete verdict.
True when this call replayed a previously recorded response for the same idempotency_key instead of applying the write again.
Error cases
An AI translation is still writing this language. Wait for it to finish, or stop it with cancel_customiser_language_translation, then retry.
Send confirm true once the merchant has agreed to the deletion. Nothing was deleted.
The language changed after the recorded deletion. Issue a new key and re-check the language before writing again.
The connection was approved without customisers:write.
Read reason. default_language or sole_published_language: publish another language and make it the default first. authoring_language: the authoring language cannot be deleted.
Other records still reference the language; referenced_by names them.
No customiser with that id, or no language with that code on it.
Delete a draft language the merchant confirmed
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "delete_customiser_language",
"arguments": {
"customiser_id": 42,
"language_code": "fr",
"confirm": true,
"idempotency_key": "c9d0e1f2-a3b4-4c56-8d78-e9f0a1b2c3d4"
}
}
}{
"jsonrpc": "2.0",
"id": 1,
"result": {
"structuredContent": {
"request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t",
"store": {
"id": 12,
"name": "Demo Signs"
},
"customiser_id": 42,
"language_code": "fr",
"deleted": true,
"language": {
"language_code": "fr",
"source_language_code": "en",
"display_name": "French",
"status": "draft",
"is_default": false,
"is_authoring": false,
"translation_summary": {
"key_count": 184,
"required_key_count": 96,
"translated_key_count": 12,
"retired_key_count": 0,
"missing_required_key_count": 84,
"publishable": false
},
"ai_translation": null,
"published_at": null,
"updated_at": "2026-05-04T09:11:20Z"
},
"idempotent_replay": false
}
}
}Without confirmation nothing is deleted (error)
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "delete_customiser_language",
"arguments": {
"customiser_id": 42,
"language_code": "fr",
"confirm": false,
"idempotency_key": "c9d0e1f2-a3b4-4c56-8d78-e9f0a1b2c3d4"
}
}
}{
"jsonrpc": "2.0",
"id": 1,
"result": {
"isError": true,
"structuredContent": {
"error": {
"code": "confirmation_required",
"title": "Confirmation required",
"detail": "Deleting language fr removes it and every translation it holds permanently, and takes it off the storefront if it is published.",
"recovery": "This operation changes something consequential. Send confirm: true once the merchant has agreed to it.",
"parameter": "confirm",
"allowed_values": [
"true"
]
}
}
}
}The default language cannot be deleted (error)
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "delete_customiser_language",
"arguments": {
"customiser_id": 42,
"language_code": "en",
"dry_run": true
}
}
}{
"jsonrpc": "2.0",
"id": 1,
"result": {
"isError": true,
"structuredContent": {
"error": {
"code": "language_not_deletable",
"title": "Language not deletable",
"detail": "A customiser must always keep one published default language, because it is the copy the storefront falls back to. Publish another language and make it the default before removing this one.",
"recovery": "Read reason. For default_language or sole_published_language, publish another language and make it the default first. For authoring_language, the language owns the option and form text and cannot be deleted.",
"reason": "default_language"
}
}
}
}