Skip to main content
POST
Create Policy
Les politiques contrôlent les transactions qu’un agent est autorisé à exécuter. Chaque transaction est évaluée par rapport aux politiques de l’agent avant la signature MPC.

Corps de la requête

string
requis
Agent auquel associer cette politique.
string
requis
Type de politique. Valeurs : spending_limit, address_control, token_control, velocity_control, schedule, human_approval.
object
requis
Objet des règles de la politique. La structure dépend de type.

Exemple

Autorisations

X-API-Key
string
header
requis

API key authentication. Keys are prefixed with awx_.

Corps

application/json
agent_id
string
requis

Agent to attach this policy to.

type
enum<string>
requis

Policy type.

Options disponibles:
spending_limit,
address_control,
token_control,
velocity_control,
schedule,
human_approval
rules
object
requis

Policy rules object. Structure depends on the policy type.

Réponse

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.

Options 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.