Sign inGet Started

bird amb send

Usage

Codebeispiel
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, or a stored template with --template (browse them with "bird amb templates list"). --text may go with either of the other two. It arrives first as its own bubble beside --interactive. Beside --rich-link, the card replaces the first copy of its URL in it, splitting it around the card, or follows it when the URL is absent. Later copies of that URL are dropped. link_previews, set through --body-file, is refused beside --rich-link or --interactive. 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

Codebeispiel
# print the body shape (no credentials needed)
bird amb send --example

# the body it prints:
Codebeispiel
{
  "from": "b52d6267-2b62-4f8a-8842-0533d0f1dc07",
  "text": {
    "body": "Your order is ready."
  },
  "to": "opaque-customer-id"
}
Codebeispiel
# 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"}]}}'

# show a logo as a small rich link (layout is icon, square or large)
bird amb send --from b52d6267-2b62-4f8a-8842-0533d0f1dc07 --to opaque-customer --rich-link '{"rich_link_data":{"url":"https://example.com/store","title":"Example Store","assets":{"image":{"source_url":"https://example.com/logo.png","layout":"icon"}}}}'

# show page icons for the links in a message (link_previews.layout, set through --body-file)
echo '{"text":{"link_previews":{"layout":"icon"}}}' | bird amb send --body-file - --from b52d6267-2b62-4f8a-8842-0533d0f1dc07 --to opaque-customer --text 'Visit https://example.com/store'

# 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. Beside --interactive it arrives first as its own bubble. Beside --rich-link the card replaces the first copy of its URL in it, splitting it around the card, or follows it
--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
--request-schemaPrint the request schema index, or with --path one input's schema, then exit
--pathSelect one input by its schema path, such as interactive, for --request-schema
--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

Weiter mit der Dokumentation, Anleitungen und Beispielen zu diesem Thema.