HubSpot · JSON Structure

Marketing Emal Api Transactional Email Request Structure

Request body for sending a transactional email

Type: object Properties: 4 Required: 2
AnalyticsCommerceContentCRMCustomer ServiceEmail MarketingMarketingMarketing AutomationOperationsSales

TransactionalEmailRequest is a JSON Structure definition published by HubSpot, describing 4 properties, of which 2 are required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

emailId message contactProperties customProperties

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/hubspot/refs/heads/main/json-structure/marketing-emal-api-transactional-email-request-structure.json",
  "name": "TransactionalEmailRequest",
  "description": "Request body for sending a transactional email",
  "type": "object",
  "properties": {
    "emailId": {
      "type": "int32",
      "description": "The ID of the transactional email template to use",
      "example": 12345678
    },
    "message": {
      "type": "object",
      "description": "The email message configuration",
      "required": [
        "to"
      ],
      "properties": {
        "to": {
          "type": "string",
          "description": "The recipient's email address",
          "example": "recipient@example.com"
        },
        "from": {
          "type": "string",
          "description": "Override the from address (must be verified)",
          "example": "noreply@yourcompany.com"
        },
        "sendId": {
          "type": "string",
          "description": "A unique ID to prevent duplicate sends",
          "example": "unique-send-id-123"
        },
        "replyTo": {
          "type": "array",
          "description": "Reply-to email addresses",
          "items": {
            "type": "string"
          },
          "example": [
            "support@yourcompany.com"
          ]
        },
        "cc": {
          "type": "array",
          "description": "CC email addresses",
          "items": {
            "type": "string"
          },
          "example": [
            "jsmith@example.com"
          ]
        },
        "bcc": {
          "type": "array",
          "description": "BCC email addresses",
          "items": {
            "type": "string"
          },
          "example": [
            "jsmith@example.com"
          ]
        }
      }
    },
    "contactProperties": {
      "type": "object",
      "description": "Properties to set on the contact (if createContact is enabled)",
      "additionalProperties": {
        "type": "string"
      },
      "example": {
        "firstname": "John",
        "lastname": "Doe",
        "company": "Acme Corp"
      }
    },
    "customProperties": {
      "type": "object",
      "description": "Custom template variables for personalization",
      "additionalProperties": {
        "type": "string"
      },
      "example": {
        "order_number": "ORD-12345",
        "order_total": "$99.99"
      }
    }
  },
  "required": [
    "emailId",
    "message"
  ]
}