Skip to main content
POST

Authorizations

Authorization
string
header
required

Telnyx API key

Path Parameters

instance_id
string<uuid>
required

The Agent Gateway's id.

Body

application/json
name
string
required

A name, unique on the instance. A request names the policy in its policies field.

Pattern: ^[A-Za-z0-9_.-]{1,100}$
description
string | null

What the policy is for.

base
string | null

A policy this one builds on, by name. The policy starts with the base's guardrails.

guardrails
object

The guardrails a policy adds to its base's, and the ones it removes from them, by name.

model
string | null

A condition on the model, by name or regular expression. The policy's guardrails run only on requests for a matching model. null matches every model.

pipeline
object | null

Ordered steps, in place of the guardrails running independently.

Response

The created policy

data
object
required

A named set of guardrails.