SMTP2GO · Schema

SMTP2GO Send Email Request

Schema for the SMTP2GO /email/send API endpoint request body

EmailEmail DeliveryTransactional EmailSMTPSMSEmail APIDeliverability

Properties

Name Type Description
api_key string API key for authentication (alternative to X-Smtp2go-Api-Key header)
sender string Name and email address to send from, format: Name
to array Recipients (up to 100), format: Name
cc array Carbon copy recipients (up to 100)
bcc array Blind carbon copy recipients (up to 100)
subject string Email subject line
html_body string HTML formatted message body
text_body string Plain text message body
custom_headers array Custom headers to include in the email
attachments array File attachments
inlines array Inline images referenced as cid:filename in content
template_id string ID of a pre-built template to use
template_data string JSON string of variables for template substitution
schedule string Future timestamp for delayed sending (within 3 days)
fastaccept boolean Enable background processing (default: false)
View JSON Schema on GitHub

JSON Schema

smtp2go-send-email.json Raw ↑
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/smtp2go/main/json-schema/smtp2go-send-email.json",
  "title": "SMTP2GO Send Email Request",
  "description": "Schema for the SMTP2GO /email/send API endpoint request body",
  "type": "object",
  "required": ["sender", "to"],
  "properties": {
    "api_key": {
      "type": "string",
      "description": "API key for authentication (alternative to X-Smtp2go-Api-Key header)"
    },
    "sender": {
      "type": "string",
      "description": "Name and email address to send from, format: Name <[email protected]>",
      "example": "Sender Name <[email protected]>"
    },
    "to": {
      "type": "array",
      "description": "Recipients (up to 100), format: Name <[email protected]>",
      "items": {
        "type": "string"
      },
      "maxItems": 100,
      "minItems": 1
    },
    "cc": {
      "type": "array",
      "description": "Carbon copy recipients (up to 100)",
      "items": {
        "type": "string"
      },
      "maxItems": 100
    },
    "bcc": {
      "type": "array",
      "description": "Blind carbon copy recipients (up to 100)",
      "items": {
        "type": "string"
      },
      "maxItems": 100
    },
    "subject": {
      "type": "string",
      "description": "Email subject line"
    },
    "html_body": {
      "type": "string",
      "description": "HTML formatted message body"
    },
    "text_body": {
      "type": "string",
      "description": "Plain text message body"
    },
    "custom_headers": {
      "type": "array",
      "description": "Custom headers to include in the email",
      "items": {
        "type": "object",
        "properties": {
          "header": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": ["header", "value"]
      }
    },
    "attachments": {
      "type": "array",
      "description": "File attachments",
      "items": {
        "$ref": "#/definitions/Attachment"
      }
    },
    "inlines": {
      "type": "array",
      "description": "Inline images referenced as cid:filename in content",
      "items": {
        "$ref": "#/definitions/Attachment"
      }
    },
    "template_id": {
      "type": "string",
      "description": "ID of a pre-built template to use"
    },
    "template_data": {
      "type": "string",
      "description": "JSON string of variables for template substitution"
    },
    "schedule": {
      "type": "string",
      "description": "Future timestamp for delayed sending (within 3 days)",
      "format": "date-time"
    },
    "fastaccept": {
      "type": "boolean",
      "description": "Enable background processing (default: false)",
      "default": false
    }
  },
  "definitions": {
    "Attachment": {
      "type": "object",
      "required": ["filename", "mimetype"],
      "properties": {
        "filename": {
          "type": "string",
          "description": "Attachment filename"
        },
        "mimetype": {
          "type": "string",
          "description": "MIME type of the file"
        },
        "fileblob": {
          "type": "string",
          "description": "Base64-encoded file content"
        },
        "url": {
          "type": "string",
          "description": "URL to retrieve the file from",
          "format": "uri"
        }
      }
    }
  }
}