POST
/api/agent-network/policiesCreate an Agent Network Policy
Creates a new Agent Network policy binding source groups to destination providers, optionally enforced by guardrails.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
New policy request
descriptionstringoptional
Optional human-readable description.
destination_provider_idsarray<string>required
Agent Network provider ids the source groups can reach.
enabledbooleanoptional
Whether the policy is enabled. Defaults to true on create.
guardrail_idsarray<string>optional
Agent Network guardrail ids to attach to this policy.
limitsobjectoptional
Token and budget caps attached directly to the policy. These compose with any guardrail-level checks.
namestringrequired
Display name for the policy.
source_groupsarray<string>required
NetBird group ids whose members are allowed to call the destination providers.
200Policy created
created_atstringrequired
Timestamp when the policy was created.
descriptionstringrequired
Optional human-readable description.
destination_provider_idsarray<string>required
Agent Network provider ids (returned by the providers API) the source groups can reach.
enabledbooleanrequired
Whether the policy is enabled.
guardrail_idsarray<string>required
Agent Network guardrail ids attached to this policy.
idstringrequired
Policy ID
limitsobjectrequired
Token and budget caps attached directly to the policy. These compose with any guardrail-level checks.
namestringrequired
Display name for the policy.
source_groupsarray<string>required
NetBird group ids whose members are allowed to call the destination providers.
updated_atstringrequired
Timestamp when the policy was last updated.
400Bad Request
401Requires authentication
403Forbidden
409Conflict
messagestringoptional
A human-readable error message.
500Internal Server Error
Error handling
A 400 is returned: Bad Request. A 401 is returned: Requires authentication. A 403 is returned: Forbidden. A 409 is returned: Conflict. A 500 is returned: Internal Server Error.