Mailtrap Inboxes API

Manage sandbox inboxes

Operations 8

GET /api/accounts/{account_id}/inboxes List sandbox inboxes #
POST /api/accounts/{account_id}/projects/{project_id}/inboxes Create a sandbox inbox in a project #
GET /api/accounts/{account_id}/inboxes/{inbox_id} Get a sandbox inbox #
DELETE /api/accounts/{account_id}/inboxes/{inbox_id} Delete a sandbox inbox and all its emails #
PATCH /api/accounts/{account_id}/inboxes/{inbox_id} Update inbox attributes #
PATCH /api/accounts/{account_id}/inboxes/{inbox_id}/clean Remove all messages from an inbox #
PATCH /api/accounts/{account_id}/inboxes/{inbox_id}/all_read Mark all messages in the inbox as read #
PATCH /api/accounts/{account_id}/inboxes/{inbox_id}/reset_credentials Reset SMTP credentials of the 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-inboxes-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-inboxes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mailtrap Email Sandbox Inboxes API
  description: The Mailtrap Email Sandbox API provides a safe email testing environment to inspect and debug emails before sending to real recipients. The API supports sending test emails into virtual inboxes, then retrieving, analyzing, and managing those captured messages. Sandbox endpoints cover messages, inboxes, projects, spam reports, HTML analysis, and raw or formatted message bodies.
  version: '1.0'
  contact:
    name: Mailtrap Support
    url: https://help.mailtrap.io/
  termsOfService: https://mailtrap.io/terms-of-use/
servers:
- url: https://sandbox.api.mailtrap.io
  description: Sandbox API
- url: https://mailtrap.io
  description: Mailtrap management API
security:
- ApiTokenAuth: []
tags:
- name: Inboxes
  description: Manage sandbox inboxes
paths:
  /api/accounts/{account_id}/inboxes:
    get:
      operationId: listInboxes
      summary: List sandbox inboxes
      tags:
      - Inboxes
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Inbox list
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Inbox'
  /api/accounts/{account_id}/projects/{project_id}/inboxes:
    post:
      operationId: createInbox
      summary: Create a sandbox inbox in a project
      tags:
      - Inboxes
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: integer
      - name: project_id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                inbox:
                  type: object
                  properties:
                    name:
                      type: string
      responses:
        '201':
          description: Inbox created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Inbox'
  /api/accounts/{account_id}/inboxes/{inbox_id}:
    get:
      operationId: getInbox
      summary: Get a sandbox inbox
      tags:
      - Inboxes
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - $ref: '#/components/parameters/InboxId'
      responses:
        '200':
          description: Inbox details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Inbox'
    delete:
      operationId: deleteInbox
      summary: Delete a sandbox inbox and all its emails
      tags:
      - Inboxes
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - $ref: '#/components/parameters/InboxId'
      responses:
        '204':
          description: Inbox deleted
    patch:
      operationId: updateInbox
      summary: Update inbox attributes
      tags:
      - Inboxes
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - $ref: '#/components/parameters/InboxId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: Inbox updated
  /api/accounts/{account_id}/inboxes/{inbox_id}/clean:
    patch:
      operationId: cleanInbox
      summary: Remove all messages from an inbox
      tags:
      - Inboxes
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - $ref: '#/components/parameters/InboxId'
      responses:
        '200':
          description: Inbox cleaned
  /api/accounts/{account_id}/inboxes/{inbox_id}/all_read:
    patch:
      operationId: markAllRead
      summary: Mark all messages in the inbox as read
      tags:
      - Inboxes
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - $ref: '#/components/parameters/InboxId'
      responses:
        '200':
          description: Messages marked as read
  /api/accounts/{account_id}/inboxes/{inbox_id}/reset_credentials:
    patch:
      operationId: resetCredentials
      summary: Reset SMTP credentials of the inbox
      tags:
      - Inboxes
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - $ref: '#/components/parameters/InboxId'
      responses:
        '200':
          description: Credentials reset
components:
  parameters:
    AccountId:
      name: account_id
      in: path
      required: true
      schema:
        type: integer
    InboxId:
      name: inbox_id
      in: path
      required: true
      schema:
        type: integer
  schemas:
    Inbox:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        username:
          type: string
        password:
          type: string
        max_size:
          type: integer
        status:
          type: string
        emails_count:
          type: integer
        emails_unread_count:
          type: integer
        last_message_sent_at:
          type: string
          format: date-time
        smtp_ports:
          type: array
          items:
            type: integer
        pop3_ports:
          type: array
          items:
            type: integer
        domain:
          type: string
        project_id:
          type: integer
  securitySchemes:
    ApiTokenAuth:
      type: apiKey
      in: header
      name: Api-Token
externalDocs:
  description: Mailtrap Email Sandbox Documentation
  url: https://docs.mailtrap.io/