Skip to main content
POST
/
v1
/
guard_rails
{
  "type": "tcpa:ai_disclosure",
  "config": {
    "end_seconds": 30
  },
  "attachments": [
    {
      "source_type": "PERSONA",
      "source_id": "98765432-1234-1234-1234-123456789012",
      "actions": [
        { "type": "end_call" }
      ]
    }
  ]
}
{
  "data": {
    "id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
    "org_id": "12345678-1234-1234-1234-123456789012",
    "type": "tcpa:ai_disclosure",
    "name": null,
    "description": null,
    "prompt": null,
    "config": {
      "end_seconds": 30
    },
    "attachments": [
      {
        "source_type": "PERSONA",
        "source_id": "98765432-1234-1234-1234-123456789012",
        "actions": [
          { "type": "end_call" }
        ]
      }
    ],
    "created_at": "2025-01-15T10:30:00.000Z",
    "updated_at": "2025-01-15T10:30:00.000Z"
  },
  "errors": null
}
Guard rails monitor AI responses during calls to catch compliance violations and trigger automated actions. Learn more in the Guard Rails documentation.

Headers

authorization
string
required
Your API key for authentication.

Body Parameters

TCPA Guard Rails

type
string
required
The type of TCPA guard rail:
  • tcpa:ai_disclosure - AI must disclose it’s an AI
  • tcpa:recording_disclosure - Must disclose the call is being recorded
  • tcpa:self_introduction - Must identify who is calling
  • tcpa:opt_out - Monitors for user opt-out requests
The tcpa:opt_out type is different from the others: it’s not time-based and instead monitors the entire conversation to detect if the agent continues to engage after the user opts out. The config.end_seconds field is not needed for this type.
config
object
Configuration object. Required for time-based TCPA guard rails (tcpa:ai_disclosure, tcpa:recording_disclosure, tcpa:self_introduction).
  • end_seconds (number) - Time window in seconds. If the required disclosure is not made within this time, the configured actions will trigger.
attachments
array
Array of sources to attach this guard rail to.
  • source_type (string, required) - Type of source: PERSONA, PATHWAY, or INBOUND
  • source_id (string, required) - ID of the source to attach to
  • actions (array, required) - Actions to take when the guard rail triggers

Custom Guard Rails (Enterprise)

Custom guard rails use your own detection prompt. Limited to 5 per organization.
type
string
required
Must be custom for custom guard rails.
name
string
required
Display name for the guard rail. This doesn’t affect the behaviour and is only for your reference.
description
string
required
Description of what this guard rail detects. This doesn’t affect the behaviour and is only for your reference.
prompt
string
required
Detection prompt that describes what to flag.

Action Types

Each attachment requires an actions array. Available action types:
Action TypeDescriptionConfig
end_callImmediately terminate the callNone
transferTransfer to a human agent{ "phone_number": "+15551234567" }
move_to_nodeJump to a specific pathway node{ "node_id": "node-uuid" }

Response

data
object
The created guard rail object containing id, org_id, type, name, description, prompt, config, attachments, created_at, and updated_at.
errors
array
Any errors that occurred (null if none).
{
  "type": "tcpa:ai_disclosure",
  "config": {
    "end_seconds": 30
  },
  "attachments": [
    {
      "source_type": "PERSONA",
      "source_id": "98765432-1234-1234-1234-123456789012",
      "actions": [
        { "type": "end_call" }
      ]
    }
  ]
}
{
  "data": {
    "id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
    "org_id": "12345678-1234-1234-1234-123456789012",
    "type": "tcpa:ai_disclosure",
    "name": null,
    "description": null,
    "prompt": null,
    "config": {
      "end_seconds": 30
    },
    "attachments": [
      {
        "source_type": "PERSONA",
        "source_id": "98765432-1234-1234-1234-123456789012",
        "actions": [
          { "type": "end_call" }
        ]
      }
    ],
    "created_at": "2025-01-15T10:30:00.000Z",
    "updated_at": "2025-01-15T10:30:00.000Z"
  },
  "errors": null
}