AhaSend · JSON Structure

Openapi V2 Attachment Structure

Attachment schema from AhaSend API

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

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

Properties

base64 data content_type content_disposition 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/openapi-v2-attachment-structure.json",
  "name": "Attachment",
  "description": "Attachment schema from AhaSend API",
  "type": "object",
  "properties": {
    "base64": {
      "type": "boolean",
      "description": "If true, data must be encoded using base64. Otherwise, data will be interpreted as UTF-8",
      "default": false,
      "example": true
    },
    "data": {
      "type": "string",
      "description": "Either plaintext or base64 encoded attachment data (depending on base64 field)",
      "example": "example_value"
    },
    "content_type": {
      "type": "string",
      "description": "The MIME type of the attachment",
      "example": "example_value"
    },
    "content_disposition": {
      "type": "string",
      "description": "The disposition of the attachment",
      "example": "example_value"
    },
    "content_id": {
      "type": "string",
      "description": "The Content-ID of the attachment for inline images",
      "example": "500123"
    },
    "file_name": {
      "type": "string",
      "description": "The filename of the attachment",
      "example": "Example Name"
    }
  },
  "required": [
    "data",
    "content_type",
    "file_name"
  ],
  "example": {
    "base64": true,
    "data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg==",
    "content_type": "image/png",
    "file_name": "pixel.png"
  }
}