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:
to
object[]
required

This parameter can set the To header to multiple addresses. The combined to, cc, and bcc recipient count must not exceed 50.

Required array length: 1 - 50 elements
subject
string
required

Email subject line

cc
object[]

This parameter can set the CC header to multiple addresses. Do not include cc in the headers array. The combined to, cc, and bcc recipient count must not exceed 50.

Required array length: 1 - 50 elements
bcc
object[]

This parameter can set the To header to multiple addresses. The combined to, cc, and bcc recipient count must not exceed 50.

Required array length: 1 - 50 elements
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. cc and reply-to headers cannot be provided if reply_to or cc parameters are provided, message-id will be ignored and automatically generated

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