Sign inGet Started

bird amb send

Usage

Esempio di codice
bird amb send [flags]

Description

Reply to an Apple Messages conversation

Requires a configured, connected business account and an open conversation. Queues a billable message; sent means Apple gateway acceptance. Send --text, --rich-link or --interactive (the last two optionally with --text, sent first as its own bubble), or a stored template with --template (browse them with "bird amb templates list"). A template send derives its category from the template.

Build the request from flags, a JSON AMBMessageSendRequest 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 amb send --example

# the body it prints:
Esempio di codice
{
  "from": "b52d6267-2b62-4f8a-8842-0533d0f1dc07",
  "text": {
    "body": "Your order is ready."
  },
  "to": "opaque-customer-id"
}
Esempio di codice
# reply with text
bird amb send --from b52d6267-2b62-4f8a-8842-0533d0f1dc07 --to opaque-customer --text 'Your order is ready.'

# offer quick replies, introduced by a text bubble
bird amb send --from b52d6267-2b62-4f8a-8842-0533d0f1dc07 --to opaque-customer --text 'Your fitting is tomorrow.' --interactive '{"quick_reply":{"summary_text":"Keep the time?","items":[{"identifier":"keep","title":"Keep it"},{"identifier":"move","title":"Move it"}]}}'

# send by template with variable values
bird amb send --from b52d6267-2b62-4f8a-8842-0533d0f1dc07 --to opaque-customer --template bird_order_update --parameters '{"order_number":"1234"}'

Options

Message

NameDescription
--fromApple Business ID of a configured business (required; or in --body-file)
--toOpaque customer identifier from an open conversation (required; or in --body-file)
--textMessage text; alongside --rich-link or --interactive it arrives first as its own bubble
--subjectSubject shown above --text
--attachmentsFiles sent with --text, as a JSON array of objects with source_url or attachment_id
--rich-linkA link with a preview card, as a JSON object with rich_link_data or rich_link_construct
--interactiveSomething to tap, as a JSON object with one of quick_reply, list_picker, event, dynamic or imessage_app
--templateSend by a stored template: its id (amt_…) or slug (instead of --text, --rich-link or --interactive)
--languageTemplate language as a BCP-47 tag (e.g. fr); template sends only
--parametersTemplate variable values as a JSON object; template sends only
--sourceSender identity permitted by the credential: api, automation, or operator
--skip-typingSend the first part without Bird's typing indicator and one-second pause, after "bird amb conversations typing --event typing_start"

Labels

NameDescription
--categoryCategory label for statistics (rejected alongside --template, which derives its own category)
--groupDepartment identifier
--intentPurpose of the conversation
--localeApple locale identifier; omitted uses the conversation locale
--metadataPer-message context as a JSON object, up to 2 KB
--tagsStructured labels as a JSON array of name and value objects

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 amb attachmentDownload a message attachment
bird amb getGet a message
bird amb listList messages
bird amb list-eventsList events for a message

Continua con la documentazione, le guide e gli esempi per questo argomento.