Assign contacts to an audience
POST
/v1/audiences/{audience_id}/contacts
await bird.audiences.addContacts("adn_01krdgeqcxet5s7t44vh8rt9mg", {
contact_ids: ["con_01krdgeqcxet5s7t44vh8rt9mg"],
});client.audiences.add_contacts(
"adn_01krdgeqcxet5s7t44vh8rt9mg", contact_ids=["con_01krdgeqcxet5s7t44vh8rt9mg"],
)err = client.Audiences.AddContacts(context.Background(), "adn_123", bird.AudienceAddContactsParams{
ContactIDs: []string{"con_1", "con_2"},
})
if err != nil {
log.Fatal(err)
}$bird->audiences->addContacts(
'adn_01krdgeqcxet5s7t44vh8rt9mg',
(new AudienceContactsAddRequest())->setContactIds(['con_01krdgeqcxet5s7t44vh8rt9mg']),
);bird audiences add-contacts <audience-id> \
--contact-ids con_01krdgeqcxet5s7t44vh8rt9mgcurl -X POST "https://us1.platform.bird.com/v1/audiences/{audience_id}/contacts" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"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_id
string
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.
Ressources associées
Poursuivez avec la documentation, les guides et les exemples sur ce sujet. Les ressources sont en anglais.
Regarder le guideManage your customers: contacts & audiencesExplorer la fonctionnalitéContacts and audiencesSuivre le parcours d'apprentissageBuild your first integrationGuide d'implémentationAudiences
Obtenir un guide d'implémentation