Documentation
Sign inGet started

bird contact-properties create

Usage

Contoh kode
bird contact-properties create <key> [flags]

Description

Define a custom contact property.
The key and --type are fixed after creation. The key must be lowercase letters, digits, and underscores, starting with a letter. An optional fallback value (used when a contact has no value) is set through a --body-file "fallback_value" field.
Build the request from the <key> argument and flags, a JSON ContactPropertyCreateRequest 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

Contoh kode
# print the body shape (no credentials needed)
bird contact-properties create --example

# the body it prints:
Contoh kode
{
  "fallback_value": "free",
  "key": "plan",
  "type": "string"
}
Contoh kode
# define a string property
bird email contact-properties create plan --type string

# with a fallback via a body file
bird email contact-properties create plan --type string --body-file prop.json

Options

Property

NameDescription
--typeValue type: string, number, or boolean

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 contact-properties archiveArchive a contact property
bird contact-properties getGet a contact property
bird contact-properties listList contact properties
bird contact-properties unarchiveUnarchive a contact property
bird contact-properties updateUpdate a contact property's fallback value.