Respond
Respond to an escalation.
An API key can acknowledge or snooze an escalation on its own, and the response is attributed to the key.
To respond as one of your users instead, set the X-Incident-User header to their user ID. This needs the api_keys.act_on_behalf_of_users scope. Declining (“nack”) means “I personally can’t take this page”, so it’s only available this way.
To use this API, you will need an API key with the “Create and manage escalations” permission.
POST
/
v2
/
escalations
/
{escalation_id}
/
actions
/
respond
Respond
curl --request POST \
--url https://api.incident.io/v2/escalations/{escalation_id}/actions/respond \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"response": "ack",
"snooze_details": {
"reason": "Waiting for deployment to complete",
"snooze_until": "2025-01-01T12:00:00Z"
}
}
'import requests
url = "https://api.incident.io/v2/escalations/{escalation_id}/actions/respond"
payload = {
"response": "ack",
"snooze_details": {
"reason": "Waiting for deployment to complete",
"snooze_until": "2025-01-01T12:00:00Z"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
response: 'ack',
snooze_details: {
reason: 'Waiting for deployment to complete',
snooze_until: '2025-01-01T12:00:00Z'
}
})
};
fetch('https://api.incident.io/v2/escalations/{escalation_id}/actions/respond', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.incident.io/v2/escalations/{escalation_id}/actions/respond",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'response' => 'ack',
'snooze_details' => [
'reason' => 'Waiting for deployment to complete',
'snooze_until' => '2025-01-01T12:00:00Z'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.incident.io/v2/escalations/{escalation_id}/actions/respond"
payload := strings.NewReader("{\n \"response\": \"ack\",\n \"snooze_details\": {\n \"reason\": \"Waiting for deployment to complete\",\n \"snooze_until\": \"2025-01-01T12:00:00Z\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.incident.io/v2/escalations/{escalation_id}/actions/respond")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"response\": \"ack\",\n \"snooze_details\": {\n \"reason\": \"Waiting for deployment to complete\",\n \"snooze_until\": \"2025-01-01T12:00:00Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.incident.io/v2/escalations/{escalation_id}/actions/respond")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"response\": \"ack\",\n \"snooze_details\": {\n \"reason\": \"Waiting for deployment to complete\",\n \"snooze_until\": \"2025-01-01T12:00:00Z\"\n }\n}"
response = http.request(request)
puts response.read_body🔑 Requires the
escalations.respond scope.Authorizations
API key from your incident.io dashboard (Settings → API keys)
Path Parameters
The ID of the escalation
Example:
"01G0J1EXE7AXZ2C93K61WBPYEH"
Body
application/json
Response
200
OK response.
Was this page helpful?
Respond
curl --request POST \
--url https://api.incident.io/v2/escalations/{escalation_id}/actions/respond \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"response": "ack",
"snooze_details": {
"reason": "Waiting for deployment to complete",
"snooze_until": "2025-01-01T12:00:00Z"
}
}
'import requests
url = "https://api.incident.io/v2/escalations/{escalation_id}/actions/respond"
payload = {
"response": "ack",
"snooze_details": {
"reason": "Waiting for deployment to complete",
"snooze_until": "2025-01-01T12:00:00Z"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
response: 'ack',
snooze_details: {
reason: 'Waiting for deployment to complete',
snooze_until: '2025-01-01T12:00:00Z'
}
})
};
fetch('https://api.incident.io/v2/escalations/{escalation_id}/actions/respond', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.incident.io/v2/escalations/{escalation_id}/actions/respond",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'response' => 'ack',
'snooze_details' => [
'reason' => 'Waiting for deployment to complete',
'snooze_until' => '2025-01-01T12:00:00Z'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.incident.io/v2/escalations/{escalation_id}/actions/respond"
payload := strings.NewReader("{\n \"response\": \"ack\",\n \"snooze_details\": {\n \"reason\": \"Waiting for deployment to complete\",\n \"snooze_until\": \"2025-01-01T12:00:00Z\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.incident.io/v2/escalations/{escalation_id}/actions/respond")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"response\": \"ack\",\n \"snooze_details\": {\n \"reason\": \"Waiting for deployment to complete\",\n \"snooze_until\": \"2025-01-01T12:00:00Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.incident.io/v2/escalations/{escalation_id}/actions/respond")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"response\": \"ack\",\n \"snooze_details\": {\n \"reason\": \"Waiting for deployment to complete\",\n \"snooze_until\": \"2025-01-01T12:00:00Z\"\n }\n}"
response = http.request(request)
puts response.read_body