Skip to main content

API Reference

This section provides comprehensive documentation for the platform APIs, enabling programmatic access to authentication, credential management, and administrative operations.


Overview

The APIs allow you to programmatically interact with the platform's capabilities, enabling automation and custom integrations with external systems. All APIs follow RESTful conventions and return JSON responses.


Base URL

{{base_url}}/api/v1

Replace {{base_url}} with your environment-specific URL (e.g., https://api.rezolve.ai).


Getting Started

To get started with the APIs, you will need:

  1. API Credentials — Obtain your API key or OAuth credentials from the platform settings
  2. Base URL — The API endpoint for your environment
  3. Tenant ID — Your organization's unique identifier
  4. Authentication — Configure proper authentication headers

Authentication

All API requests (except health checks) require authentication using one of the following methods:

MethodHeaderUse Case
Bearer Token (JWT)Authorization: Bearer {{token}}User-based authentication
API KeyX-API-Key: {{api_key}}Machine-to-machine integration
OAuth 2.0Authorization: Bearer {{access_token}}Third-party application access

Required Headers

HeaderDescriptionRequired
AuthorizationBearer token or API keyYes
acceptapplication/jsonYes
content-typeapplication/json (for POST/PATCH/PUT)Conditional
x-tenantidYour tenant UUIDYes
realmnameAuthentication realm nameNo

Available API Endpoints

API Keys

Manage API keys for programmatic access to the platform.

MethodEndpointDescription
POST/api-keysCreate a new API key
GET/api-keysList all API keys
GET/api-keys/{keyId}Get API key by ID
POST/api-keys/{keyId}/validateValidate an API key
POST/api-keys/{keyId}/rotateRotate an API key
DELETE/api-keys/{keyId}Revoke/delete an API key

OAuth Clients

Manage OAuth 2.0 clients for third-party application integration.

MethodEndpointDescription
POST/oauth-clientsCreate a new OAuth client
GET/oauth-clientsList all OAuth clients
GET/oauth-clients/{clientId}Get OAuth client by ID
PATCH/oauth-clients/{clientId}Update OAuth client configuration
DELETE/oauth-clients/{clientId}Delete an OAuth client

Credentials Vault

Store and manage encrypted credentials for third-party integrations.

MethodEndpointDescription
POST/credentialsStore encrypted credentials
GET/credentials/{integrationId}Get credential with decrypted data
GET/credentials/{integrationId}/detailsGet credential metadata (without secrets)
PATCH/credentials/{integrationId}/{credentialId}Update credential metadata
DELETE/credentials/{integrationId}/{credentialId}Delete/revoke a credential

Admin Operations

Administrative endpoints for tenant and system management.

MethodEndpointDescription
GET/admin/healthAdmin health check
GET/admin/audit-logsGet paginated audit logs
GET/admin/tenants/{tenantId}Get tenant details
PATCH/admin/tenants/{tenantId}Update tenant configuration
DELETE/admin/tenants/{tenantId}Delete a tenant
GET/admin/tenants/{tenantId}/statsGet tenant statistics
POST/admin/dek/rotateTrigger DEK rotation
POST/admin/service-account/createCreate service account
POST/admin/jobs/triggerTrigger background job
GET/admin/jobs/{jobName}/statsGet job queue statistics

Health Checks

Monitor service availability and health status.

MethodEndpointDescription
GET/healthDefault health check (root)
GET/api/v1/healthAPI health check
GET/api/v1/admin/healthDetailed admin health check

Supported Authentication Types

The credentials vault supports 8 authentication types:

Auth TypeDescription
oauth2_bearerOAuth 2.0 Bearer Token
oauth2_client_credentialsOAuth 2.0 Client Credentials
api_keyAPI Key authentication
basic_authBasic Authentication
bearer_tokenSimple Bearer Token
jwtJSON Web Token
samlSAML Token
customCustom authentication

Response Format

All API responses follow a consistent format:

Success Response

{
"success": true,
"message": "Operation completed successfully",
"data": {
// Response data
},
"timestamp": "2025-07-10T14:00:00.000Z"
}

Error Response

{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"details": {
// Additional error details
}
},
"timestamp": "2025-07-10T14:00:00.000Z"
}

HTTP Status Codes

Status CodeDescription
200 OKRequest successful
201 CreatedResource created successfully
400 Bad RequestInvalid request body or parameters
401 UnauthorizedAuthentication failed
403 ForbiddenInsufficient permissions
404 Not FoundResource not found
409 ConflictResource conflict (duplicate, already exists)
422 Unprocessable EntityValidation error
500 Internal Server ErrorServer-side error
503 Service UnavailableService unhealthy

Rate Limiting

API requests may be subject to rate limiting. When rate limited, you will receive a 429 Too Many Requests response with headers indicating:

  • X-RateLimit-Limit — Maximum requests allowed
  • X-RateLimit-Remaining — Requests remaining in current window
  • X-RateLimit-Reset — Time when the rate limit resets

Pagination

List endpoints support pagination using query parameters:

ParameterTypeDefaultDescription
limitinteger50Number of items to return
offsetinteger0Number of items to skip

Example:

GET /api/v1/admin/audit-logs?limit=100&offset=0

Security Best Practices

  1. Store secrets securely — Never expose API keys or tokens in client-side code
  2. Use HTTPS — All API requests must use HTTPS
  3. Rotate credentials — Regularly rotate API keys and tokens
  4. Least privilege — Request only the scopes/permissions you need
  5. Monitor usage — Review audit logs for unauthorized access attempts
  6. IP whitelisting — Restrict API access to known IP addresses when possible

Need Help?

  • For API issues, check the error response details
  • Review the specific endpoint documentation for request/response examples
  • Contact support for authentication or access issues