Getting Started
Go from zero to your first API call in 5 steps. This quickstart assumes you have an Enterprise-tier Sergio account.
Get Your API Key
Navigate to your Sergio dashboard and generate an API key. You must be on the Enterprise tier (15+ users) to access the API.
Keep your API key secret. Never commit it to version control or expose it in client-side code. Use environment variables instead.
Make Your First Request
Test your API key with a simple curl request to the health endpoint:
curl -X GET https://api.sergio.app/v1/health \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json"Expected response:
{
"status": "ok",
"version": "1.0.0",
"timestamp": "2026-01-30T12:00:00Z"
}Authenticate
The main API uses JWT bearer token authentication. Exchange your credentials for a token:
curl -X POST https://api.sergio.app/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "admin@yourcompany.com",
"password": "your-password"
}'Use the returned JWT token in the Authorization: Bearer header for all subsequent requests.
Create a Job
Schedule your first window cleaning job via the API:
curl -X POST https://api.sergio.app/v1/jobs \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "cust_def456",
"service_type": "exterior_windows",
"scheduled_date": "2026-02-15",
"scheduled_time": "09:00",
"address": {
"street": "123 Oak Street",
"city": "Portland",
"state": "OR",
"zip": "97201"
}
}'Set Up Webhooks
Register a webhook endpoint to receive real-time event notifications. Sergio will send POST requests to your URL when events occur.
curl -X POST https://api.sergio.app/v1/webhooks \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://yourserver.com/webhooks/sergio",
"events": ["job.created", "job.completed", "invoice.paid"],
"secret": "your-webhook-secret"
}'You're all set!
You've authenticated, created a job, and registered for webhooks. Explore the full API reference or check out the SDK documentation for your language of choice.


