Mailcoach Campaign Statistics API
Opens, clicks, unsubscribes, and bounces for a campaign
Opens, clicks, unsubscribes, and bounces for a campaign
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-campaign-statistics-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 Campaign Statistics 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: Campaign Statistics
description: Opens, clicks, unsubscribes, and bounces for a campaign
paths:
/campaigns/{campaign}/opens:
get:
operationId: listCampaignOpens
summary: List campaign opens
tags:
- Campaign Statistics
parameters:
- name: campaign
in: path
required: true
description: Campaign UUID
schema:
type: string
format: uuid
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- name: sort
in: query
description: 'Sort field. Allowed: `email`, `open_count`, `first_opened_at`, `-first_opened_at` (default), `last_opened_at`.'
schema:
type: string
- name: filter[search]
in: query
description: Fuzzy search on subscriber email
schema:
type: string
responses:
'200':
description: Paginated list of opens grouped by subscriber
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Open'
links:
$ref: '#/components/schemas/PaginationLinks'
meta:
$ref: '#/components/schemas/PaginationMeta'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/campaigns/{campaign}/clicks:
get:
operationId: listCampaignClicks
summary: List campaign link clicks
tags:
- Campaign Statistics
parameters:
- name: campaign
in: path
required: true
description: Campaign UUID
schema:
type: string
format: uuid
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- name: sort
in: query
description: 'Sort field. Allowed: `unique_click_count`, `-unique_click_count` (default), `click_count`.'
schema:
type: string
- name: filter[search]
in: query
description: Fuzzy search on link URL
schema:
type: string
responses:
'200':
description: Paginated list of tracked links with click data
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Link'
links:
$ref: '#/components/schemas/PaginationLinks'
meta:
$ref: '#/components/schemas/PaginationMeta'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/campaigns/{campaign}/unsubscribes:
get:
operationId: listCampaignUnsubscribes
summary: List campaign unsubscribes
tags:
- Campaign Statistics
parameters:
- name: campaign
in: path
required: true
description: Campaign UUID
schema:
type: string
format: uuid
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- name: sort
in: query
description: 'Sort field. Allowed: `created_at`, `-created_at` (default).'
schema:
type: string
- name: filter[search]
in: query
description: Fuzzy search on subscriber email, first name, or last name
schema:
type: string
responses:
'200':
description: Paginated list of unsubscribes
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/CampaignUnsubscribe'
links:
$ref: '#/components/schemas/PaginationLinks'
meta:
$ref: '#/components/schemas/PaginationMeta'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/campaigns/{campaign}/bounces:
get:
operationId: listCampaignBounces
summary: List campaign bounces
tags:
- Campaign Statistics
parameters:
- name: campaign
in: path
required: true
description: Campaign UUID
schema:
type: string
format: uuid
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- name: sort
in: query
description: 'Sort field. Allowed: `email`, `bounce_count`, `created_at`, `-created_at` (default).'
schema:
type: string
- name: filter[search]
in: query
description: Fuzzy search on subscriber email
schema:
type: string
- name: filter[type]
in: query
description: Filter by bounce type
schema:
type: string
responses:
'200':
description: Paginated list of bounces grouped by subscriber
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Bounce'
links:
$ref: '#/components/schemas/PaginationLinks'
meta:
$ref: '#/components/schemas/PaginationMeta'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
components:
schemas:
EmailList:
type: object
properties:
uuid:
$ref: '#/components/schemas/Uuid'
name:
type: string
example: Newsletter subscribers
active_subscribers_count:
type: integer
example: 1234
campaigns_feed_enabled:
type: boolean
default_from_email:
type: string
format: email
default_from_name:
type:
- string
- 'null'
default_reply_to_email:
type:
- string
- 'null'
default_reply_to_name:
type:
- string
- 'null'
allow_form_subscriptions:
type: boolean
honeypot_field:
type:
- string
- 'null'
redirect_after_subscribed:
type:
- string
- 'null'
redirect_after_already_subscribed:
type:
- string
- 'null'
redirect_after_subscription_pending:
type:
- string
- 'null'
redirect_after_unsubscribed:
type:
- string
- 'null'
requires_confirmation:
type: boolean
confirmation_mailable_class:
type:
- string
- 'null'
campaign_mailer:
type:
- string
- 'null'
automation_mailer:
type:
- string
- 'null'
transactional_mailer:
type:
- string
- 'null'
report_recipients:
type:
- string
- 'null'
report_campaign_sent:
type: boolean
report_campaign_summary:
type: boolean
report_email_list_summary:
type: boolean
email_list_summary_sent_at:
$ref: '#/components/schemas/Timestamp'
created_at:
$ref: '#/components/schemas/Timestamp'
updated_at:
$ref: '#/components/schemas/Timestamp'
Click:
type: object
properties:
uuid:
$ref: '#/components/schemas/Uuid'
send_uuid:
$ref: '#/components/schemas/Uuid'
link_uuid:
$ref: '#/components/schemas/Uuid'
subscriber_uuid:
type:
- string
- 'null'
format: uuid
created_at:
$ref: '#/components/schemas/Timestamp'
updated_at:
$ref: '#/components/schemas/Timestamp'
Timestamp:
type: string
format: date-time
example: '2026-01-15T12:00:00.000000Z'
Open:
type: object
properties:
subscriber_uuid:
$ref: '#/components/schemas/Uuid'
subscriber_email_list_uuid:
$ref: '#/components/schemas/Uuid'
subscriber_email:
type: string
format: email
open_count:
type: integer
first_opened_at:
$ref: '#/components/schemas/Timestamp'
last_opened_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
Template:
type: object
properties:
uuid:
$ref: '#/components/schemas/Uuid'
name:
type: string
example: Monthly newsletter
html:
type:
- string
- 'null'
description: Compiled HTML content
fields:
type:
- object
- 'null'
description: Template field values (editor-specific)
additionalProperties: true
structured_html:
type:
- string
- 'null'
description: Structured HTML used by the editor
created_at:
$ref: '#/components/schemas/Timestamp'
updated_at:
$ref: '#/components/schemas/Timestamp'
CampaignUnsubscribe:
type: object
properties:
campaign_uuid:
$ref: '#/components/schemas/Uuid'
campaign:
$ref: '#/components/schemas/Campaign'
subscriber_uuid:
$ref: '#/components/schemas/Uuid'
subscriber_email:
type: string
format: email
subscriber:
$ref: '#/components/schemas/Subscriber'
Bounce:
type: object
properties:
subscriber_uuid:
$ref: '#/components/schemas/Uuid'
subscriber_email_list_uuid:
$ref: '#/components/schemas/Uuid'
subscriber_email:
type: string
format: email
bounce_count:
type: integer
type:
type: string
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
Uuid:
type: string
format: uuid
example: 00000000-0000-0000-0000-000000000000
Campaign:
type: object
properties:
uuid:
$ref: '#/components/schemas/Uuid'
name:
type: string
example: March 2026 Newsletter
email_list_uuid:
$ref: '#/components/schemas/Uuid'
email_list:
$ref: '#/components/schemas/EmailList'
template_uuid:
type:
- string
- 'null'
format: uuid
template:
$ref: '#/components/schemas/Template'
from_email:
type:
- string
- 'null'
format: email
from_name:
type:
- string
- 'null'
status:
type: string
example: draft
html:
type:
- string
- 'null'
structured_html:
type:
- string
- 'null'
email_html:
type:
- string
- 'null'
description: Final rendered HTML sent to subscribers
webview_html:
type:
- string
- 'null'
fields:
type:
- object
- 'null'
additionalProperties: true
description: Template field values
mailable_class:
type:
- string
- 'null'
utm_tags:
type:
- boolean
- 'null'
sent_to_number_of_subscribers:
type: integer
segment_uuid:
type:
- string
- 'null'
format: uuid
segment_class:
type:
- string
- 'null'
segment_description:
type:
- string
- 'null'
open_count:
type: integer
unique_open_count:
type: integer
open_rate:
type: number
format: float
click_count:
type: integer
unique_click_count:
type: integer
click_rate:
type: number
format: float
unsubscribe_count:
type: integer
unsubscribe_rate:
type: number
format: float
bounce_count:
type: integer
bounce_rate:
type: number
format: float
sent_at:
type:
- string
- 'null'
format: date-time
statistics_calculated_at:
type:
- string
- 'null'
format: date-time
scheduled_at:
type:
- string
- 'null'
format: date-time
summary_mail_sent_at:
type:
- string
- 'null'
format: date-time
created_at:
$ref: '#/components/schemas/Timestamp'
updated_at:
$ref: '#/components/schemas/Timestamp'
Subscriber:
type: object
properties:
uuid:
$ref: '#/components/schemas/Uuid'
email_list_uuid:
$ref: '#/components/schemas/Uuid'
email:
type: string
format: email
example: john@example.com
first_name:
type:
- string
- 'null'
example: John
last_name:
type:
- string
- 'null'
example: Doe
extra_attributes:
type: object
additionalProperties: true
tags:
type: array
items:
type: string
example:
- newsletter
- vip
subscribed_at:
$ref: '#/components/schemas/Timestamp'
unsubscribed_at:
type:
- string
- 'null'
format: date-time
created_at:
$ref: '#/components/schemas/Timestamp'
updated_at:
$ref: '#/components/schemas/Timestamp'
Link:
type: object
properties:
uuid:
$ref: '#/components/schemas/Uuid'
url:
type: string
format: uri
unique_click_count:
type: integer
click_count:
type: integer
clicks:
type: array
items:
$ref: '#/components/schemas/Click'
responses:
Forbidden:
description: Forbidden — insufficient permissions
Unauthorized:
description: Unauthenticated — missing or invalid bearer token
NotFound:
description: Resource not found
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