REST API Reference
Authenticate and use the Incidion REST API.
The Incidion REST API gives programmatic access to monitors, incidents, logs and the rest of your workspace. Requests are authenticated with JSON Web Tokens (JWT). The complete list of endpoints is in API Endpoints.
Base URL
https://api.incidion.dev/api/v1/
All examples assume this base URL. On a self-hosted installation it is your Django host followed by /api/v1/. Project API keys are not accepted here (except for the deployment webhook and legacy heartbeat URLs); log and metric ingestion goes to https://ingest.incidion.dev instead (see Send logs).
Authentication
Sign in
curl -X POST https://api.incidion.dev/api/v1/auth/login/ \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "your_password"
}'
Without two-factor, the answer is 200 with the tokens:
{
"access": "eyJ0eXAiOiJKV1QiLCJhbGc...",
"refresh": "eyJ0eXAiOiJKV1QiLCJhbGc...",
"mfa_setup_required": false,
"mfa_required_organizations": []
}
mfa_setup_required is true when one of your organizations requires two-factor and you have not set it up yet; mfa_required_organizations names those organizations. Fetch the profile with GET /me/.
Two-factor sign-in
When two-factor is on, the login answers 200 with a challenge instead of tokens:
{
"mfa_required": true,
"mfa_token": "c2lnbmVkLWNoYWxsZW5nZQ...",
"mfa_methods": ["totp", "recovery_code"],
"expires_in": 300
}
Finish with the code from your authenticator app:
curl -X POST https://api.incidion.dev/api/v1/auth/mfa/verify/ \
-H "Content-Type: application/json" \
-d '{"mfa_token": "c2lnbmVkLWNoYWxsZW5nZQ...", "code": "123456"}'
or with a recovery code ({"mfa_token": "...", "recovery_code": "abcde-12345"}; the code field accepts one too). The answer is the same as a sign-in without two-factor, plus recovery_codes_remaining when a recovery code was used.
- The
mfa_tokenis valid for 5 minutes, works once, and stops working after 5 wrong codes. - Recovery codes have the form
xxxxx-xxxxx; you get 10, and each works once. - 5 wrong codes or passwords within 15 minutes lock two-factor sign-in for that account for a while (
429 mfa_lockedwithRetry-After).
Two-factor is set up in the app (Settings > Password and security) or with the /me/mfa/ endpoints.
Using the access token
curl https://api.incidion.dev/api/v1/me/ \
-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGc..."
Token lifetimes and refresh
Access tokens expire after 30 minutes, refresh tokens after 7 days. Each refresh returns a new refresh token and invalidates the old one:
curl -X POST https://api.incidion.dev/api/v1/auth/refresh/ \
-H "Content-Type: application/json" \
-d '{"refresh": "eyJ0eXAiOiJKV1QiLCJhbGc..."}'
{
"access": "eyJ0eXAiOiJKV1QiLCJhbGc...",
"refresh": "eyJ0eXAiOiJKV1QiLCJhbGc..."
}
Browser clients send X-Incidion-Client: web to /auth/ endpoints: the refresh token then travels only in the HttpOnly cookie incidion_refresh, never in the body (the web dashboard works this way). Signing out (POST /auth/logout/ with the refresh token), signing out a device from the sessions list, changing or resetting the password all end those sessions: their tokens answer 401 session_revoked.
Step-up for sensitive actions
Deleting your account, deleting an organization, transferring ownership, changing a member’s role and regenerating an API key need a recent confirmation. Get a step-up token with your password or a two-factor code and send it in the X-Step-Up-Token header:
curl -X POST https://api.incidion.dev/api/v1/me/step-up/ \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"password": "your_password"}'
{ "step_up_token": "...", "expires_in": 300 }
Without it these endpoints answer 403 step_up_required.
Error format
Errors are JSON in this shape:
{
"error": {
"code": "PlanLimitExceeded",
"message": "The Free plan includes 5 monitors. Upgrade to add more.",
"status_code": 403,
"plan_limit": {
"code": "max_monitors",
"limit": 5,
"current": 5,
"feature": null,
"upgrade_required": "pro",
"upgrade_url": "https://incidion.dev/billing/?organization=..."
}
}
}
Validation errors add the field errors in error.details. error.code is a specific code where one exists, otherwise the error class.
Error codes
| Code | Status | Meaning |
|---|---|---|
ValidationError |
400 | Invalid input; see details |
NotAuthenticated |
401 | No token sent |
AuthenticationFailed, InvalidToken |
401 | Wrong credentials, or an expired or invalid token |
session_revoked |
401 | The session was signed out (logout, another device, password change) |
PermissionDenied |
403 | Your role does not allow this |
PlanLimitExceeded |
403 | The plan does not include this; see plan_limit |
step_up_required |
403 | Send a fresh X-Step-Up-Token (see above) |
mfa_required |
403 | The organization requires two-factor; set it up first |
NotFound |
404 | It does not exist, or you are not a member of its organization |
mfa_code_invalid, mfa_token_invalid |
400 | Wrong two-factor code, or an expired or used challenge |
password_invalid |
400 | Wrong password (step-up, two-factor changes, account deletion) |
mfa_already_enabled, ownership_transfer_required |
409 | Two-factor is already on; you are the only owner of an organization with other members |
Throttled, mfa_locked |
429 | Too many requests or failed attempts; wait for Retry-After |
ServerError |
500 | Something went wrong on our side |
Members of an organization who lack the role get 403; everyone else gets 404, so the API never confirms that another organization’s resources exist.
Pagination
List endpoints return pages of 20:
{
"count": 42,
"next": "https://api.incidion.dev/api/v1/projects/{project_id}/monitors/?page=2",
"previous": null,
"results": []
}
Use ?page=2 and so on. Some lists are not paginated (API keys, maintenance windows, overrides), and log endpoints use their own limit and offset parameters (see Search and live tail).
Rate limits
- 5,000 requests per hour per signed-in user
- 100 requests per hour per address without a token
- 30 per hour for sign-in, registration, password reset and similar endpoints (token refresh: 1,200 per hour per address)
- Tighter limits on a few endpoints that send messages (rule tests, phone verification, status page subscriptions)
A limited request gets 429 with a Retry-After header. Log ingestion has its own quotas (see Send logs).
Examples
Current user
curl https://api.incidion.dev/api/v1/me/ \
-H "Authorization: Bearer $TOKEN"
Projects
curl https://api.incidion.dev/api/v1/organizations/{org_id}/projects/ \
-H "Authorization: Bearer $TOKEN"
curl -X POST https://api.incidion.dev/api/v1/organizations/{org_id}/projects/ \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "My Project", "slug": "my-project", "description": "Optional"}'
Monitors
curl -X POST https://api.incidion.dev/api/v1/projects/{project_id}/monitors/ \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "API Health",
"monitor_type": "http",
"url": "https://api.example.com/health",
"interval": 60,
"timeout": 30,
"expected_status_codes": [200],
"confirmation_checks": 2
}'
Incidents
curl -X POST https://api.incidion.dev/api/v1/projects/{project_id}/incidents/ \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"title": "API Down", "description": "API is not responding", "severity": "critical"}'
curl -X POST https://api.incidion.dev/api/v1/projects/{project_id}/incidents/{id}/acknowledge/ \
-H "Authorization: Bearer $TOKEN"
curl -X POST https://api.incidion.dev/api/v1/projects/{project_id}/incidents/{id}/resolve/ \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"message": "Issue resolved"}'
Alert rules
curl -X POST https://api.incidion.dev/api/v1/projects/{project_id}/alert-rules/ \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "API Down",
"monitor": "monitor-uuid",
"condition": {"type": "monitor_status", "threshold": "down"},
"channels": [
{"type": "email", "recipients": ["admin@example.com"]},
{"type": "push"}
]
}'
Email recipients must be active members of the organization. See Alert rules for conditions and channels.
Interactive documentation
- Swagger UI: https://api.incidion.dev/api/docs/
- ReDoc: https://api.incidion.dev/api/redoc/
- OpenAPI schema: https://api.incidion.dev/api/schema/
Webhooks or polling
Use webhooks to react to incidents, monitor changes and deployments as they happen. Use the REST API to query history, create resources and change settings.
Version
The current API version is v1. Breaking changes get a new version.