> 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

## 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"}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"paths":{"/incidents":{"get":{"summary":"Fetch incidents","description":"Get a list of all the incidents for a team.","tags":["Incidents"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"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":"Team ID of the team you are making the request to."}]}}},"components":{"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"}}}}}}
```

## 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"}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"paths":{"/incidents/all-occurrences":{"get":{"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":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"}}}}}}
````

## 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"}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"paths":{"/incidents/{counterId}":{"get":{"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":"Team ID of the team you are making the request to."},{"name":"counterId","in":"path","required":true,"schema":{"type":"string"},"description":"counterId parameter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"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"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"}}}}}}
```

## Create an incident

> Creates an incident and send alerts. Accepts escalation \`\_id\`, integration \`token\` along with priority and severity. You can send additional metadata in details

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Incidents"}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"paths":{"/incidents/create":{"post":{"summary":"Create an incident","description":"Creates an incident and send alerts. Accepts escalation `_id`, integration `token` along with priority and severity. You can send additional metadata in details","tags":["Incidents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"metadata":{"type":"object"},"escalation":{"type":"string"},"integration":{"type":"string"},"priority":{"type":"enum","enum":["p1","p2","p3","p4","p5"]},"severity":{"type":"enum","enum":["sev1","sev2","sev3"]}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"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":"Team ID of the team you are making the request to."}]}}},"components":{"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"}}}}}}
```

## 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"}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"paths":{"/incidents/{counterId}/get-previous-incidents":{"get":{"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":"Team ID of the team you are making the request to."},{"name":"counterId","in":"path","required":true,"schema":{"type":"string"},"description":"counterId parameter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"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"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"}}}}}}
```

## 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"}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"paths":{"/incidents/{counterId}/previous-incident/{_id}":{"get":{"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":"Team ID of the team you are making the request to."},{"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"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"}}}}}}
```

## 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"}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"paths":{"/incidents/reassign":{"post":{"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","properties":{"ids":{"type":"array","items":{"type":"string"}},"assigneeIds":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"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":"Team ID of the team you are making the request to."}]}}},"components":{"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"}}}}}}
```

## 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"}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"paths":{"/incidents/{counterId}/incident-context":{"get":{"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":"Team ID of the team you are making the request to."},{"name":"counterId","in":"path","required":true,"schema":{"type":"string"},"description":"counterId parameter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"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"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"}}}}}}
```

## 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"}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"paths":{"/incidents/{counter_id}/activity-log":{"get":{"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":"Team ID of the team you are making the request to."},{"name":"counter_id","in":"path","required":true,"schema":{"type":"string"},"description":"counter_id parameter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"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"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"}}}}}}
```

## 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"}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"paths":{"/incidents/remove-responder":{"post":{"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","properties":{"ids":{"type":"array","items":{"type":"string"}},"assigneeIds":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"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":"Team ID of the team you are making the request to."}]}}},"components":{"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"}}}}}}
```

## GET /incidents/acknowledged

> Fetch all the acknowledged incidents

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Incidents"}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"paths":{"/incidents/acknowledged":{"get":{"summary":"Fetch all the acknowledged incidents","tags":["Incidents"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"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":"Team ID of the team you are making the request to."}]}}},"components":{"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"}}}}}}
```

## GET /incidents/triggered

> Fetch all the triggered incidents

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Incidents"}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"paths":{"/incidents/triggered":{"get":{"summary":"Fetch all the triggered incidents","tags":["Incidents"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"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":"Team ID of the team you are making the request to."}]}}},"components":{"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"}}}}}}
```

## 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"}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"paths":{"/incidents/assigned-to-user":{"get":{"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":"Team ID of the team you are making the request to."},{"name":"id","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"}}}}}}
```

## 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"}],"servers":[{"url":"https://api.spike.sh","description":"API server"}],"paths":{"/incidents/overview":{"get":{"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":"Team ID of the team you are making the request to."},{"name":"id","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.spike.sh/spike-api-docs/incidents.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
