Skip to main content
POST
/
rules
/
preview
Preview rule audio
curl --request POST \
  --url https://api.beyondwords.io/v1/rules/preview \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "key": "CO2",
  "value": "carbon dioxide",
  "type": "substitute",
  "project": {
    "id": 1
  },
  "content": {
    "id": "d8414aee-4171-419e-be42-bd57e9e2ccd2"
  }
}
'

Authorizations

X-Api-Key
string
header
required

Body

application/json
type
enum<string>

The rule type. Possible values are substitute, say_as_word, say_as_letter_sequence, ipa_transcription, pinyin_transcription, jyutping_transcription. Please note that not all voices support all rules

Available options:
substitute,
say_as_word,
say_as_letter_sequence,
ipa_transcription,
pinyin_transcription,
jyutping_transcription
key
string

The exact text to match in content when previewing this rule

value
string | null

Replacement text or phonetic transcription (depending on rule type)

project
object
content
object
language
object
preview_voice
object

Response

200

successful