AhaSend Templates API

Create, change, publish and delete the account's transactional templates, and read them with their drafts, their published versions and the variables a send must supply

GitHub OpenAPI
Business capability
Email AE-150.10

Operations 11

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /v2/accounts/{account_id}/templates List transactional email templates · List Templates #
Ask an LLM
“Which transactional email templates exist in my account?”
“Can I page through my account's email templates newest first?”
Tell an agent
List the transactional templates in account {account_id}.
Show {limit} templates in account {account_id} after cursor {after}.
POST /v2/accounts/{account_id}/templates Create a transactional email template · Create Template #
Ask an LLM
“How do I create a new transactional email template for my account?”
“Can I publish a template as I create it so it can be sent right away?”
Tell an agent
Create a template named {name} in account {account_id}.
Create template {name} in account {account_id} with subject {subject} and publish it: {publish}.
GET /v2/accounts/{account_id}/templates/{template_id} Get a transactional template's published copy · Get Template #
Ask an LLM
“What subject, from address and content does my published email template have?”
“Can I see the variable list a send must satisfy for a template?”
Tell an agent
Get the published template {template_id} in account {account_id}.
Show the sender and subject of template {template_id} in account {account_id}.
PUT /v2/accounts/{account_id}/templates/{template_id} Update a transactional template's draft · Update Template #
Ask an LLM
“How do I change the subject line of an email template before it is published?”
“Can I change the sender address on a template without publishing it right away?”
Tell an agent
Change the subject of template {template_id} in account {account_id} to {subject}.
Set the sender on template {template_id} in account {account_id} to {from}.
DELETE /v2/accounts/{account_id}/templates/{template_id} Delete a transactional template · Delete Template #
Ask an LLM
“How do I delete an email template so no more sends can use it?”
“What happens to sends of a template once it is deleted?”
Tell an agent destructive · confirm first
Delete template {template_id} from account {account_id}.
Remove the email template {template_id} in account {account_id}.
GET /v2/accounts/{account_id}/templates/{template_id}/draft Get a template's unpublished draft · Get Template Draft #
Ask an LLM
“What changes have I made to a template that aren't published yet?”
“Can I see the draft of a transactional template before publishing it?”
Tell an agent
Get the draft of template {template_id} in account {account_id}.
Show the unpublished changes on template {template_id} in account {account_id}.
DELETE /v2/accounts/{account_id}/templates/{template_id}/draft Discard a template's draft · Discard Template Draft #
Ask an LLM
“How do I throw away the draft of an email template without publishing it?”
“Can I clear a template's pending changes so they are lost?”
Tell an agent destructive · confirm first
Discard the draft of template {template_id} in account {account_id}.
Clear the pending changes on template {template_id} in account {account_id}.
POST /v2/accounts/{account_id}/templates/{template_id}/publish Publish a template's draft · Publish Template #
Ask an LLM
“How do I publish the draft of a transactional template so sends use it?”
“Does publishing a template publish changes made in the dashboard too?”
Tell an agent
Publish the draft of template {template_id} in account {account_id}.
Make the latest draft of template {template_id} in account {account_id} the published version.
GET /v2/accounts/{account_id}/templates/{template_id}/versions List a template's published versions · List Template Versions #
Ask an LLM
“Which versions of a transactional template have been published?”
“How many template versions does my account keep?”
Tell an agent
List the published versions of template {template_id} in account {account_id}.
Show the 50 most recent versions of template {template_id} in account {account_id}.
GET /v2/accounts/{account_id}/templates/{template_id}/versions/{version_id} Get one template version's content · Get Template Version #
Ask an LLM
“How do I see the content of a specific published version of an email template?”
“Can I fetch one template version by its version ID?”
Tell an agent
Get version {version_id} of template {template_id} in account {account_id}.
Show the content of template version {version_id} for template {template_id} in account {account_id}.
POST /v2/accounts/{account_id}/templates/{template_id}/versions/{version_id}/restore Restore a template version into the draft · Restore Template Version #
Ask an LLM
“How do I roll back a template to an earlier published version?”
“Can I publish the restored version of a template right after restoring it?”
Tell an agent
Restore version {version_id} of template {template_id} in account {account_id} into its draft.
Restore template {template_id} in account {account_id} to version {version_id} and publish it: {publish}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ahasend:ahasend-templates-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ahasend-templates-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AhaSend API v2 Templates API
  description: 'The AhaSend API v2 allows you to send transactional emails, manage domains, webhooks, routes, API keys, and view statistics. ## Authentication

    All API requests must be authenticated using a Bearer token in the Authorization header:

    ```

    Authorization: Bearer aha-sk-64-CHARACTER-RANDOM-STRING

    ```


    ## Scopes

    API keys have specific scopes that control access to different resources and actions:


    ### Message Scopes

    - `messages:send:all` - Send messages from any domain in the account

    - `messages:send:{domain}` - Send messages from a specific domain

    - `messages:cancel:all` - Cancel messages from any domain

    - `messages:cancel:{domain}` - Cancel messages from a specific domain

    - `messages:read:all` - Read messages from any domain

    - `messages:read:{domain}` - Read messages from a specific domain


    ### Domain Scopes

    - `domains:read` - Read all domains

    - `domains:write` - Create and update domains

    - `domains:delete:all` - Delete any domain

    - `domains:delete:{domain}` - Delete a specific domain


    ### Account Scopes

    - `accounts:read` - Read account information

    - `accounts:write` - Update account settings

    - `accounts:billing` - Access billing information

    - `accounts:members:read` - Read account members

    - `accounts:members:add` - Add account members

    - `accounts:members:update` - Update account members

    - `accounts:members:remove` - Remove account members


    ### Webhook Scopes

    - `webhooks:read:all` - Read all webhooks

    - `webhooks:read:{domain}` - Read webhooks for a specific domain

    - `webhooks:write:all` - Create and update webhooks

    - `webhooks:write:{domain}` - Create and update webhooks for a specific domain

    - `webhooks:delete:all` - Delete any webhook

    - `webhooks:delete:{domain}` - Delete webhooks for a specific domain


    ### Route Scopes

    - `routes:read:all` - Read all routes

    - `routes:read:{domain}` - Read routes for a specific domain

    - `routes:write:all` - Create and update routes

    - `routes:write:{domain}` - Create and update routes for a specific domain

    - `routes:delete:all` - Delete any route

    - `routes:delete:{domain}` - Delete routes for a specific domain


    ### Suppression Scopes

    - `suppressions:read` - Read suppressions

    - `suppressions:write` - Create suppressions

    - `suppressions:delete` - Delete suppressions

    - `suppressions:wipe` - Delete the account''s suppressions except protected ones (dangerous)


    ### Template Scopes

    - `templates:read` - Read transactional templates, their drafts and their published versions, and campaign templates

    - `templates:write` - Create and update transactional templates, and publish, discard and restore their drafts; create and update campaign templates

    - `templates:delete` - Delete transactional templates and campaign templates


    ### Campaign Scopes

    - `campaigns:read` - Read campaigns, their stats and their recipients

    - `campaigns:write` - Create, update and duplicate campaigns

    - `campaigns:delete` - Delete draft campaigns

    - `campaigns:send` - Send, unschedule and test-send campaigns


    ### Contact Scopes

    - `contacts:read` - Read contacts

    - `contacts:write` - Create and update contacts

    - `contacts:delete` - Delete contacts


    ### Contact lifecycle and attributes

    Contacts are account-global. A contact created through this API joins no

    list on its own; campaigns target lists, so add it to one with the Lists

    endpoints before a campaign can reach it. Contact subscription state and suppression records are independent:

    creating, updating, unsubscribing, resubscribing, or deleting a contact

    never creates, changes, or removes complaint, permanent, or protected

    suppressions. Prefer unsubscribe over delete when the goal is only to stop

    marketing mail, because unsubscribe is reversible and preserves contact

    history. Writable attribute keys and types come from the account''s contact-attribute

    definitions managed in the dashboard; this API does not expose property

    definition CRUD.'
  version: 2.0.0
  contact:
    email: support@ahasend.com
  license:
    name: MIT
    identifier: MIT
servers:
- url: https://api.ahasend.com
  description: Production server
security:
- BearerAuth: []
tags:


# --- truncated at 32 KB (74 KB total) ---
# Full source: https://artifacts.apis.io/ahasend/openapi/ahasend-templates-api-openapi.yml