Update a list
PATCH
/workspaces/{workspaceId}/lists/{listId}
Update the specified list given its ID. This endpoint allows you to update the list's name, description, consent type, tags, and isProof flag.
Parametry ścieżki
workspaceId
string
The unique identifier of the workspace.
listId
string
The ID of a list.
Treść żądania
name
string
Name
description
string
consentType
string
The consent type for the list.
Possible values: single, double
tags
array of string
isProof
boolean
The list is used as a proof list to use it as a test list in campaigns.
Treść odpowiedzi
id
string
wymagane
The unique identifier for the list.
name
string
wymagane
The name of the list.
description
string
wymagane
The description of the list.
createdAt
string
updatedAt
string
contactCount
integer
The number of contacts in the list.
consentType
string
The consent type for the list.
Possible values: single, double
tags
array of string
The tags associated with the list.
isProof
boolean
The list is used as a proof list to use it as a test list in campaigns.
counter
object
Pokaż atrybuty podrzędne
counter.count
integer
wymagane
counter.updatedAt
string
wymagane
Przykład kodu
curl -X PATCH 'https://api.bird.com/workspaces/{workspaceId}/lists/{listId}' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'Examples
Let's establish some of our data that will be used in the following examples:
- Workspace ID: a1405560-c8d3-4b1a-877d-3f449ad95352
- AccessKey: abcd
- List ID: 123e4567-e89b-12d3-a456-426614174000
Update a list
In this example, we're updating a list given its ID.
Przykład kodu
curl -X PATCH "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/lists" \
-H "Content-Type: application/json" \
-H "Authorization: AccessKey abcd" \
-d '{
"name": "US Customers (old)",
"description": "US Customers"
}'Przykład kodu
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "US Customers (old)",
"description": "US Customers",
"contactCount": 0,
"tags": [
"123e4567-e89b-12d3-a456-426614174000"
],
"isProof": false,
"consentType": "single",
"createdAt": "2024-11-26T15:00:00.000Z",
"updatedAt": "2024-11-26T15:00:00.000Z"
}