Policies
A policy is a small JSON document that grants one agent permission to perform actions on one connector.
{
"name": "triage tickets",
"agent_id": "support-triage",
"connector": "ticketing",
"actions": ["ticket.read", "ticket.update", "ticket.comment"],
"resources": ["project:support"],
"approval_required": ["ticket.close"],
"hours": {"days": ["Mo", "Tu", "We", "Th", "Fr"], "from": "07:00", "to": "19:00", "tz": "Europe/Dublin"}
}
| Field | Required | Meaning |
|---|---|---|
name |
yes | A label for people reading the audit log |
agent_id |
yes | The agent the policy applies to; any string you choose, up to 64 characters |
connector |
yes | A connector id from the catalogue |
actions |
yes | Actions the agent may perform without asking |
resources |
no | Limits the grant to named resources, such as a project, folder or channel; omitted means all |
approval_required |
no | Actions the agent may perform only after a person approves |
hours |
no | Outside these hours every action is denied |
How a check is decided
- If no policy names the agent and connector, the answer is
deny. - If the action is in
approval_required, or is a sensitive action, the answer isneeds_approval. - If the action is in
actionsand the resource and hours match, the answer isallow. - Otherwise the answer is
deny.
Deny always wins: if two policies cover the same agent and connector and either denies the action, it is denied. Every decision names the policy that made it.
Approvals
On Team, approval requests go to a chat channel or an email address you choose; one person approves. On Business, a policy can require two different approvers. An approval is valid for one action on one resource and expires after 30 minutes.
Creating policies through the API
POST /v1/policies with the fields above. The response has the new policy's id. See the quickstart for a curl example.