Sign inGet Started

bird amb attachments upload

Usage

Code example
bird amb attachments upload [flags]

Description

Upload an attachment

Uploads a file to Apple for one business account and returns an aat_ attachment ID to send in text.attachments[].attachment_id, so the same file can be sent many times without uploading it again. Upload a local file, or supply source_url and Bird downloads the file. Each call uploads a new attachment. Apple keeps an attachment for about 30 days after its last use.

Pass the file with --file ("-" reads stdin); any other fields are flags. Run --dry-run to print the parts that would be sent, including the file's path and size, without uploading it.

Examples

Code example
# check what would be sent, without sending it
bird amb attachments upload --from <from> --file ./document.pdf --dry-run

# upload it
bird amb attachments upload --from <from> --file ./document.pdf

Options

Request

NameDescription
--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
--fromApple business identifier of the business account that sends the attachment. Read it from the business account's apple_business_id. Only this business account can send the attachment. (required)
--fileThe file, at most 25,000,000 bytes. Its filename becomes the attachment's name unless name is given. Supply this or source_url.
--source-urlHTTPS URL of a file of at most 99,999,999 bytes, which Bird downloads instead of an uploaded file. Supply this or file. A non-HTTPS URL is refused with a 422 AMBEndpointNotHTTPS.
--nameDisplay filename. Defaults to the uploaded filename, else the last segment of the source_url path.
--mime-typeMedia type of the file. Defaults to the uploaded part's declared type, else the type Bird detects from the contents.
--response-schemaPrint the fields this command returns, then exit
NameDescription
bird amb attachments downloadDownload an attachment
bird amb attachments getGet an attachment

Continue with the documentation, guides and examples for this topic.