Skip to main content
GET
AhaSend Go SDK
The AhaSend API returns a campaign with its audience, its design and its status. Access requires campaigns:read.
  • ready and issues apply to a draft. ready is true when the draft has no issues. issues lists what to fix, each with a code and a message. For a campaign that is not a draft, both are null. See Issues.
  • status and status_reason show where the campaign is after a send. See Campaign status.
  • list_ids holds the lists that the campaign sends to, in the order they were saved. segment_ids holds the segments that it sends to, and exclude_list_ids and exclude_segment_ids the lists and segments that it leaves out. A list or segment that was deleted is left out. See Audience.
  • from is null until the campaign has a complete sender, and when the domain of the sender was deleted. When the sender has no name, from.name is an empty string, so you can send the object back as it is.
  • editor is null while the campaign has no design.
  • content is null while the campaign has no design, and while its design has no HTML and no text. For example, after a create with editor alone, editor is set and content is null.

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.

Path Parameters

account_id
string<uuid>
required

Account ID

campaign_id
string<uuid>
required

Campaign ID

Response

Campaign

A campaign as List Campaigns returns it, without its audience, content and issues.

object
enum<string>
required

Object type identifier

Available options:
campaign
id
string<uuid>
required

Campaign ID

created_at
string<date-time>
required

When the campaign was created

updated_at
string<date-time>
required

When the campaign's own fields last changed

name
string
required

Campaign name, as it appears in the dashboard. Recipients do not see it.

subject
string | null
required

The subject line. Null until one is set.

preheader
string | null
required

The preview text, which most inboxes show after the subject. Null until one is set.

from
object | null
required

The sender. Null until a complete sender is set, and when its domain was deleted. name is an empty string when the campaign has no sender name, so the object can be sent back as it is.

Example:
reply_to
string<email> | null
required

The reply-to address. Null when none is set.

status
enum<string>
required

Where the campaign is in its life. Only a draft can be changed or deleted.

  • draft: being prepared.
  • validating: scheduled, and its lists and segments are being checked.
  • waiting_for_review: held for a review before it sends.
  • scheduled: accepted, waiting for its send time.
  • sending: sending now.
  • paused: sending stopped for now; status_reason says why.
  • sent: every message was sent.
  • canceled: stopped before it finished; status_reason says why.
  • failed: could not be sent; status_reason says why.
Available options:
draft,
validating,
waiting_for_review,
scheduled,
sending,
paused,
sent,
canceled,
failed
status_reason
string | null
required

Why the campaign is in its status, when there is a reason to give. Null otherwise.

send_at
string<date-time> | null
required

When the campaign sends or sent, in UTC. Null until it is scheduled.

send_resumes_at
string<date-time> | null
required

When a send that reached the account's daily marketing limit continues, in UTC. Null otherwise.

finished_at
string<date-time> | null
required

When the send ended, in UTC. Null until then.

list_ids
string<uuid>[]
required

The lists the campaign sends to, in the order they were saved. A list that was deleted is left out.

segment_ids
string<uuid>[]
required

The segments the campaign sends to, by ID. A segment that was deleted is left out.

exclude_list_ids
string<uuid>[]
required

The lists whose contacts the campaign does not send to, by ID. A contact with any membership of one of them, whatever its status, is left out. A list that was deleted is left out.

exclude_segment_ids
string<uuid>[]
required

The segments whose members the campaign does not send to, by ID. A segment that was deleted is left out.

editor
enum<string> | null
required

The editor of the campaign's design. Null while the campaign has no design.

Available options:
advanced,
simple,
html
content
object | null
required

The content of the campaign's design. Null while it has no design, or its design has neither HTML nor text.

ready
boolean | null
required

Whether the draft has no issue, so it can be sent. Null unless the campaign is a draft.

issues
object[] | null
required

The reasons the draft cannot be sent yet, in a fixed order; empty when it is ready. Null unless the campaign is a draft.

markup_warnings
object[]

Warnings about the AhaML in content.markup, up to the first 100; empty when there are none. Present only in the answer to a write that carried content.markup.

Maximum array length: 100