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.
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/mailcoach-app:mailcoach-app-segments-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
openapi: 3.2.0
info:
title: Mailcoach Segments 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: Segments
description: Tag-based segments within a list
paths:
/email-lists/{emailList}/segments:
get:
operationId: listSegments
summary: List segments for a list
tags:
- Segments
parameters:
- name: emailList
in: path
required: true
description: Email list UUID
schema:
type: string
format: uuid
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- name: sort
in: query
description: 'Sort field. Allowed: `name`, `-name`, `created_at`, `-created_at`. Default: `name`.'
schema:
type: string
enum:
- name
- -name
- created_at
- -created_at
- name: filter[search]
in: query
description: Fuzzy search on segment name
schema:
type: string
- name: include
in: query
description: 'Include related resources. Allowed: `emailList`.'
schema:
type: string
enum:
- emailList
responses:
'200':
description: Paginated list of segments
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Segment'
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'
post:
operationId: createSegment
summary: Create a segment
tags:
- Segments
parameters:
- name: emailList
in: path
required: true
description: Email list UUID
schema:
type: string
format: uuid
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SegmentRequest'
responses:
'201':
description: Segment created
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/Segment'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/UnprocessableEntity'
/email-lists/{emailList}/segments/{segment}:
get:
operationId: showSegment
summary: Get a segment
tags:
- Segments
parameters:
- name: emailList
in: path
required: true
description: Email list UUID
schema:
type: string
format: uuid
- name: segment
in: path
required: true
description: Segment UUID
schema:
type: string
format: uuid
responses:
'200':
description: Segment details
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/Segment'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
put:
operationId: updateSegment
summary: Update a segment
tags:
- Segments
parameters:
- name: emailList
in: path
required: true
description: Email list UUID
schema:
type: string
format: uuid
- name: segment
in: path
required: true
description: Segment UUID
schema:
type: string
format: uuid
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SegmentRequest'
responses:
'200':
description: Segment updated
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/Segment'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/UnprocessableEntity'
delete:
operationId: deleteSegment
summary: Delete a segment
tags:
- Segments
parameters:
- name: emailList
in: path
required: true
description: Email list UUID
schema:
type: string
format: uuid
- name: segment
in: path
required: true
description: Segment 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'
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'
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
SegmentRequest:
type: object
required:
- name
properties:
name:
type: string
example: Active VIPs
all_positive_tags_required:
type: boolean
description: When true, subscriber must have ALL positive tags (AND). When false, ANY tag matches (OR).
all_negative_tags_required:
type: boolean
description: When true, subscriber must lack ALL negative tags. When false, lacking ANY tag excludes them.
positive_tags:
type:
- array
- 'null'
items:
type: string
description: Tag names the subscriber must have
negative_tags:
type:
- array
- 'null'
items:
type: string
description: Tag names the subscriber must not have
Timestamp:
type: string
format: date-time
example: '2026-01-15T12:00:00.000000Z'
Segment:
type: object
properties:
uuid:
$ref: '#/components/schemas/Uuid'
name:
type: string
example: Active VIPs
positive_tags:
type: array
items:
type: string
description: Tag names the subscriber must have. Empty when the segment has no positive tag condition.
example:
- vip
negative_tags:
type: array
items:
type: string
description: Tag names the subscriber must not have. Empty when the segment has no negative tag condition.
example:
- churned
all_positive_tags_required:
type: boolean
description: When true, the subscriber must have ALL positive tags (AND). When false, ANY tag matches (OR).
all_negative_tags_required:
type: boolean
description: When true, the subscriber must lack ALL negative tags. When false, lacking ANY tag excludes them.
email_list:
$ref: '#/components/schemas/EmailList'
email_list_uuid:
$ref: '#/components/schemas/Uuid'
created_at:
$ref: '#/components/schemas/Timestamp'
updated_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
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
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
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