> ## Documentation Index
> Fetch the complete documentation index at: https://docs.inworld.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete a pronunciation dictionary

> Delete a named pronunciation dictionary and all of its entries.

The request must include the current `etag`. A stale value returns HTTP `409 Conflict`; get the dictionary again before retrying the deletion. Set `allowMissing=true` to treat an already-absent dictionary as a successful deletion. A non-empty `etag` is still required.

## API reference

**Endpoint:** `DELETE https://api.inworld.ai/pronunciations/v1/workspaces/{workspaceId}/pronunciationDictionaries/{pronunciationDictionaryId}`

### Authorization

- `Authorization` (string; required) — Your [authentication](../../../api-reference/introduction) credentials. For Basic authentication, send `Basic $INWORLD_API_KEY`. Use a Standard API key for the target workspace. Voices Read access permits list and get; Voices Write access permits all five methods.

### Path parameters

- `workspaceId` (string; required) — ID of the workspace that owns the dictionary. It must match a workspace accessible to the API key.
- `pronunciationDictionaryId` (string; required) — Service-assigned UUID from the dictionary's resource `name`.

### Query parameters

- `etag` (string; required) — Current dictionary `etag` from a get, list, create, or update response.
- `allowMissing` (boolean; default: false) — When `true`, deleting a dictionary that is already absent succeeds. A non-empty `etag` is still required, but it is not compared when the dictionary is absent.

### Response examples

#### 200: default_response

```json
{}
```

#### 409: default_response

```json
{
  "code": 10,
  "message": "Pronunciation dictionary etag does not match",
  "details": []
}
```

#### default: default_response

```json
{
  "code": 0,
  "message": "string",
  "details": [
    {
      "@type": "string"
    }
  ]
}
```

### Code examples

#### cURL

```bash
curl --request DELETE \
  "https://api.inworld.ai/pronunciations/v1/workspaces/${INWORLD_WORKSPACE_ID}/pronunciationDictionaries/${PRONUNCIATION_DICTIONARY_ID}?etag=${PRONUNCIATION_DICTIONARY_ETAG}" \
  --header "Authorization: Basic ${INWORLD_API_KEY}"
```

#### Python

```python
import os
import requests

workspace_id = os.environ["INWORLD_WORKSPACE_ID"]
dictionary_id = os.environ["PRONUNCIATION_DICTIONARY_ID"]
url = (
    "https://api.inworld.ai/pronunciations/v1/"
    f"workspaces/{workspace_id}/pronunciationDictionaries/{dictionary_id}"
)
response = requests.delete(
    url,
    headers={"Authorization": f"Basic {os.environ['INWORLD_API_KEY']}"},
    params={"etag": os.environ["PRONUNCIATION_DICTIONARY_ETAG"]},
)
response.raise_for_status()
```

#### JavaScript

```javascript
const { INWORLD_API_KEY, INWORLD_WORKSPACE_ID, PRONUNCIATION_DICTIONARY_ID, PRONUNCIATION_DICTIONARY_ETAG } = process.env;
const url = new URL(`https://api.inworld.ai/pronunciations/v1/workspaces/${INWORLD_WORKSPACE_ID}/pronunciationDictionaries/${PRONUNCIATION_DICTIONARY_ID}`);
url.searchParams.set('etag', PRONUNCIATION_DICTIONARY_ETAG);

const response = await fetch(url, {
  method: 'DELETE',
  headers: { Authorization: `Basic ${INWORLD_API_KEY}` },
});

if (!response.ok) throw new Error(await response.text());
```
