AhaSend · JSON Structure

Openapi V2 Create Message Request Structure

CreateMessageRequest schema from AhaSend API

Type: object Properties: 16 Required: 3
EmailTransactional EmailDeveloper ToolsSMTPWebhook

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

Properties

from recipients reply_to subject text_content html_content amp_content attachments headers substitutions tags sandbox sandbox_result tracking retention schedule

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-create-message-request-structure.json",
  "name": "CreateMessageRequest",
  "description": "CreateMessageRequest schema from AhaSend API",
  "type": "object",
  "properties": {
    "from": {
      "$ref": "#/components/schemas/Address"
    },
    "recipients": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Recipient"
      },
      "minItems": 1,
      "description": "This does not set the To header to multiple addresses, it sends a separate message for each recipient",
      "example": [
        {
          "email": "user@example.com",
          "name": "Example Name",
          "substitutions": {}
        }
      ]
    },
    "reply_to": {
      "$ref": "#/components/schemas/Address",
      "description": "If provided, the reply-to header in headers array must not be provided"
    },
    "subject": {
      "type": "string",
      "description": "Email subject line",
      "example": "example_value"
    },
    "text_content": {
      "type": "string",
      "description": "Plain text content. Required if html_content is empty",
      "example": "example_value"
    },
    "html_content": {
      "type": "string",
      "description": "HTML content. Required if text_content is empty",
      "example": "example_value"
    },
    "amp_content": {
      "type": "string",
      "description": "AMP HTML content",
      "example": "example_value"
    },
    "attachments": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Attachment"
      },
      "description": "File attachments",
      "example": [
        {
          "base64": true,
          "data": "example_value",
          "content_type": "example_value",
          "content_disposition": "example_value",
          "content_id": "500123"
        }
      ]
    },
    "headers": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Custom email headers. reply-to header cannot be provided if reply_to is provided, message-id will be ignored and automatically generated",
      "example": {}
    },
    "substitutions": {
      "type": "object",
      "additionalProperties": true,
      "description": "Global substitutions, recipient substitutions override global",
      "example": {}
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Tags for categorizing messages",
      "example": [
        "example_value"
      ]
    },
    "sandbox": {
      "type": "boolean",
      "description": "If true, the message will be sent to the sandbox environment",
      "default": false,
      "example": true
    },
    "sandbox_result": {
      "type": "string",
      "enum": [
        "deliver",
        "bounce",
        "defer",
        "fail",
        "suppress"
      ],
      "description": "The result of the sandbox send",
      "example": "deliver"
    },
    "tracking": {
      "$ref": "#/components/schemas/Tracking",
      "description": "Tracking settings for the message, overrides default account settings"
    },
    "retention": {
      "$ref": "#/components/schemas/Retention",
      "description": "Retention settings for the message, overrides default account settings"
    },
    "schedule": {
      "$ref": "#/components/schemas/MessageSchedule",
      "description": "Schedule for message delivery"
    }
  },
  "required": [
    "from",
    "recipients",
    "subject"
  ],
  "example": {
    "from": {
      "email": "noreply@example.com",
      "name": "Example Corp"
    },
    "recipients": [
      {
        "email": "user@example.com",
        "name": "John Doe"
      }
    ],
    "subject": "Welcome to Example Corp",
    "html_content": "<h1>Welcome {{first_name}}!</h1>",
    "text_content": "Welcome {{first_name}}!",
    "substitutions": {
      "first_name": "John"
    }
  }
}

Work with this as data

Every JSON Structure here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for json structure

4 MCP tools reach this
  • find_json_structuresBrowse and filter every JSON Structure in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Structure
curl "https://apis.io/api/v1/json-structures/openapi-v2-create-message-request-structure"
All json structure
curl "https://apis.io/api/v1/json-structures?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.