Documentation
Sign inGet started

bird contacts create

Usage

Esempio di codice
bird contacts create [email] [flags]

Description

Create a contact by email address, phone number, or both
A contact needs at least one identifier: an email (the positional argument) or a phone number (--phone-number). Each is unique in the workspace; a duplicate email, phone-number, or external-id returns 409. --data keys must be contact properties you defined with "bird contact-properties create".
Build the request from the <email> argument and flags, a JSON ContactCreateRequest body via --body-file ("-" reads stdin), or both — an inline value 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 create --example

# the body it prints:
Esempio di codice
{
  "email": "alice@acme.com",
  "first_name": "Alice",
  "last_name": "Anderson",
  "phone_number": "+31612345678"
}
Esempio di codice
# create a contact
bird contacts create jane@acme.com --first-name Jane

# create a phone-only contact
bird contacts create --phone-number +31612345678 --first-name Jane

# preview the request without creating
bird contacts create jane@acme.com --dry-run

Options

Contact

NameDescription
--phone-numberThe contact's phone number in E.164 format, e.g. +31612345678; unique within the workspace
--first-nameThe contact's first name
--last-nameThe contact's last name
--external-idYour own identifier for this contact; unique within the workspace when set
--dataCustom property values as a JSON object, e.g. --data '{"plan":"pro"}'

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 batchCreate or update many contacts in one request, matched by the identifiers each entry carries
bird contacts deleteDelete a contact
bird contacts getGet a contact
bird contacts listList contacts
bird contacts updateUpdate a contact's name, email, phone-number, external-id, or custom data