Skip to main content
POST
/
rules
/
matches
Match rule text
curl --request POST \
  --url https://api.beyondwords.io/v1/rules/matches \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "project": {
    "id": 2
  },
  "segments": {
    "uuid": "<string>",
    "text": "<string>",
    "language": {
      "code": "<string>"
    },
    "voice": {
      "id": 2
    }
  },
  "content": {
    "id": "<string>"
  },
  "rules": [
    2
  ]
}
'
[
  {
    "uuid": "<string>",
    "selected": [
      {
        "rule": {
          "id": 123,
          "project": {
            "id": 123,
            "name": "<string>"
          },
          "content": {
            "id": "<string>",
            "title": "<string>"
          },
          "language": {
            "code": "<string>",
            "name": "<string>",
            "accent": "<string>"
          },
          "preview_voice": {
            "id": 123,
            "name": "<string>"
          },
          "preview_audio": {
            "url": "<string>",
            "content_type": "<string>",
            "duration": 123
          },
          "key": "<string>",
          "value": "<string>",
          "magic_ipa_used": true,
          "created": "<string>",
          "updated": "<string>"
        },
        "start_index": 123,
        "end_index": 123
      }
    ],
    "discarded": [
      {
        "rule": {
          "id": 123,
          "project": {
            "id": 123,
            "name": "<string>"
          },
          "content": {
            "id": "<string>",
            "title": "<string>"
          },
          "language": {
            "code": "<string>",
            "name": "<string>",
            "accent": "<string>"
          },
          "preview_voice": {
            "id": 123,
            "name": "<string>"
          },
          "preview_audio": {
            "url": "<string>",
            "content_type": "<string>",
            "duration": 123
          },
          "key": "<string>",
          "value": "<string>",
          "magic_ipa_used": true,
          "created": "<string>",
          "updated": "<string>"
        },
        "start_index": 123,
        "end_index": 123,
        "discard_reason": "<string>"
      }
    ]
  }
]

Authorizations

X-Api-Key
string
header
required

Body

application/json
project
object
required
segments
object
required
content
object
rules
integer[]

A list of rule IDs to limit the evaluation to (optional)

Required range: x >= 1

Response

200 - application/json

successful

uuid
string
selected
object[]
discarded
object[]