Skip to main content
POST
Create a pronunciation rule

Authorizations

X-Api-Key
string
header
required

Authenticate using X-Api-Key header

Query Parameters

model_id
string
required

Used only to resolve the provider; rules belong to the authenticated user.

voice_id
string
required

Used only to resolve the provider; rules belong to the authenticated user.

language
string

Used only to resolve the provider; rules belong to the authenticated user.

intervention_group_id
string

Select a group owned by the authenticated user. For GET, PATCH, and DELETE, omission selects default. For POST, query or body may select the group; both must match if supplied, and omission of both selects default. PATCH and DELETE verify that the rule belongs to this group. Opaque group ID owned by the authenticated user; default is the built-in group. Use the ID returned by group creation.

Required string length: 1 - 64
Pattern: ^[A-Za-z0-9_-]+$
Example:

"default"

Body

application/json
pattern
string
required

Literal patterns allow up to 64 characters; regex patterns allow up to 256.

Required string length: 1 - 256
intervention_group_id
string

Optional group selection. If query and body both specify a group they must match; defaults to default when both are omitted.

Required string length: 1 - 64
Pattern: ^[A-Za-z0-9_-]+$
Example:

"default"

match_type
enum<string>
default:literal
Available options:
literal,
regex
action
enum<string>
default:replace
Available options:
replace,
phoneme,
spellout
lang
string
default:und

Canonical rule language in BCP 47 language[-Script]. Region aliases normalize to their language scope; zh is Chinese of any script, zh-Hans and zh-Hant restrict the script, and und means any language by product convention.

Maximum string length: 64
replacement
string | null

Required and nonempty for replace or phoneme; must be null or omitted for spellout. Regex rules cannot use phoneme.

Maximum string length: 256
case_sensitive
boolean
default:true

Applies only to literal rules. For regex, specify case handling in the pattern.

whole_word
boolean
default:true

Applies only to literal rules. For regex, specify boundaries in the pattern.

priority
integer
default:0
Required range: -32768 <= x <= 32767
status
enum<string>
default:draft
Available options:
draft,
active,
inactive
note
string
default:""
Maximum string length: 1024

Response

Success

intervention_group_id
string
required

Group that owns this rule.

Required string length: 1 - 64
Pattern: ^[A-Za-z0-9_-]+$
Example:

"default"

match_type
enum<string>
default:literal
required
Available options:
literal,
regex
action
enum<string>
default:replace
required
Available options:
replace,
phoneme,
spellout
lang
enum<string>
default:und
required

Canonical rule language in BCP 47 language[-Script]. Region aliases normalize to their language scope; zh is Chinese of any script, zh-Hans and zh-Hant restrict the script, and und means any language by product convention.

Available options:
zh,
zh-Hans,
zh-Hant,
en,
fr,
und
Maximum string length: 64
pattern
string
required

Literal patterns allow up to 64 characters; regex patterns allow up to 256.

Required string length: 1 - 256
replacement
string | null
required

Required and nonempty for replace or phoneme; must be null or omitted for spellout. Regex rules cannot use phoneme.

Maximum string length: 256
case_sensitive
boolean
default:true
required

Applies only to literal rules. For regex, specify case handling in the pattern.

whole_word
boolean
default:true
required

Applies only to literal rules. For regex, specify boundaries in the pattern.

priority
integer
default:0
required
Required range: -32768 <= x <= 32767
status
enum<string>
default:draft
required
Available options:
draft,
active,
inactive
note
string
default:""
required
Maximum string length: 1024
id
integer<int64>
required
Required range: x >= 1
created_at
string<date-time>
required
updated_at
string<date-time>
required