Documentation
Sign inGet started

bird contacts batch

Usage

代码示例
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

代码示例
# print the body shape (no credentials needed)
bird contacts batch --example

# the body it prints:
代码示例
{
  "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"
    }
  ]
}
代码示例
# 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-run

Options

Request

NameDescription
--body-fileRead the JSON request body from this file; "-" reads stdin
--examplePrint a complete example request body, then exit
--dry-runPrint the resolved request without sending it, then exit
--idempotency-keyDeduplication key; a retry with the same key won't act twice

Options

NameDescription
--response-schemaPrint the fields this command returns, then exit
NameDescription
bird contacts createCreate a contact by email address.
bird contacts deleteDelete a contact
bird contacts getGet a contact
bird contacts listList contacts
bird contacts updateUpdate a contact's name, email, external-id, or custom data.