Mailtrap Send API

Send transactional and bulk emails

Operations 3

POST /api/send Send a transactional email #
POST /api/batch Send batch emails #
POST /api/send/{inbox_id} Send a test email to a sandbox inbox #

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/mailtrap-send-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

mailtrap-send-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mailtrap Send API
  version: '1.0'
  contact:
    name: Mailtrap Support
    url: https://help.mailtrap.io/
  termsOfService: https://mailtrap.io/terms-of-use/
  description: 'Operations tagged Send across 2 of this provider''s published API definitions: mailtrap-email-api-openapi.yml, mailtrap-email-sandbox-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://send.api.mailtrap.io
  description: Transactional email production
- url: https://bulk.api.mailtrap.io
  description: Bulk stream production
- url: https://sandbox.api.mailtrap.io
  description: Sandbox API
- url: https://mailtrap.io
  description: Mailtrap management API
tags:
- name: Send
  description: Send transactional and bulk emails
paths:
  /api/send:
    post:
      operationId: sendEmail
      summary: Send a transactional email
      description: Send a single transactional email in real time. Supports HTML and text bodies, attachments, headers, custom variables, and category tagging.
      tags:
      - Send
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendRequest'
      responses:
        '200':
          description: Email accepted for delivery
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendResponse'
        '400':
          description: Validation error
        '401':
          description: Authentication failed
        '403':
          description: Quota or permission error
      security:
      - BearerAuth: []
    servers:
    - url: https://send.api.mailtrap.io
      description: Transactional email production
    - url: https://bulk.api.mailtrap.io
      description: Bulk stream production
  /api/batch:
    post:
      operationId: sendBatchEmails
      summary: Send batch emails
      description: Send up to 500 emails in a single request. A base message defines shared fields and per-recipient requests override or supplement them.
      tags:
      - Send
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchRequest'
      responses:
        '200':
          description: Batch accepted for delivery
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchResponse'
        '400':
          description: Validation error
        '401':
          description: Authentication failed
      security:
      - BearerAuth: []
    servers:
    - url: https://send.api.mailtrap.io
      description: Transactional email production
    - url: https://bulk.api.mailtrap.io
      description: Bulk stream production
  /api/send/{inbox_id}:
    post:
      operationId: sendToSandboxInbox
      summary: Send a test email to a sandbox inbox
      description: Send an email into a specific sandbox inbox for inspection and debugging. Uses the same JSON body shape as the production send API.
      tags:
      - Send
      parameters:
      - name: inbox_id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendRequest_2'
      responses:
        '200':
          description: Email captured by the sandbox inbox
        '401':
          description: Authentication failed
      security:
      - ApiTokenAuth: []
    servers:
    - url: https://sandbox.api.mailtrap.io
      description: Sandbox API
    - url: https://mailtrap.io
      description: Mailtrap management API
components:
  schemas:
    SendRequest:
      type: object
      required:
      - from
      - to
      - subject
      properties:
        from:
          $ref: '#/components/schemas/Address'
        to:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        cc:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        bcc:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        reply_to:
          $ref: '#/components/schemas/Address'
        subject:
          type: string
        text:
          type: string
        html:
          type: string
        category:
          type: string
        custom_variables:
          type: object
          additionalProperties:
            type: string
        headers:
          type: object
          additionalProperties:
            type: string
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/Attachment'
        template_uuid:
          type: string
        template_variables:
          type: object
          additionalProperties: true
    Attachment:
      type: object
      required:
      - content
      - filename
      properties:
        content:
          type: string
          description: Base64-encoded file content
        filename:
          type: string
        type:
          type: string
        disposition:
          type: string
          enum:
          - attachment
          - inline
        content_id:
          type: string
    BatchResponse:
      type: object
      properties:
        success:
          type: boolean
        responses:
          type: array
          items:
            $ref: '#/components/schemas/SendResponse'
    BatchMessage:
      type: object
      properties:
        from:
          $ref: '#/components/schemas/Address'
        to:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        cc:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        bcc:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        subject:
          type: string
        text:
          type: string
        html:
          type: string
        custom_variables:
          type: object
        template_variables:
          type: object
    BatchRequest:
      type: object
      required:
      - base
      - requests
      properties:
        base:
          $ref: '#/components/schemas/SendRequest'
        requests:
          type: array
          maxItems: 500
          items:
            $ref: '#/components/schemas/BatchMessage'
    Address:
      type: object
      required:
      - email
      properties:
        email:
          type: string
          format: email
        name:
          type: string
    SendResponse:
      type: object
      properties:
        success:
          type: boolean
        message_ids:
          type: array
          items:
            type: string
    SendRequest_2:
      type: object
      required:
      - from
      - to
      - subject
      properties:
        from:
          $ref: '#/components/schemas/Address'
        to:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        subject:
          type: string
        text:
          type: string
        html:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
    ApiTokenAuth:
      type: apiKey
      in: header
      name: Api-Token
x-refined-from:
- mailtrap-email-api-openapi.yml
- mailtrap-email-sandbox-openapi.yml