Start here
Create a scoped personal key and make your first request.
Create an API key
- Open API Keys in the workspace you want to read.
- Create a Personal key with
incidents:read. Copy it from the API Keys page. - Put the key in an environment variable and call the list method:
export INCIDENTFLOW_API_TOKEN='if_pat_...'
export INCIDENTFLOW_API_BASE_URL='http://localhost:8000' # omit for production
curl --fail-with-body --silent --show-error \
"${INCIDENTFLOW_API_BASE_URL:-https://api.incidentflow.io}/api/v1/incidents?limit=50&offset=0" \
-H "Authorization: Bearer $INCIDENTFLOW_API_TOKEN"
| Environment | Base URL |
|---|---|
| Local | http://localhost:8000 |
| Production | https://api.incidentflow.io |
Set INCIDENTFLOW_API_BASE_URL to http://localhost:8000 for the local stack. If it is unset, the examples call production. A successful response contains an items array; it can be empty when the workspace has no incidents.
The three available methods are List incidents, Get incident, and Get incident timeline.