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.pdfOptions
Request
| Name | Description |
|---|---|
--dry-run | Print the resolved request without sending it, then exit |
--idempotency-key | Deduplication key; a retry with the same key won't act twice |
Options
| Name | Description |
|---|---|
--from | Apple 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) |
--file | The file, at most 25,000,000 bytes. Its filename becomes the attachment's name unless name is given. Supply this or source_url. |
--source-url | HTTPS 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. |
--name | Display filename. Defaults to the uploaded filename, else the last segment of the source_url path. |
--mime-type | Media type of the file. Defaults to the uploaded part's declared type, else the type Bird detects from the contents. |
--response-schema | Print the fields this command returns, then exit |
Related
| Name | Description |
|---|---|
bird amb attachments download | Download an attachment |
bird amb attachments get | Get an attachment |
Related resources
Continue with the documentation, guides and examples for this topic.