Update
Update the details of a custom field
PUT
/
v2
/
custom_fields
/
{id}
Update
curl --request PUT \
--url https://api.incident.io/v2/custom_fields/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Which team is impacted by this issue",
"filter_by": {
"catalog_attribute_id": "01H2FW182TAH0NHEVBY34SCAK0",
"custom_field_id": "01H2FW182TAH0NHEVBY34SCAK0"
},
"fixed_filter": {
"catalog_attribute_id": "01H2FW182TAH0NHEVBY34SCAK0",
"values": [
"01H2FW182TAH0NHEVBY34SCAK0",
"01H2FW182TAH0NHEVBY34SCAK1"
]
},
"group_by_catalog_attribute_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"helptext_catalog_attribute_id": "01H2FW182TAH0NHEVBY34SCAK0",
"name": "Affected Team"
}
'import requests
url = "https://api.incident.io/v2/custom_fields/{id}"
payload = {
"description": "Which team is impacted by this issue",
"filter_by": {
"catalog_attribute_id": "01H2FW182TAH0NHEVBY34SCAK0",
"custom_field_id": "01H2FW182TAH0NHEVBY34SCAK0"
},
"fixed_filter": {
"catalog_attribute_id": "01H2FW182TAH0NHEVBY34SCAK0",
"values": ["01H2FW182TAH0NHEVBY34SCAK0", "01H2FW182TAH0NHEVBY34SCAK1"]
},
"group_by_catalog_attribute_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"helptext_catalog_attribute_id": "01H2FW182TAH0NHEVBY34SCAK0",
"name": "Affected Team"
}
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({
description: 'Which team is impacted by this issue',
filter_by: {
catalog_attribute_id: '01H2FW182TAH0NHEVBY34SCAK0',
custom_field_id: '01H2FW182TAH0NHEVBY34SCAK0'
},
fixed_filter: {
catalog_attribute_id: '01H2FW182TAH0NHEVBY34SCAK0',
values: ['01H2FW182TAH0NHEVBY34SCAK0', '01H2FW182TAH0NHEVBY34SCAK1']
},
group_by_catalog_attribute_id: '01FCNDV6P870EA6S7TK1DSYDG0',
helptext_catalog_attribute_id: '01H2FW182TAH0NHEVBY34SCAK0',
name: 'Affected Team'
})
};
fetch('https://api.incident.io/v2/custom_fields/{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://api.incident.io/v2/custom_fields/{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([
'description' => 'Which team is impacted by this issue',
'filter_by' => [
'catalog_attribute_id' => '01H2FW182TAH0NHEVBY34SCAK0',
'custom_field_id' => '01H2FW182TAH0NHEVBY34SCAK0'
],
'fixed_filter' => [
'catalog_attribute_id' => '01H2FW182TAH0NHEVBY34SCAK0',
'values' => [
'01H2FW182TAH0NHEVBY34SCAK0',
'01H2FW182TAH0NHEVBY34SCAK1'
]
],
'group_by_catalog_attribute_id' => '01FCNDV6P870EA6S7TK1DSYDG0',
'helptext_catalog_attribute_id' => '01H2FW182TAH0NHEVBY34SCAK0',
'name' => 'Affected Team'
]),
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/custom_fields/{id}"
payload := strings.NewReader("{\n \"description\": \"Which team is impacted by this issue\",\n \"filter_by\": {\n \"catalog_attribute_id\": \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"custom_field_id\": \"01H2FW182TAH0NHEVBY34SCAK0\"\n },\n \"fixed_filter\": {\n \"catalog_attribute_id\": \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"values\": [\n \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"01H2FW182TAH0NHEVBY34SCAK1\"\n ]\n },\n \"group_by_catalog_attribute_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"helptext_catalog_attribute_id\": \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"name\": \"Affected Team\"\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://api.incident.io/v2/custom_fields/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Which team is impacted by this issue\",\n \"filter_by\": {\n \"catalog_attribute_id\": \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"custom_field_id\": \"01H2FW182TAH0NHEVBY34SCAK0\"\n },\n \"fixed_filter\": {\n \"catalog_attribute_id\": \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"values\": [\n \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"01H2FW182TAH0NHEVBY34SCAK1\"\n ]\n },\n \"group_by_catalog_attribute_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"helptext_catalog_attribute_id\": \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"name\": \"Affected Team\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.incident.io/v2/custom_fields/{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 \"description\": \"Which team is impacted by this issue\",\n \"filter_by\": {\n \"catalog_attribute_id\": \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"custom_field_id\": \"01H2FW182TAH0NHEVBY34SCAK0\"\n },\n \"fixed_filter\": {\n \"catalog_attribute_id\": \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"values\": [\n \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"01H2FW182TAH0NHEVBY34SCAK1\"\n ]\n },\n \"group_by_catalog_attribute_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"helptext_catalog_attribute_id\": \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"name\": \"Affected Team\"\n}"
response = http.request(request)
puts response.read_body{
"custom_field": {
"catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"created_at": "2021-08-17T13:28:57.801578Z",
"description": "Which team is impacted by this issue",
"field_type": "single_select",
"filter_by": {
"catalog_attribute_id": "01H2FW182TAH0NHEVBY34SCAK0",
"custom_field_id": "01H2FW182TAH0NHEVBY34SCAK0"
},
"fixed_filter": {
"catalog_attribute_id": "01H2FW182TAH0NHEVBY34SCAK0",
"values": [
"01H2FW182TAH0NHEVBY34SCAK0",
"01H2FW182TAH0NHEVBY34SCAK1"
]
},
"group_by_catalog_attribute_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"helptext_catalog_attribute_id": "01H2FW182TAH0NHEVBY34SCAK0",
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"name": "Affected Team",
"updated_at": "2021-08-17T13:28:57.801578Z"
}
}🔑 Requires the
organisation_settings.update scope.Authorizations
API key from your incident.io dashboard (Settings → API keys)
Path Parameters
Unique identifier for the custom field
Example:
"01FCNDV6P870EA6S7TK1DSYDG0"
Body
application/json
Description of the custom field
Example:
"Which team is impacted by this issue"
Human readable name for the custom field
Maximum string length:
50Example:
"Affected Team"
Show child attributes
Show child attributes
Example:
{
"catalog_attribute_id": "01H2FW182TAH0NHEVBY34SCAK0",
"custom_field_id": "01H2FW182TAH0NHEVBY34SCAK0"
}
Show child attributes
Show child attributes
Example:
{
"catalog_attribute_id": "01H2FW182TAH0NHEVBY34SCAK0",
"values": [
"01H2FW182TAH0NHEVBY34SCAK0",
"01H2FW182TAH0NHEVBY34SCAK1"
]
}
For catalog fields, the ID of the attribute used to group catalog entries (if applicable)
Example:
"01FCNDV6P870EA6S7TK1DSYDG0"
Which catalog attribute provides helptext for the options
Example:
"01H2FW182TAH0NHEVBY34SCAK0"
Response
200 - application/json
OK response.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Update
curl --request PUT \
--url https://api.incident.io/v2/custom_fields/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Which team is impacted by this issue",
"filter_by": {
"catalog_attribute_id": "01H2FW182TAH0NHEVBY34SCAK0",
"custom_field_id": "01H2FW182TAH0NHEVBY34SCAK0"
},
"fixed_filter": {
"catalog_attribute_id": "01H2FW182TAH0NHEVBY34SCAK0",
"values": [
"01H2FW182TAH0NHEVBY34SCAK0",
"01H2FW182TAH0NHEVBY34SCAK1"
]
},
"group_by_catalog_attribute_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"helptext_catalog_attribute_id": "01H2FW182TAH0NHEVBY34SCAK0",
"name": "Affected Team"
}
'import requests
url = "https://api.incident.io/v2/custom_fields/{id}"
payload = {
"description": "Which team is impacted by this issue",
"filter_by": {
"catalog_attribute_id": "01H2FW182TAH0NHEVBY34SCAK0",
"custom_field_id": "01H2FW182TAH0NHEVBY34SCAK0"
},
"fixed_filter": {
"catalog_attribute_id": "01H2FW182TAH0NHEVBY34SCAK0",
"values": ["01H2FW182TAH0NHEVBY34SCAK0", "01H2FW182TAH0NHEVBY34SCAK1"]
},
"group_by_catalog_attribute_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"helptext_catalog_attribute_id": "01H2FW182TAH0NHEVBY34SCAK0",
"name": "Affected Team"
}
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({
description: 'Which team is impacted by this issue',
filter_by: {
catalog_attribute_id: '01H2FW182TAH0NHEVBY34SCAK0',
custom_field_id: '01H2FW182TAH0NHEVBY34SCAK0'
},
fixed_filter: {
catalog_attribute_id: '01H2FW182TAH0NHEVBY34SCAK0',
values: ['01H2FW182TAH0NHEVBY34SCAK0', '01H2FW182TAH0NHEVBY34SCAK1']
},
group_by_catalog_attribute_id: '01FCNDV6P870EA6S7TK1DSYDG0',
helptext_catalog_attribute_id: '01H2FW182TAH0NHEVBY34SCAK0',
name: 'Affected Team'
})
};
fetch('https://api.incident.io/v2/custom_fields/{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://api.incident.io/v2/custom_fields/{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([
'description' => 'Which team is impacted by this issue',
'filter_by' => [
'catalog_attribute_id' => '01H2FW182TAH0NHEVBY34SCAK0',
'custom_field_id' => '01H2FW182TAH0NHEVBY34SCAK0'
],
'fixed_filter' => [
'catalog_attribute_id' => '01H2FW182TAH0NHEVBY34SCAK0',
'values' => [
'01H2FW182TAH0NHEVBY34SCAK0',
'01H2FW182TAH0NHEVBY34SCAK1'
]
],
'group_by_catalog_attribute_id' => '01FCNDV6P870EA6S7TK1DSYDG0',
'helptext_catalog_attribute_id' => '01H2FW182TAH0NHEVBY34SCAK0',
'name' => 'Affected Team'
]),
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/custom_fields/{id}"
payload := strings.NewReader("{\n \"description\": \"Which team is impacted by this issue\",\n \"filter_by\": {\n \"catalog_attribute_id\": \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"custom_field_id\": \"01H2FW182TAH0NHEVBY34SCAK0\"\n },\n \"fixed_filter\": {\n \"catalog_attribute_id\": \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"values\": [\n \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"01H2FW182TAH0NHEVBY34SCAK1\"\n ]\n },\n \"group_by_catalog_attribute_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"helptext_catalog_attribute_id\": \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"name\": \"Affected Team\"\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://api.incident.io/v2/custom_fields/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Which team is impacted by this issue\",\n \"filter_by\": {\n \"catalog_attribute_id\": \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"custom_field_id\": \"01H2FW182TAH0NHEVBY34SCAK0\"\n },\n \"fixed_filter\": {\n \"catalog_attribute_id\": \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"values\": [\n \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"01H2FW182TAH0NHEVBY34SCAK1\"\n ]\n },\n \"group_by_catalog_attribute_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"helptext_catalog_attribute_id\": \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"name\": \"Affected Team\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.incident.io/v2/custom_fields/{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 \"description\": \"Which team is impacted by this issue\",\n \"filter_by\": {\n \"catalog_attribute_id\": \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"custom_field_id\": \"01H2FW182TAH0NHEVBY34SCAK0\"\n },\n \"fixed_filter\": {\n \"catalog_attribute_id\": \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"values\": [\n \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"01H2FW182TAH0NHEVBY34SCAK1\"\n ]\n },\n \"group_by_catalog_attribute_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"helptext_catalog_attribute_id\": \"01H2FW182TAH0NHEVBY34SCAK0\",\n \"name\": \"Affected Team\"\n}"
response = http.request(request)
puts response.read_body{
"custom_field": {
"catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"created_at": "2021-08-17T13:28:57.801578Z",
"description": "Which team is impacted by this issue",
"field_type": "single_select",
"filter_by": {
"catalog_attribute_id": "01H2FW182TAH0NHEVBY34SCAK0",
"custom_field_id": "01H2FW182TAH0NHEVBY34SCAK0"
},
"fixed_filter": {
"catalog_attribute_id": "01H2FW182TAH0NHEVBY34SCAK0",
"values": [
"01H2FW182TAH0NHEVBY34SCAK0",
"01H2FW182TAH0NHEVBY34SCAK1"
]
},
"group_by_catalog_attribute_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"helptext_catalog_attribute_id": "01H2FW182TAH0NHEVBY34SCAK0",
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"name": "Affected Team",
"updated_at": "2021-08-17T13:28:57.801578Z"
}
}