curl --request PATCH \
--url https://api.attio.com/v2/lists/{list} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"name": "Enterprise Sales",
"api_slug": "enterprise_sales",
"workspace_access": "read-and-write",
"workspace_member_access": [
{
"workspace_member_id": "50cf242c-7fa3-4cad-87d0-75b1af71c57b",
"level": "read-and-write"
}
]
}
}
'import requests
url = "https://api.attio.com/v2/lists/{list}"
payload = { "data": {
"name": "Enterprise Sales",
"api_slug": "enterprise_sales",
"workspace_access": "read-and-write",
"workspace_member_access": [
{
"workspace_member_id": "50cf242c-7fa3-4cad-87d0-75b1af71c57b",
"level": "read-and-write"
}
]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
name: 'Enterprise Sales',
api_slug: 'enterprise_sales',
workspace_access: 'read-and-write',
workspace_member_access: [
{
workspace_member_id: '50cf242c-7fa3-4cad-87d0-75b1af71c57b',
level: 'read-and-write'
}
]
}
})
};
fetch('https://api.attio.com/v2/lists/{list}', 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/lists/{list}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'name' => 'Enterprise Sales',
'api_slug' => 'enterprise_sales',
'workspace_access' => 'read-and-write',
'workspace_member_access' => [
[
'workspace_member_id' => '50cf242c-7fa3-4cad-87d0-75b1af71c57b',
'level' => 'read-and-write'
]
]
]
]),
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/lists/{list}"
payload := strings.NewReader("{\n \"data\": {\n \"name\": \"Enterprise Sales\",\n \"api_slug\": \"enterprise_sales\",\n \"workspace_access\": \"read-and-write\",\n \"workspace_member_access\": [\n {\n \"workspace_member_id\": \"50cf242c-7fa3-4cad-87d0-75b1af71c57b\",\n \"level\": \"read-and-write\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.attio.com/v2/lists/{list}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"name\": \"Enterprise Sales\",\n \"api_slug\": \"enterprise_sales\",\n \"workspace_access\": \"read-and-write\",\n \"workspace_member_access\": [\n {\n \"workspace_member_id\": \"50cf242c-7fa3-4cad-87d0-75b1af71c57b\",\n \"level\": \"read-and-write\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attio.com/v2/lists/{list}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"name\": \"Enterprise Sales\",\n \"api_slug\": \"enterprise_sales\",\n \"workspace_access\": \"read-and-write\",\n \"workspace_member_access\": [\n {\n \"workspace_member_id\": \"50cf242c-7fa3-4cad-87d0-75b1af71c57b\",\n \"level\": \"read-and-write\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": {
"workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c",
"list_id": "33ebdbe9-e529-47c9-b894-0ba25e9c15c0"
},
"api_slug": "hiring-engineering",
"name": "Hiring Engineering",
"parent_object": [
"people"
],
"workspace_access": "read-and-write",
"workspace_member_access": [
{
"workspace_member_id": "50cf242c-7fa3-4cad-87d0-75b1af71c57b",
"level": "read-and-write"
}
],
"created_by_actor": {
"type": "workspace-member",
"id": "50cf242c-7fa3-4cad-87d0-75b1af71c57b"
},
"created_at": "2022-11-21T13:22:49.061281000Z"
}
}{
"status_code": 400,
"type": "invalid_request_error",
"code": "value_not_found",
"message": "Workspace member with ID \"50cf242c-7fa3-4cad-87d0-75b1af71c57b\" not found."
}{
"status_code": 404,
"type": "invalid_request_error",
"code": "not_found",
"message": "List with slug/ID \"enterprise_sales\" not found."
}Update a list
Updates an existing list. Permissions for the list are controlled with the workspace_access and workspace_member_access parameters. Please note that lists must have either workspace_access set to "full-access" or one or more element of workspace_member_access with a "full-access" level. It is also possible to receive a 403 billing error if your workspace is not on a plan that supports either advanced workspace or workspace member level access for lists. Changing the parent object of a list is not possible through the API as it can have unintended side-effects that should be considered carefully. If you wish to carry out a parent object change you should do so through the UI.
Required scopes: list_configuration:read-write.
curl --request PATCH \
--url https://api.attio.com/v2/lists/{list} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"name": "Enterprise Sales",
"api_slug": "enterprise_sales",
"workspace_access": "read-and-write",
"workspace_member_access": [
{
"workspace_member_id": "50cf242c-7fa3-4cad-87d0-75b1af71c57b",
"level": "read-and-write"
}
]
}
}
'import requests
url = "https://api.attio.com/v2/lists/{list}"
payload = { "data": {
"name": "Enterprise Sales",
"api_slug": "enterprise_sales",
"workspace_access": "read-and-write",
"workspace_member_access": [
{
"workspace_member_id": "50cf242c-7fa3-4cad-87d0-75b1af71c57b",
"level": "read-and-write"
}
]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
name: 'Enterprise Sales',
api_slug: 'enterprise_sales',
workspace_access: 'read-and-write',
workspace_member_access: [
{
workspace_member_id: '50cf242c-7fa3-4cad-87d0-75b1af71c57b',
level: 'read-and-write'
}
]
}
})
};
fetch('https://api.attio.com/v2/lists/{list}', 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/lists/{list}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'name' => 'Enterprise Sales',
'api_slug' => 'enterprise_sales',
'workspace_access' => 'read-and-write',
'workspace_member_access' => [
[
'workspace_member_id' => '50cf242c-7fa3-4cad-87d0-75b1af71c57b',
'level' => 'read-and-write'
]
]
]
]),
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/lists/{list}"
payload := strings.NewReader("{\n \"data\": {\n \"name\": \"Enterprise Sales\",\n \"api_slug\": \"enterprise_sales\",\n \"workspace_access\": \"read-and-write\",\n \"workspace_member_access\": [\n {\n \"workspace_member_id\": \"50cf242c-7fa3-4cad-87d0-75b1af71c57b\",\n \"level\": \"read-and-write\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.attio.com/v2/lists/{list}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"name\": \"Enterprise Sales\",\n \"api_slug\": \"enterprise_sales\",\n \"workspace_access\": \"read-and-write\",\n \"workspace_member_access\": [\n {\n \"workspace_member_id\": \"50cf242c-7fa3-4cad-87d0-75b1af71c57b\",\n \"level\": \"read-and-write\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attio.com/v2/lists/{list}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"name\": \"Enterprise Sales\",\n \"api_slug\": \"enterprise_sales\",\n \"workspace_access\": \"read-and-write\",\n \"workspace_member_access\": [\n {\n \"workspace_member_id\": \"50cf242c-7fa3-4cad-87d0-75b1af71c57b\",\n \"level\": \"read-and-write\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": {
"workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c",
"list_id": "33ebdbe9-e529-47c9-b894-0ba25e9c15c0"
},
"api_slug": "hiring-engineering",
"name": "Hiring Engineering",
"parent_object": [
"people"
],
"workspace_access": "read-and-write",
"workspace_member_access": [
{
"workspace_member_id": "50cf242c-7fa3-4cad-87d0-75b1af71c57b",
"level": "read-and-write"
}
],
"created_by_actor": {
"type": "workspace-member",
"id": "50cf242c-7fa3-4cad-87d0-75b1af71c57b"
},
"created_at": "2022-11-21T13:22:49.061281000Z"
}
}{
"status_code": 400,
"type": "invalid_request_error",
"code": "value_not_found",
"message": "Workspace member with ID \"50cf242c-7fa3-4cad-87d0-75b1af71c57b\" not found."
}{
"status_code": 404,
"type": "invalid_request_error",
"code": "not_found",
"message": "List with slug/ID \"enterprise_sales\" not found."
}Authorizations
This API uses OAuth 2.0 with the authorization code grant flow.
Path Parameters
A UUID or slug to identify the list to update.
"33ebdbe9-e529-47c9-b894-0ba25e9c15c0"
Body
Show child attributes
Show child attributes
Response
Success
Success
Show child attributes
Show child attributes
Was this page helpful?