Mailcoach Automation Mails API

Reusable emails sent from automation workflows

GitHub OpenAPI

Operations 5

GET /automation-mails List all automation mails #
POST /automation-mails Create an automation mail #
GET /automation-mails/{automationMail} Get an automation mail #
PUT /automation-mails/{automationMail} Update an automation mail #
DELETE /automation-mails/{automationMail} Delete an automation mail #

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/mailcoach-app:mailcoach-app-automation-mails-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

mailcoach-app-automation-mails-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mailcoach Automation 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: Automation Mails
  description: Reusable emails sent from automation workflows
paths:
  /automation-mails:
    get:
      operationId: listAutomationMails
      summary: List all automation mails
      tags:
      - Automation Mails
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/per_page'
      - name: sort
        in: query
        description: 'Sort field. Allowed: `name`, `-name`, `created_at`, `-created_at` (default: `-created_at`).'
        schema:
          type: string
      - name: filter[search]
        in: query
        description: Fuzzy search on name and subject
        schema:
          type: string
      - name: filter[name]
        in: query
        description: Filter by exact name
        schema:
          type: string
      - name: filter[uuid]
        in: query
        description: Filter by exact UUID
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Paginated list of automation mails
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/AutomationMail'
                  links:
                    $ref: '#/components/schemas/PaginationLinks'
                  meta:
                    $ref: '#/components/schemas/PaginationMeta'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
    post:
      operationId: createAutomationMail
      summary: Create an automation mail
      tags:
      - Automation Mails
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AutomationMailRequest'
      responses:
        '201':
          description: Automation mail created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/AutomationMail'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
  /automation-mails/{automationMail}:
    get:
      operationId: showAutomationMail
      summary: Get an automation mail
      tags:
      - Automation Mails
      parameters:
      - name: automationMail
        in: path
        required: true
        description: Automation mail UUID
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Automation mail details
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/AutomationMail'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      operationId: updateAutomationMail
      summary: Update an automation mail
      tags:
      - Automation Mails
      parameters:
      - name: automationMail
        in: path
        required: true
        description: Automation mail UUID
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AutomationMailRequest'
      responses:
        '200':
          description: Automation mail updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/AutomationMail'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
    delete:
      operationId: deleteAutomationMail
      summary: Delete an automation mail
      tags:
      - Automation Mails
      parameters:
      - name: automationMail
        in: path
        required: true
        description: Automation mail 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:
  responses:
    Forbidden:
      description: Forbidden — insufficient permissions
    NotFound:
      description: Resource not found
    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
  schemas:
    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
    Timestamp:
      type: string
      format: date-time
      example: '2026-01-15T12:00:00.000000Z'
    AutomationMailRequest:
      type: object
      required:
      - name
      properties:
        name:
          type: string
        subject:
          type:
          - string
          - 'null'
          description: Defaults to the name when omitted
        template_uuid:
          type: string
          format: uuid
          description: UUID of the template to use
        html:
          type:
          - string
          - 'null'
          description: Raw HTML for the mail. Used when no template_uuid is given, or as the fallback content when a template has no field values. Ignored when both template_uuid and fields are provided.
        fields:
          type:
          - object
          - 'null'
          additionalProperties: true
          description: Values for the chosen template's placeholder fields, keyed by field name. When provided together with template_uuid, the template is rendered with these values to produce the final html. Editor fields accept a Markdown string or null when the Markdown editor is configured. Structured editor objects are rejected with a 422 response in that case.
        utm_tags:
          type:
          - boolean
          - 'null'
        add_subscriber_tags:
          type:
          - boolean
          - 'null'
        add_subscriber_link_tags:
          type:
          - boolean
          - 'null'
    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'
    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
    AutomationMail:
      type: object
      properties:
        uuid:
          $ref: '#/components/schemas/Uuid'
        name:
          type: string
          example: Welcome email
        template_uuid:
          type:
          - string
          - 'null'
          format: uuid
        template:
          $ref: '#/components/schemas/Template'
        from_email:
          type:
          - string
          - 'null'
          format: email
        subject:
          type:
          - string
          - 'null'
        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'
        add_subscriber_tags:
          type:
          - boolean
          - 'null'
        add_subscriber_link_tags:
          type:
          - boolean
          - 'null'
        sent_to_number_of_subscribers:
          type: integer
        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
        created_at:
          $ref: '#/components/schemas/Timestamp'
        updated_at:
          $ref: '#/components/schemas/Timestamp'
  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