> For the complete documentation index, see [llms.txt](https://docs.spike.sh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.spike.sh/spike-api-docs/incidents.md).

# Incidents

Create and read incidents. Incident `status` is one of `NACK` (triggered), `ACK` (acknowledged) or `RES` (resolved).

## Fetch incidents

> Get a list of all the incidents for a team.

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Incidents","description":"Create and read incidents. Incident `status` is one of `NACK` (triggered), `ACK` (acknowledged) or `RES` (resolved)."}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"security":[{"ApiKeyAuth":[],"TeamIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the `x-api-key` header."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"},"success":{"type":"boolean","description":"Present on the endpoints whose handlers include it (for example the API-key filter and the public on-call routes). Always `false` on an error."},"valid_api":{"type":"boolean","description":"Present on `401`s produced by the session/API-key filter. `false` means the supplied `x-api-key` was not recognised."},"statusCode":{"type":"number","description":"Echo of the HTTP status, present on a few permission errors."}}}}},"paths":{"/incidents":{"get":{"operationId":"getIncidents","summary":"Fetch incidents","description":"Get a list of all the incidents for a team.","tags":["Incidents"],"responses":{"200":{"description":"A paginated envelope — NOT a bare array. The response also carries dashboard-only keys (org, integrations, services, escalations, incidentStatuses, *Filtered, totalFilters, featureFlag, jiraConnected, clickupConnected, linearConnected, taskManagementFlag, videoConferencingFlag, helpdeskFlag, meetConnected, zoomConnected, filtersApplied, userIsAuthorizedToTakeActionOnIncidents) that are not part of the supported contract.","content":{"application/json":{"schema":{"type":"object","description":"Envelope object — NOT a bare array.","properties":{"incidents":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"counterId":{"type":"string","description":"Human-facing id, `<teamUid>-<counter>`. Accepted anywhere an incident id is taken."},"message":{"type":"string"},"status":{"type":"string","enum":["NACK","ACK","RES"],"description":"Lifecycle state of the incident. `NACK` = triggered (nobody has acknowledged it yet). `ACK` = acknowledged (a responder is on it). `RES` = resolved. These three literals are the only values the API ever returns or accepts — there is no `triggered`/`acknowledged`/`resolved` spelling."},"priority":{"type":"string","enum":["p1","p2","p3","p4","p5"]},"severity":{"type":"string","enum":["sev1","sev2","sev3"]},"counter":{"type":"number"},"org":{"type":"string"},"teams":{"type":"array","items":{"type":"string"}},"integration":{"type":"object"},"service":{"type":"object"},"escalation":{"type":"object"},"responders":{"type":"array","items":{"type":"object"}},"createdAt":{"type":"string","format":"date-time"},"NACK_at":{"type":"string","format":"date-time"}}}},"totalIncidents":{"type":"number"},"totalOpenIncidents":{"type":"number"},"pagination":{"type":"object","description":"Pagination envelope produced by `lib/pagination.js`.","properties":{"currentPage":{"type":"number"},"totalPages":{"type":"number"},"total":{"type":"number"},"perPage":{"type":"number"},"skip":{"type":"number"},"pages":{"type":"array","items":{"type":"number"}},"showingFrom":{"type":"number"},"showingTill":{"type":"number"}}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"},"description":"Your API key. Find it in your Spike dashboard under Settings > API."},{"name":"x-team-id","in":"header","required":true,"schema":{"type":"string"},"description":"The team's `_id` — a 24-character hex ObjectId, NOT the short `uid` slug. Read it from `GET /teams/get-all-teams`."}]}}}}
```

## Get all incident occurrences

> Fetch all incident occurrences with filtering options for date range, teams, status, service, integration, and pagination.\
> \
> \*\*Query Parameters:\*\*\
> \- \`start\` (required): Start date in ISO 8601 format (e.g., 2026-01-01T00:00:00Z)\
> \- \`end\` (required): End date in ISO 8601 format (e.g., 2026-02-01T23:59:59Z)\
> \- \`teams\`: Comma-separated team IDs\
> \- \`status\`: Comma-separated status values (ACK=Acknowledged, RES=Resolved, NACK=Not Acknowledged)\
> \- \`service\`: Comma-separated service IDs\
> \- \`integration\`: Integration ID\
> \- \`page\`: Page number for pagination (default: 1)\
> \- \`perPage\`: Number of results per page (default: 25, max: 100)\
> \
> \*\*Example:\*\*\
> \`\`\`\
> GET /incidents/all-occurrences?start=2026-01-01T00:00:00Z\&end=2026-02-01T23:59:59Z\&teams=64a1b2c3d4e5f6789012345a\&status=ACK,RES\&page=1\&perPage=25\
> \`\`\`<br>

````json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Incidents","description":"Create and read incidents. Incident `status` is one of `NACK` (triggered), `ACK` (acknowledged) or `RES` (resolved)."}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the `x-api-key` header."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"},"success":{"type":"boolean","description":"Present on the endpoints whose handlers include it (for example the API-key filter and the public on-call routes). Always `false` on an error."},"valid_api":{"type":"boolean","description":"Present on `401`s produced by the session/API-key filter. `false` means the supplied `x-api-key` was not recognised."},"statusCode":{"type":"number","description":"Echo of the HTTP status, present on a few permission errors."}}}}},"paths":{"/incidents/all-occurrences":{"get":{"operationId":"getIncidentsAllOccurrences","summary":"Get all incident occurrences","description":"Fetch all incident occurrences with filtering options for date range, teams, status, service, integration, and pagination.\n\n**Query Parameters:**\n- `start` (required): Start date in ISO 8601 format (e.g., 2026-01-01T00:00:00Z)\n- `end` (required): End date in ISO 8601 format (e.g., 2026-02-01T23:59:59Z)\n- `teams`: Comma-separated team IDs\n- `status`: Comma-separated status values (ACK=Acknowledged, RES=Resolved, NACK=Not Acknowledged)\n- `service`: Comma-separated service IDs\n- `integration`: Integration ID\n- `page`: Page number for pagination (default: 1)\n- `perPage`: Number of results per page (default: 25, max: 100)\n\n**Example:**\n```\nGET /incidents/all-occurrences?start=2026-01-01T00:00:00Z&end=2026-02-01T23:59:59Z&teams=64a1b2c3d4e5f6789012345a&status=ACK,RES&page=1&perPage=25\n```\n","tags":["Incidents"],"parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"},"description":"Your API key. Find it in your Spike dashboard under Settings > API."},{"name":"start","in":"query","required":true,"schema":{"type":"string"},"description":"Start date in ISO 8601 format"},{"name":"end","in":"query","required":true,"schema":{"type":"string"},"description":"End date in ISO 8601 format"},{"name":"teams","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated team IDs (optional)"},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated status values (optional)"},{"name":"service","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated service IDs (optional)"},{"name":"integration","in":"query","required":false,"schema":{"type":"string"},"description":"Integration ID (optional)"},{"name":"page","in":"query","required":false,"schema":{"type":"string"},"description":"Page number for pagination"},{"name":"perPage","in":"query","required":false,"schema":{"type":"string"},"description":"Results per page (default: 25, max: 100)"}],"responses":{"200":{"description":"A bare JSON array of incident occurrences — not wrapped in an envelope.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"counterId":{"type":"string","description":"Human-facing id, `<teamUid>-<counter>`. Accepted anywhere an incident id is taken."},"message":{"type":"string"},"status":{"type":"string","enum":["NACK","ACK","RES"],"description":"Lifecycle state of the incident. `NACK` = triggered (nobody has acknowledged it yet). `ACK` = acknowledged (a responder is on it). `RES` = resolved. These three literals are the only values the API ever returns or accepts — there is no `triggered`/`acknowledged`/`resolved` spelling."},"priority":{"type":"string","enum":["p1","p2","p3","p4","p5"]},"severity":{"type":"string","enum":["sev1","sev2","sev3"]},"counter":{"type":"number"},"org":{"type":"string"},"teams":{"type":"array","items":{"type":"string"}},"integration":{"type":"object"},"service":{"type":"object"},"escalation":{"type":"object"},"responders":{"type":"array","items":{"type":"object"}},"createdAt":{"type":"string","format":"date-time"},"NACK_at":{"type":"string","format":"date-time"}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
````

## Fetch incident info

> Get details of an incident. Includes incident title, metadata, priority, severity, and activity log

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Incidents","description":"Create and read incidents. Incident `status` is one of `NACK` (triggered), `ACK` (acknowledged) or `RES` (resolved)."}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"security":[{"ApiKeyAuth":[],"TeamIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the `x-api-key` header."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"},"success":{"type":"boolean","description":"Present on the endpoints whose handlers include it (for example the API-key filter and the public on-call routes). Always `false` on an error."},"valid_api":{"type":"boolean","description":"Present on `401`s produced by the session/API-key filter. `false` means the supplied `x-api-key` was not recognised."},"statusCode":{"type":"number","description":"Echo of the HTTP status, present on a few permission errors."}}}}},"paths":{"/incidents/{counterId}":{"get":{"operationId":"getIncidentsByCounterId","summary":"Fetch incident info","description":"Get details of an incident. Includes incident title, metadata, priority, severity, and activity log","tags":["Incidents"],"parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"},"description":"Your API key. Find it in your Spike dashboard under Settings > API."},{"name":"x-team-id","in":"header","required":true,"schema":{"type":"string"},"description":"The team's `_id` — a 24-character hex ObjectId, NOT the short `uid` slug. Read it from `GET /teams/get-all-teams`."},{"name":"counterId","in":"path","required":true,"schema":{"type":"string"},"description":"counterId parameter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","description":"Envelope. Additional dashboard-only keys (muteOptions, timeToEndmute, showRepeatedIncidents, featureFlag, *Connected, *FeatureFlag) are also present.","properties":{"org":{"type":"object"},"incident":{"type":"object","properties":{"_id":{"type":"string"},"counterId":{"type":"string","description":"Human-facing id, `<teamUid>-<counter>`. Accepted anywhere an incident id is taken."},"message":{"type":"string"},"status":{"type":"string","enum":["NACK","ACK","RES"],"description":"Lifecycle state of the incident. `NACK` = triggered (nobody has acknowledged it yet). `ACK` = acknowledged (a responder is on it). `RES` = resolved. These three literals are the only values the API ever returns or accepts — there is no `triggered`/`acknowledged`/`resolved` spelling."},"priority":{"type":"string","enum":["p1","p2","p3","p4","p5"]},"severity":{"type":"string","enum":["sev1","sev2","sev3"]},"counter":{"type":"number"},"org":{"type":"string"},"teams":{"type":"array","items":{"type":"string"}},"integration":{"type":"object"},"service":{"type":"object"},"escalation":{"type":"object"},"responders":{"type":"array","items":{"type":"object"}},"createdAt":{"type":"string","format":"date-time"},"NACK_at":{"type":"string","format":"date-time"}}},"duration":{"type":"string"},"metadata":{"type":"object"},"groupedIncident":{"type":"object"},"repeatedIncidents":{"type":"array","items":{"type":"object"}},"comments":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Create an incident

> Creates an incident and sends alerts. The body must contain \`integrationWebhook\` — the integration \`token\` (or its full \`<https://hooks.spike.sh/{token}/push-events\\`> URL). Routing (service and escalation policy) comes from that integration, so this endpoint has NO \`integration\` or \`escalation\` field. \`title\`, \`priority\`, \`severity\` and \`metadata\` are forwarded to the webhook. Omitting \`integrationWebhook\` returns \`422\`.

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Incidents","description":"Create and read incidents. Incident `status` is one of `NACK` (triggered), `ACK` (acknowledged) or `RES` (resolved)."}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"security":[{"ApiKeyAuth":[],"TeamIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the `x-api-key` header."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"},"success":{"type":"boolean","description":"Present on the endpoints whose handlers include it (for example the API-key filter and the public on-call routes). Always `false` on an error."},"valid_api":{"type":"boolean","description":"Present on `401`s produced by the session/API-key filter. `false` means the supplied `x-api-key` was not recognised."},"statusCode":{"type":"number","description":"Echo of the HTTP status, present on a few permission errors."}}}}},"paths":{"/incidents/create":{"post":{"operationId":"postIncidentsCreate","summary":"Create an incident","description":"Creates an incident and sends alerts. The body must contain `integrationWebhook` — the integration `token` (or its full `https://hooks.spike.sh/{token}/push-events` URL). Routing (service and escalation policy) comes from that integration, so this endpoint has NO `integration` or `escalation` field. `title`, `priority`, `severity` and `metadata` are forwarded to the webhook. Omitting `integrationWebhook` returns `422`.","tags":["Incidents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["integrationWebhook"],"description":"The handler only reads `integrationWebhook`; every other field is forwarded verbatim to the integration webhook at `https://hooks.spike.sh/{token}/push-events`, which turns it into the incident. There is no `integration` or `escalation` field on this endpoint — routing is determined by the integration the token belongs to.","properties":{"integrationWebhook":{"type":"string","description":"REQUIRED. The integration `token` (from `GET /integrations`), or the full webhook URL `https://hooks.spike.sh/{token}/push-events`. A bare token is expanded to the full URL. Omitting this returns `422`."},"title":{"type":"string","description":"Incident title. Becomes the incident `message`."},"message":{"type":"string","description":"Alias for `title`."},"metadata":{"type":"object","description":"Arbitrary key/value context attached to the incident."},"priority":{"type":"string","enum":["p1","p2","p3","p4","p5"]},"severity":{"type":"string","enum":["sev1","sev2","sev3"]}}}}}},"responses":{"200":{"description":"The incident as returned by the escalation engine.","content":{"application/json":{"schema":{"type":"object","properties":{"existingIncident":{"type":["object","null"],"description":"Set when the event de-duplicated onto an already-open incident."},"newIncident":{"type":"boolean"},"isSuppressed":{"type":"boolean"},"autoResolved":{"type":"boolean"},"doNotCreateIncident":{"type":"boolean"},"incident":{"type":"object","properties":{"_id":{"type":"string"},"counterId":{"type":"string","description":"Human-facing id, `<teamUid>-<counter>`. Accepted anywhere an incident id is taken."},"message":{"type":"string"},"status":{"type":"string","enum":["NACK","ACK","RES"],"description":"Lifecycle state of the incident. `NACK` = triggered (nobody has acknowledged it yet). `ACK` = acknowledged (a responder is on it). `RES` = resolved. These three literals are the only values the API ever returns or accepts — there is no `triggered`/`acknowledged`/`resolved` spelling."},"priority":{"type":"string","enum":["p1","p2","p3","p4","p5"]},"severity":{"type":"string","enum":["sev1","sev2","sev3"]},"counter":{"type":"number"},"org":{"type":"string"},"teams":{"type":"array","items":{"type":"string"}},"integration":{"type":"object"},"service":{"type":"object"},"escalation":{"type":"object"},"responders":{"type":"array","items":{"type":"object"}},"createdAt":{"type":"string","format":"date-time"},"NACK_at":{"type":"string","format":"date-time"}}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or missing API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`integrationWebhook` was missing from the body. The API key itself was valid.","content":{"application/json":{"schema":{"type":"object","properties":{"valid_api_key":{"type":"boolean"},"integration_webhook":{"type":"string"},"need_help? 👉":{"type":"string"}}}}}}},"parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"},"description":"Your API key. Find it in your Spike dashboard under Settings > API."},{"name":"x-team-id","in":"header","required":true,"schema":{"type":"string"},"description":"The team's `_id` — a 24-character hex ObjectId, NOT the short `uid` slug. Read it from `GET /teams/get-all-teams`."}]}}}}
```

## Fetch previous occurances of an incident

> Fetches previous occurances of an incident.

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Incidents","description":"Create and read incidents. Incident `status` is one of `NACK` (triggered), `ACK` (acknowledged) or `RES` (resolved)."}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"security":[{"ApiKeyAuth":[],"TeamIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the `x-api-key` header."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"},"success":{"type":"boolean","description":"Present on the endpoints whose handlers include it (for example the API-key filter and the public on-call routes). Always `false` on an error."},"valid_api":{"type":"boolean","description":"Present on `401`s produced by the session/API-key filter. `false` means the supplied `x-api-key` was not recognised."},"statusCode":{"type":"number","description":"Echo of the HTTP status, present on a few permission errors."}}}}},"paths":{"/incidents/{counterId}/get-previous-incidents":{"get":{"operationId":"getIncidentsByCounterIdGetPreviousIncidents","summary":"Fetch previous occurances of an incident","description":"Fetches previous occurances of an incident.","tags":["Incidents"],"parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"},"description":"Your API key. Find it in your Spike dashboard under Settings > API."},{"name":"x-team-id","in":"header","required":true,"schema":{"type":"string"},"description":"The team's `_id` — a 24-character hex ObjectId, NOT the short `uid` slug. Read it from `GET /teams/get-all-teams`."},{"name":"counterId","in":"path","required":true,"schema":{"type":"string"},"description":"counterId parameter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"incident":{"type":"object","properties":{"_id":{"type":"string"},"counterId":{"type":"string","description":"Human-facing id, `<teamUid>-<counter>`. Accepted anywhere an incident id is taken."},"message":{"type":"string"},"status":{"type":"string","enum":["NACK","ACK","RES"],"description":"Lifecycle state of the incident. `NACK` = triggered (nobody has acknowledged it yet). `ACK` = acknowledged (a responder is on it). `RES` = resolved. These three literals are the only values the API ever returns or accepts — there is no `triggered`/`acknowledged`/`resolved` spelling."},"priority":{"type":"string","enum":["p1","p2","p3","p4","p5"]},"severity":{"type":"string","enum":["sev1","sev2","sev3"]},"counter":{"type":"number"},"org":{"type":"string"},"teams":{"type":"array","items":{"type":"string"}},"integration":{"type":"object"},"service":{"type":"object"},"escalation":{"type":"object"},"responders":{"type":"array","items":{"type":"object"}},"createdAt":{"type":"string","format":"date-time"},"NACK_at":{"type":"string","format":"date-time"}}},"previousIncidents":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"counterId":{"type":"string","description":"Human-facing id, `<teamUid>-<counter>`. Accepted anywhere an incident id is taken."},"message":{"type":"string"},"status":{"type":"string","enum":["NACK","ACK","RES"],"description":"Lifecycle state of the incident. `NACK` = triggered (nobody has acknowledged it yet). `ACK` = acknowledged (a responder is on it). `RES` = resolved. These three literals are the only values the API ever returns or accepts — there is no `triggered`/`acknowledged`/`resolved` spelling."},"priority":{"type":"string","enum":["p1","p2","p3","p4","p5"]},"severity":{"type":"string","enum":["sev1","sev2","sev3"]},"counter":{"type":"number"},"org":{"type":"string"},"teams":{"type":"array","items":{"type":"string"}},"integration":{"type":"object"},"service":{"type":"object"},"escalation":{"type":"object"},"responders":{"type":"array","items":{"type":"object"}},"createdAt":{"type":"string","format":"date-time"},"NACK_at":{"type":"string","format":"date-time"}}}},"currentPage":{"type":"number"},"perPage":{"type":"number"},"total":{"type":"number"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Fetch a previous occurance of an incident

> Fetches a previous occurance of an incident with it's details.

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Incidents","description":"Create and read incidents. Incident `status` is one of `NACK` (triggered), `ACK` (acknowledged) or `RES` (resolved)."}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"security":[{"ApiKeyAuth":[],"TeamIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the `x-api-key` header."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"},"success":{"type":"boolean","description":"Present on the endpoints whose handlers include it (for example the API-key filter and the public on-call routes). Always `false` on an error."},"valid_api":{"type":"boolean","description":"Present on `401`s produced by the session/API-key filter. `false` means the supplied `x-api-key` was not recognised."},"statusCode":{"type":"number","description":"Echo of the HTTP status, present on a few permission errors."}}}}},"paths":{"/incidents/{counterId}/previous-incident/{_id}":{"get":{"operationId":"getIncidentsByCounterIdPreviousIncidentById","summary":"Fetch a previous occurance of an incident","description":"Fetches a previous occurance of an incident with it's details.","tags":["Incidents"],"parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"},"description":"Your API key. Find it in your Spike dashboard under Settings > API."},{"name":"x-team-id","in":"header","required":true,"schema":{"type":"string"},"description":"The team's `_id` — a 24-character hex ObjectId, NOT the short `uid` slug. Read it from `GET /teams/get-all-teams`."},{"name":"counterId","in":"path","required":true,"schema":{"type":"string"},"description":"counterId parameter"},{"name":"_id","in":"path","required":true,"schema":{"type":"string"},"description":"_id parameter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"org":{"type":"object"},"incident":{"type":"object","properties":{"_id":{"type":"string"},"counterId":{"type":"string","description":"Human-facing id, `<teamUid>-<counter>`. Accepted anywhere an incident id is taken."},"message":{"type":"string"},"status":{"type":"string","enum":["NACK","ACK","RES"],"description":"Lifecycle state of the incident. `NACK` = triggered (nobody has acknowledged it yet). `ACK` = acknowledged (a responder is on it). `RES` = resolved. These three literals are the only values the API ever returns or accepts — there is no `triggered`/`acknowledged`/`resolved` spelling."},"priority":{"type":"string","enum":["p1","p2","p3","p4","p5"]},"severity":{"type":"string","enum":["sev1","sev2","sev3"]},"counter":{"type":"number"},"org":{"type":"string"},"teams":{"type":"array","items":{"type":"string"}},"integration":{"type":"object"},"service":{"type":"object"},"escalation":{"type":"object"},"responders":{"type":"array","items":{"type":"object"}},"createdAt":{"type":"string","format":"date-time"},"NACK_at":{"type":"string","format":"date-time"}}},"duration":{"type":"string"},"metadata":{"type":"object"},"groupedIncident":{"type":"object"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Add responder to an incident

> Add a responder to an incident. Accepts an array of incident counterIds (\*116, prim-122\*) and user ids.

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Incidents","description":"Create and read incidents. Incident `status` is one of `NACK` (triggered), `ACK` (acknowledged) or `RES` (resolved)."}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"security":[{"ApiKeyAuth":[],"TeamIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the `x-api-key` header."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"},"success":{"type":"boolean","description":"Present on the endpoints whose handlers include it (for example the API-key filter and the public on-call routes). Always `false` on an error."},"valid_api":{"type":"boolean","description":"Present on `401`s produced by the session/API-key filter. `false` means the supplied `x-api-key` was not recognised."},"statusCode":{"type":"number","description":"Echo of the HTTP status, present on a few permission errors."}}}}},"paths":{"/incidents/reassign":{"post":{"operationId":"postIncidentsReassign","summary":"Add responder to an incident","description":"Add a responder to an incident. Accepts an array of incident counterIds (*116, prim-122*) and user ids.","tags":["Incidents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["ids","user"],"description":"`ids` is an ARRAY of incident `counterId`s or `_id`s. Also answers on `/incidents/reassign/multi`.","properties":{"ids":{"type":"array","items":{"type":"string"}},"user":{"type":"string","description":"The User `_id` of the responder. Must belong to your organisation."}}}}}},"responses":{"200":{"description":"On success `{ reassigned: true }`. When the user is already a responder the handler still answers `200` but with `{ reassigned: false, alreadyAssigned: true, message }`.","content":{"application/json":{"schema":{"type":"object","properties":{"reassigned":{"type":"boolean"},"alreadyAssigned":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"description":"The `user` was not found in your organisation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"},"description":"Your API key. Find it in your Spike dashboard under Settings > API."},{"name":"x-team-id","in":"header","required":true,"schema":{"type":"string"},"description":"The team's `_id` — a 24-character hex ObjectId, NOT the short `uid` slug. Read it from `GET /teams/get-all-teams`."}]}}}}
```

## Fetch incident context

> Fetches an overview of an incident

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Incidents","description":"Create and read incidents. Incident `status` is one of `NACK` (triggered), `ACK` (acknowledged) or `RES` (resolved)."}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"security":[{"ApiKeyAuth":[],"TeamIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the `x-api-key` header."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"},"success":{"type":"boolean","description":"Present on the endpoints whose handlers include it (for example the API-key filter and the public on-call routes). Always `false` on an error."},"valid_api":{"type":"boolean","description":"Present on `401`s produced by the session/API-key filter. `false` means the supplied `x-api-key` was not recognised."},"statusCode":{"type":"number","description":"Echo of the HTTP status, present on a few permission errors."}}}}},"paths":{"/incidents/{counterId}/incident-context":{"get":{"operationId":"getIncidentsByCounterIdIncidentContext","summary":"Fetch incident context","description":"Fetches an overview of an incident","tags":["Incidents"],"parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"},"description":"Your API key. Find it in your Spike dashboard under Settings > API."},{"name":"x-team-id","in":"header","required":true,"schema":{"type":"string"},"description":"The team's `_id` — a 24-character hex ObjectId, NOT the short `uid` slug. Read it from `GET /teams/get-all-teams`."},{"name":"counterId","in":"path","required":true,"schema":{"type":"string"},"description":"counterId parameter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"incident":{"type":"object","properties":{"_id":{"type":"string"},"counterId":{"type":"string","description":"Human-facing id, `<teamUid>-<counter>`. Accepted anywhere an incident id is taken."},"message":{"type":"string"},"status":{"type":"string","enum":["NACK","ACK","RES"],"description":"Lifecycle state of the incident. `NACK` = triggered (nobody has acknowledged it yet). `ACK` = acknowledged (a responder is on it). `RES` = resolved. These three literals are the only values the API ever returns or accepts — there is no `triggered`/`acknowledged`/`resolved` spelling."},"priority":{"type":"string","enum":["p1","p2","p3","p4","p5"]},"severity":{"type":"string","enum":["sev1","sev2","sev3"]},"counter":{"type":"number"},"org":{"type":"string"},"teams":{"type":"array","items":{"type":"string"}},"integration":{"type":"object"},"service":{"type":"object"},"escalation":{"type":"object"},"responders":{"type":"array","items":{"type":"object"}},"createdAt":{"type":"string","format":"date-time"},"NACK_at":{"type":"string","format":"date-time"}}},"duration":{"type":"string"},"groupedIncident":{"type":"object"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Fetch incident activity log

> Get the activity log for an incident

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Incidents","description":"Create and read incidents. Incident `status` is one of `NACK` (triggered), `ACK` (acknowledged) or `RES` (resolved)."}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"security":[{"ApiKeyAuth":[],"TeamIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the `x-api-key` header."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"},"success":{"type":"boolean","description":"Present on the endpoints whose handlers include it (for example the API-key filter and the public on-call routes). Always `false` on an error."},"valid_api":{"type":"boolean","description":"Present on `401`s produced by the session/API-key filter. `false` means the supplied `x-api-key` was not recognised."},"statusCode":{"type":"number","description":"Echo of the HTTP status, present on a few permission errors."}}}}},"paths":{"/incidents/{counterId}/activity-log":{"get":{"operationId":"getIncidentsByCounterIdActivityLog","summary":"Fetch incident activity log","description":"Get the activity log for an incident","tags":["Incidents"],"parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"},"description":"Your API key. Find it in your Spike dashboard under Settings > API."},{"name":"x-team-id","in":"header","required":true,"schema":{"type":"string"},"description":"The team's `_id` — a 24-character hex ObjectId, NOT the short `uid` slug. Read it from `GET /teams/get-all-teams`."},{"name":"counterId","in":"path","required":true,"schema":{"type":"string"},"description":"The incident `counterId`, e.g. `eng-116`."}],"responses":{"200":{"description":"An envelope of `{ incident, activities }` — NOT a bare array of activities.","content":{"application/json":{"schema":{"type":"object","properties":{"incident":{"type":"object","description":"Only these three fields are returned.","properties":{"counterId":{"type":"string"},"_id":{"type":"string"},"message":{"type":"string"}}},"activities":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"parent":{"type":"string"},"child":{"type":"string"},"message":{"type":"string"},"user":{"type":["object","null"]},"NACK_at":{"type":"string","description":"Display-formatted timestamp (moment `llll`) in the caller's timezone when one is set — not ISO 8601."}}}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Remove responder from an incident

> Remove a responder from an incident. Accepts an array of incident counterIds (\*116, prim-122\*) and user ids.

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Incidents","description":"Create and read incidents. Incident `status` is one of `NACK` (triggered), `ACK` (acknowledged) or `RES` (resolved)."}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"security":[{"ApiKeyAuth":[],"TeamIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the `x-api-key` header."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"},"success":{"type":"boolean","description":"Present on the endpoints whose handlers include it (for example the API-key filter and the public on-call routes). Always `false` on an error."},"valid_api":{"type":"boolean","description":"Present on `401`s produced by the session/API-key filter. `false` means the supplied `x-api-key` was not recognised."},"statusCode":{"type":"number","description":"Echo of the HTTP status, present on a few permission errors."}}}}},"paths":{"/incidents/remove-responder":{"post":{"operationId":"postIncidentsRemoveResponder","summary":"Remove responder from an incident","description":"Remove a responder from an incident. Accepts an array of incident counterIds (*116, prim-122*) and user ids.","tags":["Incidents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["ids","user"],"description":"`ids` is an ARRAY of incident `counterId`s or `_id`s. Also answers on `/incidents/remove-responder/multi`.","properties":{"ids":{"type":"array","items":{"type":"string"}},"user":{"type":"string","description":"The User `_id` of the responder. Must belong to your organisation."}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"boolean"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"},"description":"Your API key. Find it in your Spike dashboard under Settings > API."},{"name":"x-team-id","in":"header","required":true,"schema":{"type":"string"},"description":"The team's `_id` — a 24-character hex ObjectId, NOT the short `uid` slug. Read it from `GET /teams/get-all-teams`."}]}}}}
```

## GET /incidents/acknowledged

> Fetch all the acknowledged incidents

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Incidents","description":"Create and read incidents. Incident `status` is one of `NACK` (triggered), `ACK` (acknowledged) or `RES` (resolved)."}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"security":[{"ApiKeyAuth":[],"TeamIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the `x-api-key` header."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"},"success":{"type":"boolean","description":"Present on the endpoints whose handlers include it (for example the API-key filter and the public on-call routes). Always `false` on an error."},"valid_api":{"type":"boolean","description":"Present on `401`s produced by the session/API-key filter. `false` means the supplied `x-api-key` was not recognised."},"statusCode":{"type":"number","description":"Echo of the HTTP status, present on a few permission errors."}}}}},"paths":{"/incidents/acknowledged":{"get":{"operationId":"getIncidentsAcknowledged","summary":"Fetch all the acknowledged incidents","tags":["Incidents"],"responses":{"200":{"description":"A bare JSON array of acknowledged incidents.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"counterId":{"type":"string","description":"Human-facing id, `<teamUid>-<counter>`. Accepted anywhere an incident id is taken."},"message":{"type":"string"},"status":{"type":"string","enum":["NACK","ACK","RES"],"description":"Lifecycle state of the incident. `NACK` = triggered (nobody has acknowledged it yet). `ACK` = acknowledged (a responder is on it). `RES` = resolved. These three literals are the only values the API ever returns or accepts — there is no `triggered`/`acknowledged`/`resolved` spelling."},"priority":{"type":"string","enum":["p1","p2","p3","p4","p5"]},"severity":{"type":"string","enum":["sev1","sev2","sev3"]},"counter":{"type":"number"},"org":{"type":"string"},"teams":{"type":"array","items":{"type":"string"}},"integration":{"type":"object"},"service":{"type":"object"},"escalation":{"type":"object"},"responders":{"type":"array","items":{"type":"object"}},"createdAt":{"type":"string","format":"date-time"},"NACK_at":{"type":"string","format":"date-time"}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"},"description":"Your API key. Find it in your Spike dashboard under Settings > API."},{"name":"x-team-id","in":"header","required":true,"schema":{"type":"string"},"description":"The team's `_id` — a 24-character hex ObjectId, NOT the short `uid` slug. Read it from `GET /teams/get-all-teams`."}]}}}}
```

## GET /incidents/triggered

> Fetch all the triggered incidents

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Incidents","description":"Create and read incidents. Incident `status` is one of `NACK` (triggered), `ACK` (acknowledged) or `RES` (resolved)."}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"security":[{"ApiKeyAuth":[],"TeamIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the `x-api-key` header."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"},"success":{"type":"boolean","description":"Present on the endpoints whose handlers include it (for example the API-key filter and the public on-call routes). Always `false` on an error."},"valid_api":{"type":"boolean","description":"Present on `401`s produced by the session/API-key filter. `false` means the supplied `x-api-key` was not recognised."},"statusCode":{"type":"number","description":"Echo of the HTTP status, present on a few permission errors."}}}}},"paths":{"/incidents/triggered":{"get":{"operationId":"getIncidentsTriggered","summary":"Fetch all the triggered incidents","tags":["Incidents"],"responses":{"200":{"description":"A bare JSON array of triggered (`NACK`) incidents.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"counterId":{"type":"string","description":"Human-facing id, `<teamUid>-<counter>`. Accepted anywhere an incident id is taken."},"message":{"type":"string"},"status":{"type":"string","enum":["NACK","ACK","RES"],"description":"Lifecycle state of the incident. `NACK` = triggered (nobody has acknowledged it yet). `ACK` = acknowledged (a responder is on it). `RES` = resolved. These three literals are the only values the API ever returns or accepts — there is no `triggered`/`acknowledged`/`resolved` spelling."},"priority":{"type":"string","enum":["p1","p2","p3","p4","p5"]},"severity":{"type":"string","enum":["sev1","sev2","sev3"]},"counter":{"type":"number"},"org":{"type":"string"},"teams":{"type":"array","items":{"type":"string"}},"integration":{"type":"object"},"service":{"type":"object"},"escalation":{"type":"object"},"responders":{"type":"array","items":{"type":"object"}},"createdAt":{"type":"string","format":"date-time"},"NACK_at":{"type":"string","format":"date-time"}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"},"description":"Your API key. Find it in your Spike dashboard under Settings > API."},{"name":"x-team-id","in":"header","required":true,"schema":{"type":"string"},"description":"The team's `_id` — a 24-character hex ObjectId, NOT the short `uid` slug. Read it from `GET /teams/get-all-teams`."}]}}}}
```

## GET /incidents/assigned-to-user

> Fetch incidents assigned to a user

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Incidents","description":"Create and read incidents. Incident `status` is one of `NACK` (triggered), `ACK` (acknowledged) or `RES` (resolved)."}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"security":[{"ApiKeyAuth":[],"TeamIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the `x-api-key` header."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"},"success":{"type":"boolean","description":"Present on the endpoints whose handlers include it (for example the API-key filter and the public on-call routes). Always `false` on an error."},"valid_api":{"type":"boolean","description":"Present on `401`s produced by the session/API-key filter. `false` means the supplied `x-api-key` was not recognised."},"statusCode":{"type":"number","description":"Echo of the HTTP status, present on a few permission errors."}}}}},"paths":{"/incidents/assigned-to-user":{"get":{"operationId":"getIncidentsAssignedToUser","summary":"Fetch incidents assigned to a user","tags":["Incidents"],"parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"},"description":"Your API key. Find it in your Spike dashboard under Settings > API."},{"name":"x-team-id","in":"header","required":true,"schema":{"type":"string"},"description":"The team's `_id` — a 24-character hex ObjectId, NOT the short `uid` slug. Read it from `GET /teams/get-all-teams`."},{"name":"id","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"assignedIncidents":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"counterId":{"type":"string","description":"Human-facing id, `<teamUid>-<counter>`. Accepted anywhere an incident id is taken."},"message":{"type":"string"},"status":{"type":"string","enum":["NACK","ACK","RES"],"description":"Lifecycle state of the incident. `NACK` = triggered (nobody has acknowledged it yet). `ACK` = acknowledged (a responder is on it). `RES` = resolved. These three literals are the only values the API ever returns or accepts — there is no `triggered`/`acknowledged`/`resolved` spelling."},"priority":{"type":"string","enum":["p1","p2","p3","p4","p5"]},"severity":{"type":"string","enum":["sev1","sev2","sev3"]},"counter":{"type":"number"},"org":{"type":"string"},"teams":{"type":"array","items":{"type":"string"}},"integration":{"type":"object"},"service":{"type":"object"},"escalation":{"type":"object"},"responders":{"type":"array","items":{"type":"object"}},"createdAt":{"type":"string","format":"date-time"},"NACK_at":{"type":"string","format":"date-time"}}}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Fetch incident bar overview

> Get an overview of the incidents in the team. This includes the total number of incidents, number of open incidents and the number of incidents assigned

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Incidents","description":"Create and read incidents. Incident `status` is one of `NACK` (triggered), `ACK` (acknowledged) or `RES` (resolved)."}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"security":[{"ApiKeyAuth":[],"TeamIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the `x-api-key` header."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"},"success":{"type":"boolean","description":"Present on the endpoints whose handlers include it (for example the API-key filter and the public on-call routes). Always `false` on an error."},"valid_api":{"type":"boolean","description":"Present on `401`s produced by the session/API-key filter. `false` means the supplied `x-api-key` was not recognised."},"statusCode":{"type":"number","description":"Echo of the HTTP status, present on a few permission errors."}}}}},"paths":{"/incidents/overview":{"get":{"operationId":"getIncidentsOverview","summary":"Fetch incident bar overview","description":"Get an overview of the incidents in the team. This includes the total number of incidents, number of open incidents and the number of incidents assigned","tags":["Incidents"],"parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"},"description":"Your API key. Find it in your Spike dashboard under Settings > API."},{"name":"x-team-id","in":"header","required":true,"schema":{"type":"string"},"description":"The team's `_id` — a 24-character hex ObjectId, NOT the short `uid` slug. Read it from `GET /teams/get-all-teams`."},{"name":"id","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"incidentsAssignedToYou":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"counterId":{"type":"string","description":"Human-facing id, `<teamUid>-<counter>`. Accepted anywhere an incident id is taken."},"message":{"type":"string"},"status":{"type":"string","enum":["NACK","ACK","RES"],"description":"Lifecycle state of the incident. `NACK` = triggered (nobody has acknowledged it yet). `ACK` = acknowledged (a responder is on it). `RES` = resolved. These three literals are the only values the API ever returns or accepts — there is no `triggered`/`acknowledged`/`resolved` spelling."},"priority":{"type":"string","enum":["p1","p2","p3","p4","p5"]},"severity":{"type":"string","enum":["sev1","sev2","sev3"]},"counter":{"type":"number"},"org":{"type":"string"},"teams":{"type":"array","items":{"type":"string"}},"integration":{"type":"object"},"service":{"type":"object"},"escalation":{"type":"object"},"responders":{"type":"array","items":{"type":"object"}},"createdAt":{"type":"string","format":"date-time"},"NACK_at":{"type":"string","format":"date-time"}}}},"triggeredIncidents":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"counterId":{"type":"string","description":"Human-facing id, `<teamUid>-<counter>`. Accepted anywhere an incident id is taken."},"message":{"type":"string"},"status":{"type":"string","enum":["NACK","ACK","RES"],"description":"Lifecycle state of the incident. `NACK` = triggered (nobody has acknowledged it yet). `ACK` = acknowledged (a responder is on it). `RES` = resolved. These three literals are the only values the API ever returns or accepts — there is no `triggered`/`acknowledged`/`resolved` spelling."},"priority":{"type":"string","enum":["p1","p2","p3","p4","p5"]},"severity":{"type":"string","enum":["sev1","sev2","sev3"]},"counter":{"type":"number"},"org":{"type":"string"},"teams":{"type":"array","items":{"type":"string"}},"integration":{"type":"object"},"service":{"type":"object"},"escalation":{"type":"object"},"responders":{"type":"array","items":{"type":"object"}},"createdAt":{"type":"string","format":"date-time"},"NACK_at":{"type":"string","format":"date-time"}}}},"acknowledgedIncidents":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"counterId":{"type":"string","description":"Human-facing id, `<teamUid>-<counter>`. Accepted anywhere an incident id is taken."},"message":{"type":"string"},"status":{"type":"string","enum":["NACK","ACK","RES"],"description":"Lifecycle state of the incident. `NACK` = triggered (nobody has acknowledged it yet). `ACK` = acknowledged (a responder is on it). `RES` = resolved. These three literals are the only values the API ever returns or accepts — there is no `triggered`/`acknowledged`/`resolved` spelling."},"priority":{"type":"string","enum":["p1","p2","p3","p4","p5"]},"severity":{"type":"string","enum":["sev1","sev2","sev3"]},"counter":{"type":"number"},"org":{"type":"string"},"teams":{"type":"array","items":{"type":"string"}},"integration":{"type":"object"},"service":{"type":"object"},"escalation":{"type":"object"},"responders":{"type":"array","items":{"type":"object"}},"createdAt":{"type":"string","format":"date-time"},"NACK_at":{"type":"string","format":"date-time"}}}},"affectedServices":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```
