Mailtea Assets API

The Assets API from Mailtea — 2 operation(s) for assets.

GitHub OpenAPI

Operations 3

GET /v1/assets List Assets #
POST /v1/assets Upload Asset #
DELETE /v1/assets/{id} Delete Asset #

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/mailtea-app:mailtea-app-assets-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

mailtea-app-assets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mailtea Assets API
  version: 0.24.0
  summary: Send transactional and marketing email, manage contacts and audiences, verify sending domains, render templates, and subscribe to webhook events.
  description: Every endpoint lives under `/v1` and takes a Bearer token (`mt_pat_…` personal access token, `mt_svc_…` service key, or `mt_test_…` test key) in the `Authorization` header. The required scopes are listed per operation. This document is generated from the API reference at https://docs.mailtea.app/docs/api-reference.
  termsOfService: https://mailtea.app/terms
  contact:
    name: Mailtea
    url: https://mailtea.app
    email: support@mailtea.app
  license:
    name: AGPL-3.0-only
    identifier: AGPL-3.0-only
servers:
- url: https://api.mailtea.app
  description: Mailtea cloud
tags:
- name: Assets
paths:
  /v1/assets:
    get:
      operationId: listAssets
      summary: List Assets
      description: 'List a publication''s images, newest first


        List the images in a publication''s library, newest first. Retired assets are excluded.'
      tags:
      - Assets
      externalDocs:
        url: https://docs.mailtea.app/docs/api-reference/assets/list-assets
      parameters:
      - name: publication_id
        in: query
        required: true
        description: The publication whose library to list.
        schema:
          type: string
      - name: search
        in: query
        required: false
        description: Case-insensitive substring match on `filename`.
        schema:
          type: string
      - name: limit
        in: query
        required: false
        description: 1–200. Defaults to 100.
        schema:
          type: number
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                object: list
                data:
                - object: asset
                  id: asset_a37f54c9118b43ab85e360b3eca17295
                  url: https://api.mailtea.app/v1/public/site-assets/pub_abc123/asset_a37f54c9118b43ab85e360b3eca17295.png
                  publication_id: pub_abc123
                  filename: hero.png
                  content_type: image/png
                  byte_size: 23122
                  width: 1200
                  height: 452
                  created_at: '2026-08-06T10:35:51.922Z'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
    post:
      operationId: uploadAsset
      summary: Upload Asset
      description: 'Upload an image into a publication''s library and get its permanent URL


        Upload an image and get back the URL to use as an image block''s `src`. The bytes travel as base64 in the JSON body — there is no multipart endpoint.'
      tags:
      - Assets
      externalDocs:
        url: https://docs.mailtea.app/docs/api-reference/assets/upload-asset
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                publication_id:
                  type: string
                  description: The publication to upload into.
                content:
                  type: string
                  description: The image bytes, base64-encoded. A `data:image/png;base64,` prefix is stripped if present. Max 8,000,000 characters.
                content_type:
                  type: string
                  description: One of `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/svg+xml`. Checked against the file's actual bytes.
                filename:
                  type: string
                  description: A readable name for the library, e.g. `hero.png`. 1–200 characters.
                width:
                  type: number
                  description: Pixel width. The editor uses it to reserve space so the layout does not jump.
                height:
                  type: number
                  description: Pixel height.
              required:
              - publication_id
              - content
              - content_type
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
              example:
                object: asset
                id: asset_a37f54c9118b43ab85e360b3eca17295
                url: https://api.mailtea.app/v1/public/site-assets/pub_abc123/asset_a37f54c9118b43ab85e360b3eca17295.png
                publication_id: pub_abc123
                filename: hero.png
                content_type: image/png
                byte_size: 23122
                width: 1200
                height: 452
                created_at: '2026-08-06T10:35:51.922Z'
        '400':
          description: The format is not accepted, the file is empty, or its bytes do not match the declared `content_type`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The key lacks the `site:write` scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: The image is over 5 MB, or the publication's library is full (500 MB / 2,000 images).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: More than 30 asset requests in a minute from one key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth:
        - site:write
      x-mailtea-scopes:
      - site:write
  /v1/assets/{id}:
    delete:
      operationId: deleteAsset
      summary: Delete Asset
      description: 'Retire an image from a publication''s library


        Remove an image from the library.


        **The file is kept and its URL keeps resolving.** This hides the asset from the library so it stops appearing in pickers and listings — it does **not** break images inside emails you have already sent, and it does **not** remove the image from any email, template or page that references it. Fix those first, or they will keep showing it.'
      tags:
      - Assets
      externalDocs:
        url: https://docs.mailtea.app/docs/api-reference/assets/delete-asset
      parameters:
      - name: id
        in: path
        required: true
        description: The asset ID (prefix `asset_`).
        schema:
          type: string
      - name: publication_id
        in: query
        required: true
        description: The publication the asset belongs to.
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                object: asset
                id: asset_abc123
                deleted: true
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The key lacks the `site:write` scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such asset in that publication, or it was already retired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth:
        - site:write
      x-mailtea-scopes:
      - site:write
components:
  schemas:
    Error:
      type: object
      description: Every error body carries `error`; validation failures add `details` and some refusals add a machine-readable `code`.
      properties:
        error:
          type: string
        code:
          type: string
        details:
          type: array
          items:
            type: object
      required:
      - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A Mailtea API key. Scopes such as `contacts:write` are properties of the key, chosen when it is created; each operation lists the scope it needs under `x-mailtea-scopes`. See https://docs.mailtea.app/docs/api-reference/authentication.
externalDocs:
  description: API reference
  url: https://docs.mailtea.app/docs/api-reference