---
title: "Add A Pronunciation Dictionary"
method: POST
path: "/v1/pronunciation-dictionaries/add-from-rules"
tags: ["Pronunciation Dictionary"]
---

# Add A Pronunciation Dictionary

`POST /v1/pronunciation-dictionaries/add-from-rules`

## Request

- Base URL: `https://api.elevenlabs.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.elevenlabs.io/v1/pronunciation-dictionaries/add-from-rules`
- Auth: none declared

Creates a new pronunciation dictionary from provided rules.

## Headers

- `xi-api-key` string, nullable: Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

## Request body

- BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPost
  - `rules` union[], required: List of pronunciation rules. Rule can be either: an alias rule: {'string_to_replace': 'a', 'type': 'alias', 'alias': 'b', } or a phoneme rule: {'string_to_replace': 'a', 'type': 'phoneme', 'phoneme': 'b', 'alphabet': 'ipa' }
    - union
      - PronunciationDictionaryAliasRuleRequestModel
        - `string_to_replace` string, required: The string to replace. Must be a non-empty string.
        - `case_sensitive` boolean: Whether the rule should match case-sensitively.
        - `word_boundaries` boolean: Whether the rule should only match at word boundaries.
        - `type` 'alias', required: The type of the rule.
        - `alias` string, required: The alias for the string to be replaced.
      - PronunciationDictionaryPhonemeRuleRequestModel
        - `string_to_replace` string, required: The string to replace. Must be a non-empty string.
        - `case_sensitive` boolean: Whether the rule should match case-sensitively.
        - `word_boundaries` boolean: Whether the rule should only match at word boundaries.
        - `type` 'phoneme', required: The type of the rule.
        - `phoneme` string, required: The phoneme rule.
        - `alphabet` string, required: The alphabet to use with the phoneme rule.
  - `name` string, required: The name of the pronunciation dictionary, used for identification only.
  - `description` string, nullable: A description of the pronunciation dictionary, used for identification only.
  - `workspace_access` 'admin' | 'editor' | 'commenter' | 'viewer', nullable: Should be one of 'admin', 'editor' or 'viewer'. If not provided, defaults to no access.

## Response `200`

Successful Response

- AddPronunciationDictionaryResponseModel
  - `id` string, required: The ID of the created pronunciation dictionary.
  - `name` string, required: The name of the created pronunciation dictionary.
  - `created_by` string, required: The user ID of the creator of the pronunciation dictionary.
  - `creation_time_unix` integer, required: The creation time of the pronunciation dictionary in Unix timestamp.
  - `version_id` string, required: The ID of the created pronunciation dictionary version.
  - `version_rules_num` integer, required: The number of rules in the version of the pronunciation dictionary.
  - `description` string, nullable: The description of the pronunciation dictionary.
  - `permission_on_resource` 'admin' | 'editor' | 'commenter' | 'viewer', nullable, required: The permission on the resource of the pronunciation dictionary.

## Other responses

- `422`: Validation Error

## Changes

- **2026-04-03** `deb5e58ddddf`: 4 info
  - added the new optional request property `rules/items/anyOf[subschema #1: PronunciationDictionaryAliasRuleRequestModel]/case_sensitive`
  - added the new optional request property `rules/items/anyOf[subschema #1: PronunciationDictionaryAliasRuleRequestModel]/word_boundaries`
  - added the new optional request property `rules/items/anyOf[subschema #2: PronunciationDictionaryPhonemeRuleRequestModel]/case_sensitive`
  - added the new optional request property `rules/items/anyOf[subschema #2: PronunciationDictionaryPhonemeRuleRequestModel]/word_boundaries`
- **2026-02-08** `5b595807512c`: 1 warning, 2 info
  - added the new `commenter` enum value to the `permission_on_resource/anyOf[subschema #1]/` response property for the response status `200`
  - api operation id `Add_a_pronunciation_dictionary_v1_pronunciation_dictionaries_add_from_rules_post` removed and replaced with `add_from_rules`
  - added the new `commenter` enum value to the request property `workspace_access/anyOf[subschema #1]/`
- **2025-05-16** `503db4198a44`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation/changes/v1/pronunciation-dictionaries/add-from-rules/post.md)

---

[API](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation.md) - [All operations](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation/revisions/d04f5e77c40a?raw)
