5 min read
Getting Started
Learn how to authenticate with the Hydra API
Getting Started with the API
The Hydra API allows you to programmatically access your companies, service jobs, bookings, and more.
Base URL
All API requests should be made to:
https://hydra.marketdragon.ph/api/v1
Authentication
The API uses Bearer token authentication. Include your API token in the Authorization header:
curl -X GET "https://hydra.marketdragon.ph/api/v1/companies" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
Creating an API Token
- Go to Settings > API in your dashboard
- Click Create Token
- Give your token a name and select permissions
- Copy the token immediately - it won't be shown again!
Rate Limiting
The API is rate limited to 60 requests per minute per token. If you exceed this limit, you'll receive a 429 Too Many Requests response.
Response Format
All responses are returned in JSON format. Successful responses will have a 2xx status code.
{
"data": {
"id": 1,
"name": "Example Company"
}
}
Error Handling
Errors return appropriate HTTP status codes with a JSON body:
{
"message": "The given data was invalid.",
"errors": {
"field_name": ["Error message"]
}
}
Common status codes:
401- Unauthorized (invalid or missing token)403- Forbidden (insufficient permissions)404- Not Found422- Validation Error429- Too Many Requests500- Server Error
Back to Authentication
Was this helpful?