Mailcoach Transactional Mails API
Transactional email templates and logged sends
Transactional email templates and logged sends
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/mailcoach-app:mailcoach-app-transactional-mails-api"
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.
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: 3.2.0
info:
title: Mailcoach Transactional Mails API
description: 'REST API for Laravel Mailcoach — send email campaigns, manage subscribers,
and handle transactional mails.
Authentication is via Bearer token (Laravel Sanctum).
All collection endpoints return paginated responses using the standard
Laravel pagination envelope (`data`, `links`, `meta`).
Filtering uses the `?filter[key]=value` convention
(spatie/laravel-query-builder). Sorting uses `?sort=field` (ascending)
or `?sort=-field` (descending).'
version: 1.0.0
contact:
name: Spatie
url: https://mailcoach.app
servers:
- url: '{baseUrl}/api'
description: Mailcoach API
variables:
baseUrl:
default: https://your-app.com
description: The base URL of your Mailcoach installation
security:
- bearerAuth: []
tags:
- name: Transactional Mails
description: Transactional email templates and logged sends
paths:
/transactional-mails:
get:
operationId: listTransactionalMails
summary: List transactional mail log items
tags:
- Transactional Mails
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- name: sort
in: query
description: 'Sort field. Allowed: `subject`, `created_at`, `-created_at` (default).'
schema:
type: string
- name: filter[search]
in: query
description: Fuzzy search on subject
schema:
type: string
- name: filter[transport_message_id]
in: query
description: Filter by transport message ID
schema:
type: string
responses:
'200':
description: Paginated list of transactional mail log items
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TransactionalMailLogItem'
links:
$ref: '#/components/schemas/PaginationLinks'
meta:
$ref: '#/components/schemas/PaginationMeta'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
/transactional-mails/send:
post:
operationId: sendTransactionalMail
summary: Send a transactional mail
tags:
- Transactional Mails
description: 'Send a transactional email. You can either reference a stored template
via `mail_name`, or provide `subject` and `html`/`text` directly.
Send permission is checked for all recipients, including template recipients, CC, and BCC.'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SendTransactionalMailRequest'
responses:
'200':
description: Mail sent and stored — returns the log item UUID
content:
application/json:
schema:
type: object
properties:
uuid:
type: string
format: uuid
'204':
description: Mail sent but not stored (store=false)
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'406':
description: Email address is suppressed or invalid
'422':
$ref: '#/components/responses/UnprocessableEntity'
'500':
description: Internal server error while sending
/transactional-mails/templates:
get:
operationId: listTransactionalMailTemplates
summary: List transactional mail templates
tags:
- Transactional Mails
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- name: sort
in: query
description: 'Sort field. Allowed: `subject`, `created_at`, `-created_at` (default).'
schema:
type: string
- name: filter[search]
in: query
description: Fuzzy search on subject and name
schema:
type: string
- name: filter[uuid]
in: query
description: Exact match on UUID
schema:
type: string
format: uuid
- name: filter[name]
in: query
description: Exact match on name
schema:
type: string
responses:
'200':
description: Paginated list of transactional mail templates
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TransactionalMail'
links:
$ref: '#/components/schemas/PaginationLinks'
meta:
$ref: '#/components/schemas/PaginationMeta'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
/transactional-mails/templates/{transactionalMailTemplate}:
get:
operationId: showTransactionalMailTemplate
summary: Get a transactional mail template
tags:
- Transactional Mails
parameters:
- name: transactionalMailTemplate
in: path
required: true
description: Transactional mail template UUID
schema:
type: string
format: uuid
responses:
'200':
description: Transactional mail template details
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TransactionalMail'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/transactional-mails/{transactionalMail}:
get:
operationId: showTransactionalMailLogItem
summary: Get a transactional mail log item
tags:
- Transactional Mails
parameters:
- name: transactionalMail
in: path
required: true
description: Transactional mail log item UUID
schema:
type: string
format: uuid
responses:
'200':
description: Transactional mail log item details
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TransactionalMailLogItem'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/transactional-mails/{transactionalMail}/resend:
post:
operationId: resendTransactionalMail
summary: Resend a transactional mail
description: Resends to the original recipients. Addresses on the suppression list cannot receive resends.
tags:
- Transactional Mails
parameters:
- name: transactionalMail
in: path
required: true
description: Transactional mail log item UUID
schema:
type: string
format: uuid
responses:
'204':
$ref: '#/components/responses/NoContent'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'406':
description: A recipient is on the suppression list.
components:
responses:
Forbidden:
description: Forbidden — insufficient permissions
UnprocessableEntity:
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationError'
Unauthorized:
description: Unauthenticated — missing or invalid bearer token
NoContent:
description: No content — action completed successfully
NotFound:
description: Resource not found
schemas:
Uuid:
type: string
format: uuid
example: 00000000-0000-0000-0000-000000000000
ValidationError:
type: object
properties:
message:
type: string
example: The given data was invalid.
errors:
type: object
additionalProperties:
type: array
items:
type: string
required:
- message
- errors
SendTransactionalMailRequest:
type: object
required:
- from
- to
properties:
mail_name:
type: string
description: Name or UUID of an existing transactional mail template. Unknown names and UUIDs return a validation error.
subject:
type:
- string
- 'null'
description: Required when mail_name is not provided
html:
type:
- string
- 'null'
description: Required when mail_name and text are not provided
text:
type:
- string
- 'null'
description: Required when mail_name and html are not provided
replacements:
type:
- object
- 'null'
additionalProperties: true
description: Key-value replacements for template placeholders
from:
type: string
description: Sender email address (or "Name <email>" format)
to:
type: string
description: Comma-delimited list of recipient addresses
cc:
type:
- string
- 'null'
description: Comma-delimited list of CC addresses
bcc:
type:
- string
- 'null'
description: Comma-delimited list of BCC addresses
reply_to:
type:
- string
- 'null'
description: Comma-delimited list of reply-to addresses
store:
type: boolean
description: Whether to store the sent mail as a log item (default true)
mailer:
type: string
description: Mailer config key to use
attachments:
type:
- array
- 'null'
items:
type: object
required:
- name
- content
- content_type
properties:
name:
type: string
content:
type: string
description: Base64-encoded file content
content_type:
type: string
example: application/pdf
content_id:
type:
- string
- 'null'
description: Content-ID for inline attachments
fake:
type: boolean
description: When true, mail is not actually sent
Timestamp:
type: string
format: date-time
example: '2026-01-15T12:00:00.000000Z'
TransactionalMail:
type: object
description: Transactional mail template
properties:
uuid:
$ref: '#/components/schemas/Uuid'
name:
type: string
example: order-confirmation
to:
type:
- array
- 'null'
items:
type: string
cc:
type:
- array
- 'null'
items:
type: string
bcc:
type:
- array
- 'null'
items:
type: string
subject:
type: string
html:
type: string
store_mail:
type: boolean
created_at:
$ref: '#/components/schemas/Timestamp'
PaginationLinks:
type: object
properties:
first:
type: string
format: uri
example: https://your-app.com/api/templates?page=1
last:
type: string
format: uri
example: https://your-app.com/api/templates?page=5
prev:
type:
- string
- 'null'
format: uri
next:
type:
- string
- 'null'
format: uri
TransactionalMailLogItem:
type: object
description: A logged transactional mail send
properties:
uuid:
$ref: '#/components/schemas/Uuid'
subject:
type: string
from:
type: string
to:
type: array
items:
type: string
cc:
type:
- array
- 'null'
items:
type: string
bcc:
type:
- array
- 'null'
items:
type: string
body:
type: string
description: HTML content of the sent mail
html:
type: string
description: HTML content of the sent mail (alias of body)
created_at:
$ref: '#/components/schemas/Timestamp'
PaginationMeta:
type: object
properties:
current_page:
type: integer
example: 1
from:
type:
- integer
- 'null'
example: 1
last_page:
type: integer
example: 5
links:
type: array
items:
type: object
properties:
url:
type:
- string
- 'null'
format: uri
label:
type: string
active:
type: boolean
path:
type: string
format: uri
per_page:
type: integer
example: 15
to:
type:
- integer
- 'null'
example: 15
total:
type: integer
example: 73
parameters:
per_page:
name: per_page
in: query
description: Number of items per page
schema:
type: integer
minimum: 1
maximum: 100
default: 15
page:
name: page
in: query
description: Page number
schema:
type: integer
minimum: 1
default: 1
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: Laravel Sanctum API token