Skip to main content
GET
AhaSend Go SDK
The AhaSend API returns the draft of a template: the changes that are not published yet. Access requires templates:read. The API and the dashboard edit the same draft, so the draft can hold changes from both. Sends use the published copy until you publish the draft. A template with no draft returns 404.

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

template_id
string<uuid>
required

Template ID

Response

Template draft

A template's draft: the changes saved in the dashboard or through the API that are not published yet. Sends use the published copy until the draft is published.

object
enum<string>
required

Object type identifier

Available options:
template_draft
template_id
string<uuid>
required

The template the draft belongs to

updated_at
string<date-time>
required

When the draft last changed

subject
string
required

The draft's subject

preheader
string
required

The draft's preview text

variables
object[]
required

Every variable the draft uses, as a send would require them once the draft is published

from
object | null
required

The draft's default sender. Null when it has none.

Example:
reply_to
object | null
required

The draft's default reply-to address. Null when it has none. Its name is always empty.

Example:
content
object | null
required

The draft's content. Null when the draft has no body.