ReferenceAPI Reference
API Reference
Complete reference documentation for the SilentAuth REST API.
Base URL
https://api.silentauth.io/v1
Authentication
All API requests require authentication using your project's secret key:
Authorization: Bearer sk_live_your_secret_key
Endpoints
POST
/v1/intentsCreate an intent declaring what action the agent wants to perform
GET
/v1/intents/:idGet the status of an intent (pending, approved, denied, expired)
POST
/v1/intents/:id/approveApprove a pending intent and issue a signed permit
POST
/v1/intents/:id/denyDeny a pending intent with optional reason
POST
/v1/permits/validateValidate a permit token (can also be done offline)
GET
/v1/projects/:id/auditGet audit log of intents and approvals for a project
Example: Create Intent & Get Permit
1. Create an intent:
POST /v1/intents
Content-Type: application/json
Authorization: Bearer sk_live_xxx
{
"action": "deploy_production",
"params": { "env": "prod", "version": "2.1.0" },
"approvers": ["ops-team"],
"expires_in": 3600
}Response:
{
"id": "int_abc123",
"status": "pending",
"action": "deploy_production",
"approval_url": "https://app.silentauth.io/approve/int_abc123",
"expires_at": "2024-01-15T11:30:00Z"
}2. After human approval, poll or use webhook to get the permit:
{
"id": "int_abc123",
"status": "approved",
"permit": {
"token": "eyJhbGciOiJSUzI1NiIs...",
"expires_at": "2024-01-15T10:35:00Z",
"approved_by": "jane@acme.co",
"approved_at": "2024-01-15T10:30:00Z"
}
}Error Codes
| Code | Description |
|---|---|
| intent_not_found | The specified intent ID does not exist |
| intent_expired | The intent has expired and can no longer be approved |
| intent_already_resolved | The intent has already been approved or denied |
| permit_invalid | The permit token is invalid, expired, or tampered with |
| policy_violation | The intent violates project policy rules |
| unauthorized | Invalid or missing API key |