Skip to content

Attachment

Info

This page was generated by extracting information from a JSON Schema data file for the API. It may be missing some information, or otherwise suggest approximate or placeholder values based on information in the schema file; this is due to limitations on how that data is extracted from the underlying Rust code and into the JSON Schema, and then again from there and into these docs.

This is an object value, with the following properties:

  • base64 - optional boolean. If true, the data field must be encoded as base64

  • content_id - optional nullable string. Optional Content-ID header for this attachment. If specified, this attachment will be added as an inline attachment and a multipart/related MIME container will be generated in the message to hold it and the textual content.

  • content_type - required string. The MIME Content-Type header that should be set for this attachment.

  • data - required string. The content of the payload. This is interpreted as UTF-8 text unless the base64 field is set to true.

  • file_name - optional nullable string. The the preferred filename for the attachment

Examples

{
  "base64": false,
  "content_id": "string",
  "content_type": "string",
  "data": "string",
  "file_name": "string"
}
{
  "base64": true,
  "content_id": "my-image",
  "content_type": "image/gif",
  "data": "R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
  "file_name": "pixel.gif"
}