OpenAPI Documentation
Authava provides comprehensive API documentation using the OpenAPI specification. This documentation allows you to explore and test the API endpoints directly from your browser.
Accessing the OpenAPI Documentation
The OpenAPI documentation is available at:
https://api.authava.com/openapi
You can also access it from your dashboard by navigating to API Settings > API Documentation.
Understanding the API Structure
The Authava API is organized into the following main sections:
Domains API
Endpoints for managing authentication domains:
GET /api/v1/domains
- List all domainsGET /api/v1/domains/{id}
- Get domain detailsPOST /api/v1/domains
- Create a new domainPUT /api/v1/domains/{id}
- Update a domainDELETE /api/v1/domains/{id}
- Delete a domainPOST /api/v1/domains/validate
- Validate a domainGET /api/v1/domains/verify
- Verify domain DNS configuration
Users API
Endpoints for managing users:
GET /api/v1/domains/{domainId}/users
- List users for a domainGET /api/v1/domains/{domainId}/users/{id}
- Get user detailsPOST /api/v1/domains/{domainId}/users
- Create a userPUT /api/v1/domains/{domainId}/users/{id}
- Update a userDELETE /api/v1/domains/{domainId}/users/{id}
- Delete a user
Email API
Endpoints for managing email settings:
GET /api/v1/domains/{domainId}/email
- Get email settingsPUT /api/v1/domains/{domainId}/email
- Update email settingsPOST /api/v1/domains/{domainId}/email/verify
- Verify email configurationPOST /api/v1/smtp/verify
- Verify SMTP settingsGET /api/v1/domains/{domainId}/email/templates
- Get email templatesPUT /api/v1/domains/{domainId}/email/templates/{templateId}
- Update email template
Social Providers API
Endpoints for managing social login providers:
GET /api/v1/domains/{domainId}/social-providers
- List social providersPOST /api/v1/domains/{domainId}/social-providers
- Create a social providerGET /api/v1/domains/{domainId}/social-providers/{id}
- Get provider detailsPUT /api/v1/domains/{domainId}/social-providers/{id}
- Update a providerDELETE /api/v1/domains/{domainId}/social-providers/{id}
- Delete a provider
Authentication
All API endpoints require authentication. You can authenticate using:
- API Key: Include your API key in the
api-key
header - Bearer Token: Include a JWT token in the
Authorization
header
To get your API key:
- Go to Dashboard > API Settings
- Click Generate API Key
- Copy the generated key and store it securely
Example API request with authentication:
curl -X GET "https://api.authava.com/api/v1/domains" \
-H "api-key: your_api_key_here"
Using the Interactive Documentation
The OpenAPI documentation includes an interactive interface that allows you to:
- Explore Endpoints: Browse all available API endpoints with detailed descriptions
- Try Requests: Send test requests directly from the documentation
- View Responses: See example responses for each endpoint
- Understand Models: View the data models used by the API
To use the interactive documentation:
- Navigate to the OpenAPI documentation page
- Click on an endpoint to expand it
- Click the Try it out button
- Fill in the required parameters
- Click Execute to send the request
- View the response below
Downloading the OpenAPI Specification
You can download the OpenAPI specification file to use with your own tools:
- JSON format:
https://api.authava.com/openapi.json
- YAML format:
https://api.authava.com/openapi.yaml
This specification can be imported into tools like Postman, Insomnia, or used with code generators to create client libraries.
Code Generation
You can use the OpenAPI specification to generate client code for your preferred programming language:
- Download the OpenAPI specification file
- Use a tool like OpenAPI Generator to generate client code
- Integrate the generated code into your application
Example using the OpenAPI Generator CLI:
# Install OpenAPI Generator
npm install @openapitools/openapi-generator-cli -g
# Generate a TypeScript client
openapi-generator-cli generate -i openapi.json -g typescript-fetch -o ./client
Rate Limiting
The API has rate limits to prevent abuse:
- Free tier: 100 requests per minute
- Pro tier: 1000 requests per minute
- Business tier: Custom limits
Rate limit headers are included in API responses:
X-RateLimit-Limit
: Maximum requests per minuteX-RateLimit-Remaining
: Remaining requests in the current windowX-RateLimit-Reset
: Time when the rate limit resets (Unix timestamp)
If you exceed the rate limit, you'll receive a 429 Too Many Requests
response.
Error Handling
The API uses standard HTTP status codes and returns detailed error messages:
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid domain name format",
"details": {
"field": "domain",
"constraint": "format"
}
}
}
Common error codes:
400 Bad Request
: Invalid request parameters401 Unauthorized
: Missing or invalid authentication403 Forbidden
: Insufficient permissions404 Not Found
: Resource not found422 Unprocessable Entity
: Validation error429 Too Many Requests
: Rate limit exceeded500 Internal Server Error
: Server error
Next Steps
- Explore the API documentation using the interactive interface
- Use the OpenAPI specification to generate client code
- Integrate the API with your application