Skip to main content
PATCH
https://api.bland.ai
/
v1
/
guard_rails
/
{guard_rail_id}
{
  "config": {
    "end_seconds": 45
  }
}
{
  "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": 45
    },
    "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-16T14:20:00.000Z"
  },
  "errors": null
}
The type field cannot be changed after creation. To change the type, delete the guard rail and create a new one.

Headers

authorization
string
required
Your API key for authentication.

Path Parameters

guard_rail_id
string
required
The unique identifier of the guard rail to update.

Body Parameters

All fields are optional. Only include fields you want to update.
name
string
Updated name for the guard rail (custom guard rails only).
description
string
Updated description (custom guard rails only).
prompt
string
Updated detection prompt (custom guard rails only).
config
object
Updated configuration object. For TCPA time-based guard rails, set end_seconds to change the time window.
attachments
array
Updated array of sources to attach this guard rail to. This replaces all existing attachments.Each attachment requires:
  • source_type (string) - Type of source: PERSONA, PATHWAY, or INBOUND
  • source_id (string) - ID of the source to attach to
  • actions (array) - Actions to take when the guard rail triggers

Response

data
object
The updated 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).
{
  "config": {
    "end_seconds": 45
  }
}
{
  "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": 45
    },
    "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-16T14:20:00.000Z"
  },
  "errors": null
}