Complete REST API documentation for SavedAgent v1
Base URL: https://savedagent.fly.dev/v1
SavedAgent uses two authentication methods depending on the operation:
X-API-Key: ar_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Received when you register your agent. Required for uploading memory snapshots.
X-Session-Token: st_xxxxxxxxxxxxxxxx
Received after successful OTP verification. Short-lived (1 hour), used for disaster recovery downloads.
/v1/discover
Check if an agent exists for given identifiers. First step in boot-blank disaster recovery.
{
"identifiers": [
{
"type": "phone",
"value": "+14155551234"
},
{
"type": "email",
"value": "[email protected]"
}
]
}
| Field | Type | Required | Description |
|---|---|---|---|
| identifiers | array | REQUIRED | Array of identifier objects (1-10 items) |
| identifiers[].type | string | REQUIRED | phone | email | telegram | discord | whatsapp |
| identifiers[].value | string | REQUIRED | The identifier value (will be hashed) |
{
"results": [
{
"identifier": {
"type": "phone",
"value": "+14155551234"
},
"found": true,
"agentId": "550e8400-e29b-41d4-a716-446655440000",
"twoFactorMethods": ["sms", "email"]
},
{
"identifier": {
"type": "email",
"value": "[email protected]"
},
"found": true,
"agentId": "550e8400-e29b-41d4-a716-446655440000",
"twoFactorMethods": ["sms", "email"]
}
]
}
{
"results": [
{
"identifier": {
"type": "phone",
"value": "+14155551234"
},
"found": false
}
]
}
/v1/verify/request
Request an OTP code to be sent via SMS, email, or voice call.
{
"agentId": "550e8400-e29b-41d4-a716-446655440000",
"method": "sms"
}
| Field | Type | Required | Description |
|---|---|---|---|
| agentId | string (UUID) | REQUIRED | Agent ID from discovery response |
| method | string | REQUIRED | sms | email | voice |
{
"sessionId": "session_xxxxxxxxxxxxxxxx",
"expiresAt": "2026-02-13T06:00:00Z",
"method": "sms"
}
Rate Limit: 5 requests per hour per agent. OTP expires after 10 minutes.
/v1/verify/confirm
Submit the OTP code to get a session token for memory download.
{
"sessionId": "session_xxxxxxxxxxxxxxxx",
"otpCode": "123456"
}
| Field | Type | Required | Description |
|---|---|---|---|
| sessionId | string | REQUIRED | Session ID from verify/request |
| otpCode | string | REQUIRED | 6-digit OTP code (e.g., "123456") |
{
"success": true,
"sessionToken": "st_xxxxxxxxxxxxxxxx",
"agentMetadata": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "my-assistant-2026",
"createdAt": "2026-02-13T05:30:00Z",
"verified": true
}
}
{
"success": false,
"error": "Invalid OTP. 2 attempts remaining."
}
Attempt Limit: 3 attempts per OTP session. After 3 failed attempts, request a new OTP.
/v1/agents
Create a new agent identity with recovery identifiers.
{
"name": "my-assistant-2026",
"tier": "free",
"operatorInfo": {
"email": "[email protected]",
"phone": "+14155551234",
"notes": "Production assistant for XYZ project"
},
"identifiers": [
{
"type": "phone",
"value": "+14155551234",
"isPrimary": true
},
{
"type": "email",
"value": "[email protected]"
},
{
"type": "telegram",
"value": "123456789"
}
],
"metadata": {
"platform": "openclaw",
"version": "1.0.0"
}
}
{
"agentId": "550e8400-e29b-41d4-a716-446655440000",
"apiKey": "ar_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"createdAt": "2026-02-13T05:30:00Z"
}
⚠️ Save Your API Key! The API key is only shown once. Store it securely - you'll need it to upload memory snapshots.
/v1/agents/:id
Retrieve agent metadata and memory version history.
X-API-Key: ar_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "my-assistant-2026",
"status": "active",
"verified": true,
"createdAt": "2026-02-13T05:30:00Z",
"updatedAt": "2026-02-13T05:35:00Z",
"metadata": {
"platform": "openclaw",
"version": "1.0.0"
},
"memoryVersions": [
{
"id": "ver_xxxxxxxxxxxxxxxx",
"snapshotDate": "2026-02-13",
"snapshotType": "daily",
"contentSizeBytes": 2456789,
"createdAt": "2026-02-13T05:35:00Z"
}
]
}
/v1/memory/upload
Upload encrypted memory backup (multipart/form-data).
X-API-Key: ar_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: multipart/form-data
| Field | Type | Required | Description |
|---|---|---|---|
| file | binary | REQUIRED | Memory file (tar.gz recommended) |
| snapshotType | string | OPTIONAL | daily | weekly | consolidation | export |
| snapshotDate | string | OPTIONAL | YYYY-MM-DD (defaults to today) |
| retentionPolicy | string | OPTIONAL | standard | extended | permanent |
{
"versionId": "ver_xxxxxxxxxxxxxxxx",
"checksum": "sha256:a3d5f7b9c2e8d4a6f1...",
"sizeBytes": 2456789,
"createdAt": "2026-02-13T05:35:00Z"
}
Size Limits: Free tier = 10 MB per agent, Pro tier = 100 MB per agent
/v1/memory/download/:versionId
Get presigned URL to download memory snapshot. Requires session token from OTP verification.
X-Session-Token: st_xxxxxxxxxxxxxxxx
{
"presignedUrl": "https://r2.example.com/memories/...",
"expiresAt": "2026-02-13T06:00:00Z",
"metadata": {
"versionId": "ver_xxxxxxxxxxxxxxxx",
"snapshotDate": "2026-02-13",
"snapshotType": "daily",
"sizeBytes": 2456789,
"createdAt": "2026-02-13T05:35:00Z"
}
}
Security: Presigned URLs expire after 10 minutes. Download immediately.
All errors follow this format:
{
"statusCode": 400,
"error": "Bad Request",
"message": "Invalid OTP code",
"timestamp": "2026-02-13T05:45:00Z",
"path": "/v1/verify/confirm"
}
| Status | Error | Description |
|---|---|---|
| 400 | Invalid OTP | OTP code is incorrect |
| 400 | OTP Expired | OTP has expired (10 min limit) |
| 401 | Unauthorized | Missing or invalid API key/session token |
| 404 | Not Found | Agent or resource doesn't exist |
| 413 | Payload Too Large | Memory exceeds tier limit (10MB/100MB) |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server error, contact support |