API Documentation
Everything you need to integrate Syncrypt into your infrastructure. RESTful endpoints, clear examples, and comprehensive guides.
All endpoints require API key authentication using the X-API-Key header.
curl -X GET https://api.syncrypt.io/v1/keys \
-H "X-API-Key: your-api-key"/api/partners/registerRegister a new partner account and receive an API key.
Request Body
{
"company_name": "Acme Corporation",
"name": "John Doe",
"email": "john.doe@acme.com",
"description": "Leading provider of cloud services"
}Response
{
"message": "Registration successful",
"api_key": "your-api-key"
}/api/keys/generate-keyGenerate a new PGP key pair.
Form Data
email — Email address for the keyResponse
{
"fingerprint": "ABC123...",
"public_key": "-----BEGIN PGP PUBLIC KEY BLOCK-----..."
}/api/keys/get-public-keyRetrieve a public key by fingerprint.
Request Body
{
"fingerprint": "ABC123..."
}Response
{
"public_key": "-----BEGIN PGP PUBLIC KEY BLOCK-----..."
}/api/keys/encryptEncrypt a file using a public key.
Form Data
fingerprint — Key fingerprintfiles — List of files to encryptResponse: Encrypted file stream
/api/keys/decryptDecrypt a file using a private key.
Form Data
fingerprint — Key fingerprintpassphrase — Key passphrasefiles — List of encrypted filesResponse: Decrypted file stream
/api/keys/{fingerprint}/rotateRotate a key and generate a new key pair.
Request Body
{
"reason": "Scheduled rotation"
}Response
{
"message": "Key rotated successfully",
"new_fingerprint": "XYZ789..."
}/api/keys/{fingerprint}/rotation-scheduleSet or update the automatic rotation schedule for a key.
Request Body
{
"days": 90
}Response
{
"message": "Schedule updated",
"next_rotation": "2025-12-05T00:00:00Z"
}/api/health{
"status": "healthy"
}/api/status{
"status": "operational",
"components": {
"database": "healthy",
"key_service": "healthy",
"email_service": "healthy"
},
"metrics": {
"active_keys": 42,
"pending_rotations": 3
}
}/api/keys/healthQuery Parameters
key_id — (optional) Specific key ID{
"total_keys": 42,
"expiring_soon": 3,
"recently_rotated": 5,
"health_status": {
"healthy": 38,
"warning": 3,
"critical": 1
}
}/api/keys/{key_id}/backup{
"message": "Backup created successfully",
"backup_id": "backup_123",
"timestamp": "2025-09-07T12:00:00Z"
}/api/keys/restoreRequest Body
{
"backup_file": "backup_123"
}Response
{
"message": "Key restored successfully",
"details": {
"fingerprint": "ABC123...",
"restored_at": "2025-09-07T12:05:00Z"
}
}| Endpoint | Rate Limit |
|---|---|
| Key Generation | 5/minute |
| Key Retrieval | 60/minute |
| Encryption | 30/minute |
| Decryption | 30/minute |
| Partner Registration | 3/minute |
| Monitoring | 120/minute |
| Code | Description |
|---|---|
| 400 | Bad Request — Invalid parameters |
| 401 | Unauthorized — Invalid API key |
| 403 | Forbidden — Insufficient permissions |
| 404 | Not Found — Resource doesn't exist |
| 429 | Too Many Requests — Rate limit exceeded |
| 500 | Internal Server Error |