Vapi · Schema

RegexCondition

Artificial IntelligenceVoiceAgentsReal-TimeCPaaS

Properties

Name Type Description
type string This is the type discriminator for regex condition
regex string This is the regular expression pattern to match against message content. Note: - This works by using the RegExp.test method in Node.JS. Eg. /hello/.test("hello there") will return true. Hot tips: - In
target object This is the target for messages to check against. If not specified, the condition will run on the last message (position: -1). If role is not specified, it will look at the last message regardless of
negate boolean This is the flag that when true, the condition matches if the pattern does NOT match. Useful for ensuring certain words/phrases are absent. @default false
View JSON Schema on GitHub

JSON Schema

vapi-regexcondition-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/RegexCondition",
  "title": "RegexCondition",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "description": "This is the type discriminator for regex condition",
      "example": "regex",
      "enum": [
        "regex"
      ]
    },
    "regex": {
      "type": "string",
      "description": "This is the regular expression pattern to match against message content.\n\nNote:\n- This works by using the RegExp.test method in Node.JS. Eg. /hello/.test(\"hello there\") will return true.\n\nHot tips:\n- In JavaScript, escape \\ when sending the regex pattern. Eg. \"hello\\sthere\" will be sent over the wire as \"hellosthere\". Send \"hello\\\\sthere\" instead.\n- RegExp.test does substring matching, so /cat/.test(\"I love cats\") will return true. To do full string matching, use anchors: /^cat$/ will only match exactly \"cat\".\n- Word boundaries \\b are useful for matching whole words: /\\bcat\\b/ matches \"cat\" but not \"cats\" or \"category\".\n- Use inline flags for portability: (?i) for case insensitive, (?m) for multiline",
      "examples": [
        "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
        "^yes$ - Matches exactly yes (full string match)",
        "(?i)hello - Case insensitive match"
      ]
    },
    "target": {
      "description": "This is the target for messages to check against.\nIf not specified, the condition will run on the last message (position: -1).\nIf role is not specified, it will look at the last message regardless of role.\n@default { position: -1 }",
      "allOf": [
        {
          "$ref": "#/components/schemas/MessageTarget"
        }
      ]
    },
    "negate": {
      "type": "boolean",
      "description": "This is the flag that when true, the condition matches if the pattern does NOT match.\nUseful for ensuring certain words/phrases are absent.\n\n@default false",
      "example": "true - Reject if user hasn\"t said goodbye: { regex: \"\\\\b(bye|goodbye)\\\\b\", negate: true }"
    }
  },
  "required": [
    "type",
    "regex"
  ]
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/vapi-regexcondition"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.