Skip to main content
POST
Create Policy
Las políticas controlan qué transacciones puede ejecutar un agente. Cada transacción se evalúa según las políticas del agente antes de la firma MPC.

Cuerpo de la solicitud

string
requerido
Agente al que se asociará esta política.
string
requerido
Tipo de política. Valores: spending_limit, address_control, token_control, velocity_control, schedule, human_approval.
object
requerido
Objeto de reglas de la política. La estructura depende de type.

Ejemplo

Autorizaciones

X-API-Key
string
header
requerido

API key authentication. Keys are prefixed with awx_.

Cuerpo

application/json
agent_id
string
requerido

Agent to attach this policy to.

type
enum<string>
requerido

Policy type.

Opciones disponibles:
spending_limit,
address_control,
token_control,
velocity_control,
schedule,
human_approval
rules
object
requerido

Policy rules object. Structure depends on the policy type.

Respuesta

Policy created successfully.

A policy that controls what transactions an agent is allowed to execute.

id
string

Unique policy identifier (e.g., pol_abc123).

agent_id
string

Agent this policy is attached to.

type
enum<string>

Policy type.

Opciones disponibles:
spending_limit,
address_control,
token_control,
velocity_control,
schedule,
human_approval
rules
object

Policy rules object. Structure depends on the policy type.

created_at
string<date-time>

ISO 8601 creation timestamp.

updated_at
string<date-time>

ISO 8601 last-update timestamp.