AhaSend · JSON Structure

Api Attachment Structure

Attachment schema from AhaSend API

Type: object Properties: 5 Required: 3
EmailTransactional EmailDeveloper ToolsSMTPWebhooks

Attachment is a JSON Structure definition published by AhaSend, describing 5 properties, of which 3 are required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

data base64 content_type content_id file_name

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/ahasend/refs/heads/main/json-structure/api-attachment-structure.json",
  "name": "Attachment",
  "description": "Attachment schema from AhaSend API",
  "type": "object",
  "properties": {
    "data": {
      "type": "string",
      "examples": [
        "R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
      ],
      "description": "The attachment data. If the base64 field is true, this data must be encoded using base64. Otherwise, it will be interpreted as UTF-8.",
      "example": "example_value"
    },
    "base64": {
      "type": "boolean",
      "examples": [
        true,
        false
      ],
      "description": "If set to true, data needs to be encoded using base64. Otherwise data will be interpreted as UTF-8.",
      "example": true
    },
    "content_type": {
      "type": "string",
      "examples": [
        "image/gif"
      ],
      "example": "example_value"
    },
    "content_id": {
      "type": "string",
      "examples": [
        "my-image"
      ],
      "description": "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.",
      "example": "500123"
    },
    "file_name": {
      "type": "string",
      "examples": [
        "my_image.gif"
      ],
      "example": "Example Name"
    }
  },
  "required": [
    "data",
    "file_name",
    "content_type"
  ]
}