curl --request PUT \
--url https://sreagent.app/api/v1/config/outbound_configs/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"api_key": "<string>",
"base_url": "<string>",
"default_severity_mapping": {},
"enabled": true,
"name": "<string>",
"oncall_schedule_id": "<string>",
"priority": 123,
"routing_key": "<string>",
"slack_channel": "<string>"
}
'import requests
url = "https://sreagent.app/api/v1/config/outbound_configs/{id}"
payload = {
"api_key": "<string>",
"base_url": "<string>",
"default_severity_mapping": {},
"enabled": True,
"name": "<string>",
"oncall_schedule_id": "<string>",
"priority": 123,
"routing_key": "<string>",
"slack_channel": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
api_key: '<string>',
base_url: '<string>',
default_severity_mapping: {},
enabled: true,
name: '<string>',
oncall_schedule_id: '<string>',
priority: 123,
routing_key: '<string>',
slack_channel: '<string>'
})
};
fetch('https://sreagent.app/api/v1/config/outbound_configs/{id}', 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://sreagent.app/api/v1/config/outbound_configs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'api_key' => '<string>',
'base_url' => '<string>',
'default_severity_mapping' => [
],
'enabled' => true,
'name' => '<string>',
'oncall_schedule_id' => '<string>',
'priority' => 123,
'routing_key' => '<string>',
'slack_channel' => '<string>'
]),
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://sreagent.app/api/v1/config/outbound_configs/{id}"
payload := strings.NewReader("{\n \"api_key\": \"<string>\",\n \"base_url\": \"<string>\",\n \"default_severity_mapping\": {},\n \"enabled\": true,\n \"name\": \"<string>\",\n \"oncall_schedule_id\": \"<string>\",\n \"priority\": 123,\n \"routing_key\": \"<string>\",\n \"slack_channel\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://sreagent.app/api/v1/config/outbound_configs/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"api_key\": \"<string>\",\n \"base_url\": \"<string>\",\n \"default_severity_mapping\": {},\n \"enabled\": true,\n \"name\": \"<string>\",\n \"oncall_schedule_id\": \"<string>\",\n \"priority\": 123,\n \"routing_key\": \"<string>\",\n \"slack_channel\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sreagent.app/api/v1/config/outbound_configs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_key\": \"<string>\",\n \"base_url\": \"<string>\",\n \"default_severity_mapping\": {},\n \"enabled\": true,\n \"name\": \"<string>\",\n \"oncall_schedule_id\": \"<string>\",\n \"priority\": 123,\n \"routing_key\": \"<string>\",\n \"slack_channel\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"message": "<string>"
}Update an outbound config
Change one target, named by the id list_outbound_configs reports; omitted fields keep their value. An omitted api_key or routing_key keeps the stored token, and an empty one is refused rather than read as a way to remove it.
curl --request PUT \
--url https://sreagent.app/api/v1/config/outbound_configs/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"api_key": "<string>",
"base_url": "<string>",
"default_severity_mapping": {},
"enabled": true,
"name": "<string>",
"oncall_schedule_id": "<string>",
"priority": 123,
"routing_key": "<string>",
"slack_channel": "<string>"
}
'import requests
url = "https://sreagent.app/api/v1/config/outbound_configs/{id}"
payload = {
"api_key": "<string>",
"base_url": "<string>",
"default_severity_mapping": {},
"enabled": True,
"name": "<string>",
"oncall_schedule_id": "<string>",
"priority": 123,
"routing_key": "<string>",
"slack_channel": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
api_key: '<string>',
base_url: '<string>',
default_severity_mapping: {},
enabled: true,
name: '<string>',
oncall_schedule_id: '<string>',
priority: 123,
routing_key: '<string>',
slack_channel: '<string>'
})
};
fetch('https://sreagent.app/api/v1/config/outbound_configs/{id}', 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://sreagent.app/api/v1/config/outbound_configs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'api_key' => '<string>',
'base_url' => '<string>',
'default_severity_mapping' => [
],
'enabled' => true,
'name' => '<string>',
'oncall_schedule_id' => '<string>',
'priority' => 123,
'routing_key' => '<string>',
'slack_channel' => '<string>'
]),
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://sreagent.app/api/v1/config/outbound_configs/{id}"
payload := strings.NewReader("{\n \"api_key\": \"<string>\",\n \"base_url\": \"<string>\",\n \"default_severity_mapping\": {},\n \"enabled\": true,\n \"name\": \"<string>\",\n \"oncall_schedule_id\": \"<string>\",\n \"priority\": 123,\n \"routing_key\": \"<string>\",\n \"slack_channel\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://sreagent.app/api/v1/config/outbound_configs/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"api_key\": \"<string>\",\n \"base_url\": \"<string>\",\n \"default_severity_mapping\": {},\n \"enabled\": true,\n \"name\": \"<string>\",\n \"oncall_schedule_id\": \"<string>\",\n \"priority\": 123,\n \"routing_key\": \"<string>\",\n \"slack_channel\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sreagent.app/api/v1/config/outbound_configs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_key\": \"<string>\",\n \"base_url\": \"<string>\",\n \"default_severity_mapping\": {},\n \"enabled\": true,\n \"name\": \"<string>\",\n \"oncall_schedule_id\": \"<string>\",\n \"priority\": 123,\n \"routing_key\": \"<string>\",\n \"slack_channel\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"message": "<string>"
}Authorizations
An sre_ak_* API key holding the api:admin scope (or api:config_read, which every write refuses with read_only_key).
Path Parameters
The resource's id.
Body
The bearer token for a webhook or a Grafana target. Write-only: it is never answered by any tool here, an omitted one keeps the stored token, and an empty one is refused rather than read as a way to remove it. To remove it, delete the target.
Where to send the calls: the endpoint for a webhook target, the Grafana instance for a Grafana one. PagerDuty does not use it. null clears it.
What each of this platform's severities is called at the provider, for PagerDuty. A severity this does not name uses the built-in mapping, and null means every one of them does.
Whether this target may be escalated to at all. A disabled row keeps its tokens and its rules and is skipped.
What this target is called here, unique within the organization. It is a label for the people reading the list, not anything the provider sees.
The schedule (by its uuid, as list_oncall_schedules answers it) an oncall_schedule target pages. It must belong to this organization. Required while provider_type is oncall_schedule and refused for every other provider, on the same terms as slack_channel: who is paged is resolved fresh from this schedule's roster and overrides at the moment of each page (Slack DM when the person on call has a linked account, email otherwise), never cached, and a schedule with nobody currently on call is a failed page rather than a silent one.
The order this organization's targets are tried in, lowest first. At least 1.
Which system this target reaches: pagerduty, grafana, webhook, slack, oncall_schedule.
pagerduty, grafana, webhook, slack, oncall_schedule The PagerDuty Events integration key. Write-only on the same terms as api_key, which PagerDuty falls back to when this is not set.
The channel a Slack target's pages open in, like #oncall. Required while provider_type is slack and refused for every other provider, so the channel cannot be removed on a Slack target: converting the target to another provider_type is what clears it, and the stored channel goes with that conversion. The target pages in this organization's own connected workspace: no token is stored here, and an acknowledged or resolved alert rewrites the page it already posted rather than adding a message.
Response
Updated.

