Sign inGet Started

Assign contacts to an audience

POST
/v1/audiences/{audience_id}/contacts
await bird.audiences.addContacts("adn_01krdgeqcxet5s7t44vh8rt9mg", {
  contact_ids: ["con_01krdgeqcxet5s7t44vh8rt9mg"],
});

Adds up to 1,000 contacts to an audience. Adding is idempotent: contacts that are already members are left in place and keep their original join time. If any contact ID does not exist in the workspace, the whole request fails with 422 Unprocessable Entity and no contacts are added.

Paramètres

audience_idstring

ID of the audience to add contacts to.

Corps de la requête

contact_ids
array of string
obligatoire

Contacts to add to the audience. Adding a contact that is already a member has no effect and keeps its original join time. Duplicate IDs in the list are collapsed. If any ID does not exist in the workspace, the whole request fails with a validation error and no contacts are added.

Poursuivez avec la documentation, les guides et les exemples sur ce sujet.