AgentMessage
Guardrails

Update a guardrail profile

PATCH
/v1/guardrails/profiles/{id}

Edits a guardrail profile's tool settings. This is a partial update with three-way semantics per field: a field absent from the request is left unchanged; a field present with a value sets it; a field present as null clears it back to INHERIT.

Because a bound profile's settings affect every number under it, an edit takes effect on those numbers' next sends.

Requires the org:admin:write scope.

AuthorizationBearer <token>

Authenticate by sending your API key as a bearer token: Authorization: Bearer am_live_.... Every request is automatically scoped to the organization that owns the key and to the scopes granted to that key.

In: header

Path Parameters

id*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/guardrails/profiles/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{
  "success": true,
  "error": {
    "code": "string",
    "message": "string",
    "request_id": "string",
    "details": {
      "property1": "string",
      "property2": "string"
    }
  },
  "meta": {
    "total": 0,
    "limit": 0,
    "offset": 0,
    "next_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNi0wNC0yNlQxMjowMDowMFoiLCJpZCI6IjAxOTAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMSJ9",
    "last_event_at": "2019-08-24T14:15:22Z"
  },
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
    "name": "string",
    "source": "platform_default",
    "template_key": "string",
    "quiet_hours_disabled": true,
    "quiet_hours_start_minute": 0,
    "quiet_hours_end_minute": 0,
    "quiet_hours_mode": "reject",
    "freq_cap_disabled": true,
    "freq_cap_window_minutes": 1,
    "freq_cap_max_in_window": 1,
    "consent_freshness_disabled": true,
    "consent_freshness_max_age_days": 1,
    "autostamp_disabled": true,
    "autostamp_sender_id_text": "string",
    "autostamp_cadence": "every",
    "suppression_disabled": true,
    "branded_link_advisory_disabled": true,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "authentication failed",
    "request_id": "01JTBQH2FZ8K1RXC0WJ4Z9P3VM"
  }
}
{
  "success": false,
  "error": {
    "code": "FORBIDDEN",
    "message": "missing required scope",
    "request_id": "01JTBQH2FZ8K1RXC0WJ4Z9P3VM"
  }
}
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "not found",
    "request_id": "01JTBQH2FZ8K1RXC0WJ4Z9P3VM"
  }
}

{
  "success": false,
  "error": {
    "code": "ATTESTATION_REQUIRED",
    "message": "loosening the freq_cap guardrail at profile scope requires an attestation, an explicit human statement that your organization accepts responsibility for this change",
    "request_id": "01JTBQH2FZ8K1RXC0WJ4Z9P3VM",
    "details": {
      "profile.attestation": "required to loosen the freq_cap guardrail",
      "tool": "freq_cap",
      "scope_kind": "profile"
    }
  }
}