Update an audience
PATCH
/v1/audiences/{audience_id}
await bird.audiences.update("adn_01krdgeqcxet5s7t44vh8rt9mg", { name: "Renamed" });audience = client.audiences.update("adn_01krdgeqcxet5s7t44vh8rt9mg", name="Renamed")
print(audience.name)// Rename the audience and clear its description (Null sends an explicit JSON
// null). Omit a field to leave it unchanged; bird.Value(...) sets a new value.
audience, err := client.Audiences.Update(context.Background(), "adn_123", bird.AudienceUpdateParams{
Name: "Renamed",
Description: bird.Null[string](),
})
if err != nil {
log.Fatal(err)
}
fmt.Println(audience.Id)$bird->audiences->update(
'adn_01krdgeqcxet5s7t44vh8rt9mg',
(new AudienceUpdateRequest())->setName('Renamed'),
);bird audiences update <audience-id> --name 'Newsletter subscribers'curl -X PATCH "https://us1.platform.bird.com/v1/audiences/{audience_id}" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Newsletter subscribers"
}'Updates an audience's name or description. Omitted fields are left unchanged; set description to null to clear it.
Parameter
audience_id
string
ID of the audience to update (adn_-prefixed).
Anfrage-Nutzlast
name
string
New display name for the audience. Omit to keep the current name. The name cannot be cleared, and a whitespace-only value returns a validation error.
description
nullable string
Longer description of who this audience is. Set to null to clear.
Antwort-Payload
id
string
erforderlich
ID of the audience (adn_-prefixed), accepted by every operation that takes an audience_id.
name
string
erforderlich
Display name for the audience.
description
nullable string
Longer description of who this audience is.
type
string
erforderlich
How the audience's recipients are determined. static is an explicit member list you manage by adding and removing contacts.
Possible values: static
created_at
string
erforderlich
updated_at
string
erforderlich