Skip to main content
POST
AhaSend Go SDK

Authorizations

Authorization
string
header
required

API key for authentication

Headers

Idempotency-Key
string

Optional idempotency key for safe request retries. Must be a unique string for each logical request. Requests with the same key will return the same response. Keys for non-secret responses expire after 24 hours. API-key create responses include a one-time secret_key, so their encrypted replay responses expire after 5 minutes.

Maximum string length: 255

Path Parameters

account_id
string<uuid>
required

Account ID

Body

application/json
from
object
required
Example:
recipients
object[]
required

This does not set the To header to multiple addresses, it sends a separate message for each recipient

Required array length: 1 - 100 elements
subject
string
required

Email subject line

reply_to
object

If provided, the reply-to header in headers array must not be provided

Example:
text_content
string

Plain text content. Required if html_content is empty

html_content
string

HTML content. Required if text_content is empty

amp_content
string

AMP HTML content

attachments
object[]

File attachments. For inline images, set the attachment's content_id to a value wrapped in angle brackets (e.g. <image1@example.com>) and reference it from html_content with cid: (e.g. <img src="cid:image1@example.com">).

headers
object

Custom email headers. reply-to header cannot be provided if reply_to is provided, message-id will be ignored and automatically generated

substitutions
object

Global substitutions, recipient substitutions override global

tags
string[]

Tags for categorizing messages

sandbox
boolean
default:false

If true, the message will be sent to the sandbox environment

sandbox_result
enum<string>

The result of the sandbox send

Available options:
deliver,
bounce,
defer,
fail,
suppress
tracking
object | null

Tracking settings for the message, overrides default account settings

Example:
retention
object | null

Retention settings for the message, overrides default account settings

Example:
schedule
object

Schedule for message delivery

Response

Message created successfully

object
enum<string>
required

Object type identifier

Available options:
list
data
object[]
required

List of messages and their statuses