Skip to main content
POST
AhaSend Go SDK
The AhaSend API creates a new sub-account under the parent account.
Plan availability: sub-accounts are included on Pro (up to 9) and Max (no limit). There is no charge per sub-account; the volume of all sub-accounts is pooled on the parent’s plan. See plans and features.

Authorizations

Authorization
string
header
required

API key for authentication. Non-empty Security Requirement values are AhaSend API-key roles. Roles listed within one requirement object are jointly required; separate requirement objects are alternatives.

Headers

Idempotency-Key
string

Optional idempotency key for safe request retries. Must be a unique string for each logical request. An identical request with a completed stored outcome returns the original status and body. An in-progress execution returns 409, a changed method/path/body returns 422, and a released 5xx execution may run again. Keys for non-secret responses expire after 24 hours. API-key create responses include a one-time secret_key, so successful encrypted replay responses for those operations expire after 5 minutes.

Maximum string length: 255

Path Parameters

account_id
string<uuid>
required

Parent account ID

Body

application/json
name
string
required

Human-readable name for the sub account; leading and trailing whitespace is trimmed and the result must not be blank

Required string length: 1 - 255
website
string
required

Account website. A domain such as acme.com, or an http(s) URL such as https://acme.com, which is reduced to its host before it is stored

Maximum string length: 255
monthly_credit
integer<int64>
default:0

Optional monthly cap; 0 means no cap

Required range: 0 <= x <= 1000000000

Response

Sub account created successfully

object
enum<string>
required

Object type identifier

Available options:
sub_account
id
string<uuid>
required

Unique identifier for the sub account

parent_account_id
string<uuid>
required

Parent account ID

created_at
string<date-time>
required

When the sub account was created

name
string
required

Sub account name

website
string
required

Account website, stored as a bare domain such as acme.com

Maximum string length: 255
status
enum<string>
required

Current sub-account status

Available options:
active,
suspended,
parent-suspended,
deleted
monthly_credit
integer<int64>
required

Optional monthly cap; 0 means no cap

Required range: x >= 0
domain_count
integer<int64>
required

Number of domains owned by the sub account

Required range: x >= 0
member_count
integer<int64>
required

Number of direct members on the sub account

Required range: x >= 0
last_activity_at
string<date-time> | null
required

Last recorded sub-account email activity