Create a status
curl --request POST \
--url https://api.attio.com/v2/{target}/{identifier}/attributes/{attribute}/statuses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"title": "In Progress",
"celebration_enabled": true,
"target_time_in_status": "P0Y0M1DT0H0M0S"
}
}
'import requests
url = "https://api.attio.com/v2/{target}/{identifier}/attributes/{attribute}/statuses"
payload = { "data": {
"title": "In Progress",
"celebration_enabled": True,
"target_time_in_status": "P0Y0M1DT0H0M0S"
} }
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({
data: {
title: 'In Progress',
celebration_enabled: true,
target_time_in_status: 'P0Y0M1DT0H0M0S'
}
})
};
fetch('https://api.attio.com/v2/{target}/{identifier}/attributes/{attribute}/statuses', 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.attio.com/v2/{target}/{identifier}/attributes/{attribute}/statuses",
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([
'data' => [
'title' => 'In Progress',
'celebration_enabled' => true,
'target_time_in_status' => 'P0Y0M1DT0H0M0S'
]
]),
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.attio.com/v2/{target}/{identifier}/attributes/{attribute}/statuses"
payload := strings.NewReader("{\n \"data\": {\n \"title\": \"In Progress\",\n \"celebration_enabled\": true,\n \"target_time_in_status\": \"P0Y0M1DT0H0M0S\"\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.attio.com/v2/{target}/{identifier}/attributes/{attribute}/statuses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"title\": \"In Progress\",\n \"celebration_enabled\": true,\n \"target_time_in_status\": \"P0Y0M1DT0H0M0S\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attio.com/v2/{target}/{identifier}/attributes/{attribute}/statuses")
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 \"data\": {\n \"title\": \"In Progress\",\n \"celebration_enabled\": true,\n \"target_time_in_status\": \"P0Y0M1DT0H0M0S\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": {
"workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c",
"object_id": "97052eb9-e65e-443f-a297-f2d9a4a7f795",
"attribute_id": "41252299-f8c7-4b5e-99c9-4ff8321d2f96",
"status_id": "11f07f01-c10f-4e05-a522-33e050bc52ee"
},
"title": "In Progress",
"is_archived": false,
"celebration_enabled": false,
"target_time_in_status": "P0Y0M1DT0H0M0S"
}
}{
"status_code": 400,
"type": "invalid_request_error",
"code": "validation_type",
"message": "This attribute is not a status attribute."
}{
"status_code": 404,
"type": "invalid_request_error",
"code": "not_found",
"message": "Attribute with slug/ID \"my-attribute\" not found."
}{
"status_code": 409,
"type": "invalid_request_error",
"code": "slug_conflict",
"message": "There is already another status with the title \"In Progress\"."
}Attributes
Create a status
Add a new status to a status attribute on either an object or a list.
When target is objects, the required scopes are object_configuration:read-write. When target is lists, the required scopes are list_configuration:read-write.
POST
/
v2
/
{target}
/
{identifier}
/
attributes
/
{attribute}
/
statuses
Create a status
curl --request POST \
--url https://api.attio.com/v2/{target}/{identifier}/attributes/{attribute}/statuses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"title": "In Progress",
"celebration_enabled": true,
"target_time_in_status": "P0Y0M1DT0H0M0S"
}
}
'import requests
url = "https://api.attio.com/v2/{target}/{identifier}/attributes/{attribute}/statuses"
payload = { "data": {
"title": "In Progress",
"celebration_enabled": True,
"target_time_in_status": "P0Y0M1DT0H0M0S"
} }
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({
data: {
title: 'In Progress',
celebration_enabled: true,
target_time_in_status: 'P0Y0M1DT0H0M0S'
}
})
};
fetch('https://api.attio.com/v2/{target}/{identifier}/attributes/{attribute}/statuses', 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.attio.com/v2/{target}/{identifier}/attributes/{attribute}/statuses",
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([
'data' => [
'title' => 'In Progress',
'celebration_enabled' => true,
'target_time_in_status' => 'P0Y0M1DT0H0M0S'
]
]),
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.attio.com/v2/{target}/{identifier}/attributes/{attribute}/statuses"
payload := strings.NewReader("{\n \"data\": {\n \"title\": \"In Progress\",\n \"celebration_enabled\": true,\n \"target_time_in_status\": \"P0Y0M1DT0H0M0S\"\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.attio.com/v2/{target}/{identifier}/attributes/{attribute}/statuses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"title\": \"In Progress\",\n \"celebration_enabled\": true,\n \"target_time_in_status\": \"P0Y0M1DT0H0M0S\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attio.com/v2/{target}/{identifier}/attributes/{attribute}/statuses")
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 \"data\": {\n \"title\": \"In Progress\",\n \"celebration_enabled\": true,\n \"target_time_in_status\": \"P0Y0M1DT0H0M0S\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": {
"workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c",
"object_id": "97052eb9-e65e-443f-a297-f2d9a4a7f795",
"attribute_id": "41252299-f8c7-4b5e-99c9-4ff8321d2f96",
"status_id": "11f07f01-c10f-4e05-a522-33e050bc52ee"
},
"title": "In Progress",
"is_archived": false,
"celebration_enabled": false,
"target_time_in_status": "P0Y0M1DT0H0M0S"
}
}{
"status_code": 400,
"type": "invalid_request_error",
"code": "validation_type",
"message": "This attribute is not a status attribute."
}{
"status_code": 404,
"type": "invalid_request_error",
"code": "not_found",
"message": "Attribute with slug/ID \"my-attribute\" not found."
}{
"status_code": 409,
"type": "invalid_request_error",
"code": "slug_conflict",
"message": "There is already another status with the title \"In Progress\"."
}Authorizations
This API uses OAuth 2.0 with the authorization code grant flow.
Path Parameters
Whether the attribute is on an object or a list.
Available options:
lists, objects Example:
"lists"
A UUID or slug to identify the object or list the status attribute belongs to.
Example:
"33ebdbe9-e529-47c9-b894-0ba25e9c15c0"
A UUID or slug to identify the attribute the status will belong to.
Example:
"41252299-f8c7-4b5e-99c9-4ff8321d2f96"
Body
application/json
Show child attributes
Show child attributes
Response
Success
Success
Show child attributes
Show child attributes
Was this page helpful?
⌘I