Agent Integration Guide
This guide covers how to build an AI agent that works with Permission Slip — from registration to executing approved actions.Prerequisites
Your agent needs:- An Ed25519 key pair for signing requests.
- The ability to make HTTPS requests to the Permission Slip API.
- The base URL:
https://app.permissionslip.dev
Authentication
All agent API requests are authenticated using Ed25519 request signatures. Every request must include theX-Permission-Slip-Signature header with the following fields:
- METHOD — uppercase HTTP method (e.g.,
POST) - PATH — the request path (e.g.,
/v1/approvals/request) - QUERY — query parameters sorted lexicographically, percent-encoded (empty string if none)
- TIMESTAMP — Unix timestamp (must be within ±5 minutes of server time)
- BODY_HASH — lowercase hex SHA-256 hash of the request body (use the SHA-256 of an empty string for bodyless requests)
Registration Flow
1. Receive Invite Instructions
Your user generates invite instructions from the Permission Slip dashboard and shares them with you.2. Register with Public Key
agent_id.
3. Verify with Confirmation Code
Your user shares a 6-character confirmation code (format:ABC-DEF).
Approval Flow
1. Request Approval
The
agent_id in the request body must match the agent_id in the signature header. The approver field is the username of the person who will review the request.approval_id— track the requestapproval_url— deep link for the approver to reviewstatus— initially"pending"expires_at— when the request expires
2. Wait for Decision and Result
The approver reviews the request on their dashboard. When they approve it, Permission Slip immediately executes the action via the connector and records the result on the approval. Poll for the approval status and execution result:The execution result contains the raw response from the connector. The shape depends on the action type — check the connector documentation for details.
Standing Approvals
If your user has created a standing approval for your action type, you can skip the one-off approval flow. Submit the action directly to the execute endpoint:404 with a hint to use the one-off approval flow instead.
Error Handling
| Status Code | Meaning |
|---|---|
400 | Invalid request (missing fields, bad parameters, invalid action type) |
401 | Invalid signature or unknown agent |
403 | Agent not authorized or parameters don’t match |
404 | Approval/resource not found, or no matching standing approval |
409 | Duplicate request ID (replay protection) |
410 | Approval expired or standing approval expired |
429 | Rate limited |
502 | External service returned an error |