bird contacts batch
Usage
Esempio di codice
bird contacts batch [flags]Description
Create or update many contacts in one request, matched by email.
Bulk upsert takes a JSON body only. Pass --body-file with a "contacts" array
(each entry the same shape as create) and an optional "audience_ids" array that
every contact is added to. Up to 1,000 contacts per request; per-contact results
come back in submission order.
Build the request from flags, a JSON ContactUpsertRequest body via --body-file ("-" reads
stdin), or both — a flag overrides the matching body field. Run --example to
print a ready-to-edit body, or --dry-run to print the resolved request without
sending it.
Examples
Esempio di codice
# print the body shape (no credentials needed)
bird contacts batch --example
# the body it prints:Esempio di codice
{
"audience_ids": ["adn_01krdgeqcxet5s7t44vh8rt9mg"],
"contacts": [
{
"email": "alice@acme.com",
"first_name": "Alice",
"last_name": "Anderson"
},
{
"email": "bob@acme.com",
"first_name": "Bob",
"last_name": "Baker"
}
]
}Esempio di codice
# upsert contacts from a file
bird email contacts batch --body-file contacts.json
# preview the resolved request without sending
bird email contacts batch --body-file contacts.json --dry-runOptions
Request
| Name | Description |
|---|---|
| --body-file | Read the JSON request body from this file; "-" reads stdin |
| --example | Print a complete example request body, then exit |
| --dry-run | Print the resolved request without sending it, then exit |
| --idempotency-key | Deduplication key; a retry with the same key won't act twice |
Options
| Name | Description |
|---|---|
| --response-schema | Print the fields this command returns, then exit |
Related
| Name | Description |
|---|---|
| bird contacts create | Create a contact by email address. |
| bird contacts delete | Delete a contact |
| bird contacts get | Get a contact |
| bird contacts list | List contacts |
| bird contacts update | Update a contact's name, email, external-id, or custom data. |