Complete reference documentation for the CryptoServe REST API.
Tip: CryptoServe provides interactive API documentation powered by OpenAPI 3.1, available when the server is running:
- Swagger UI (
/docs) — Interactive API explorer with live request testing- ReDoc (
/redoc) — Three-panel API documentation- OpenAPI Spec (
/openapi.json) — Import into Postman, Insomnia, or any OpenAPI-compatible tool
https://your-server/v1 # Production
http://localhost:8003 # Development
All API requests require a valid JWT token in the Authorization header:
curl -H "Authorization: Bearer <access_token>" \
https://your-server/v1/crypto/encryptSee Authentication for token details.
| Section | Description | Link |
|---|---|---|
| Crypto Operations | Encrypt, decrypt, sign, verify, hash, and MAC | Crypto API |
| Identities | Create and manage API identities | Identities API |
| Contexts | Configure encryption contexts | Contexts API |
| Policies | Define and evaluate cryptographic policies | Policies API |
| Admin | Administrative operations and analytics | Admin API |
| Keys | Key management, rotation, and status | Keys API |
| Usage | Usage statistics and analytics | Usage API |
| Algorithm Policy | Configure allowed algorithms and FIPS mode | Algorithm Policy API |
All responses use JSON with consistent structure:
{
"data": { ... },
"warnings": []
}{
"error": "error_code",
"message": "Human-readable description",
"details": { ... }
}| Code | Description |
|---|---|
200 |
Success |
201 |
Created |
400 |
Bad Request — Invalid input |
401 |
Unauthorized — Invalid/missing token |
403 |
Forbidden — Insufficient permissions |
404 |
Not Found |
409 |
Conflict — Resource already exists |
429 |
Too Many Requests — Rate limited |
500 |
Internal Server Error |
Default limits:
| Endpoint Type | Rate Limit |
|---|---|
| Crypto operations | 1000/min |
| Management APIs | 100/min |
| SDK downloads | 10/min |
Rate limit headers:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1642089600
List endpoints support pagination:
GET /api/audit?limit=100&offset=0Response includes pagination info:
{
"data": [...],
"pagination": {
"total": 1523,
"limit": 100,
"offset": 0,
"has_more": true
}
}For type-safe API access, use the official SDKs:
- Python SDK — Full async support, Django/FastAPI integrations
- TypeScript SDK — Browser and Node.js compatible