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
The approver reviews the request on their dashboard. You can either:- Poll by re-requesting and checking the status
- Cancel the request if it’s no longer needed via
POST /v1/approvals/{approval_id}/cancel
3. Verify Approval
Once approved, your user shares the 6-character confirmation code displayed on their screen.4. Execute the Action
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 without a token: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, unknown agent, or incorrect confirmation code |
403 | Agent not authorized, token scope mismatch, 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 or too many verification attempts (max 5) |
502 | External service returned an error |