Lumail Campaigns API

Draft and scheduled campaigns.

GitHub OpenAPI

Operations 6

GET /api/v1/campaigns List campaigns #
POST /api/v1/campaigns Create a campaign draft #
GET /api/v1/campaigns/{campaignId} Get a campaign #
PATCH /api/v1/campaigns/{campaignId} Update a draft campaign #
DELETE /api/v1/campaigns/{campaignId} Delete a draft campaign #
POST /api/v1/campaigns/{campaignId}/send Send or schedule a campaign #

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/lumail-io:lumail-io-campaigns-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

lumail-io-campaigns-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Lumail REST Campaigns API
  version: 1.0.0
  summary: Organization-scoped email operations for applications and agents.
  description: Create and manage subscribers, tags, events, campaigns, and transactional email in Lumail. Every operation uses an organization API token as a Bearer credential.
  contact:
    name: Lumail support
    email: contact@lumail.io
    url: https://lumail.io/support
  license:
    name: Proprietary
    url: https://lumail.io/legal/terms
servers:
- url: https://lumail.io
  description: Lumail production API
tags:
- name: Campaigns
  description: Draft and scheduled campaigns.
paths:
  /api/v1/campaigns:
    get:
      operationId: listCampaigns
      summary: List campaigns
      description: Returns paginated campaigns with status, search, and ordering filters.
      tags:
      - Campaigns
      security:
      - bearerAuth: []
      parameters:
      - name: status
        in: query
        required: false
        description: Filter by campaign lifecycle status.
        schema:
          type: string
      - name: page
        in: query
        required: false
        description: One-based page number.
        schema:
          type: integer
          minimum: 1
          default: 1
      - name: limit
        in: query
        required: false
        description: Campaigns per page.
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 20
      - name: query
        in: query
        required: false
        description: Search campaign name or subject.
        schema:
          type: string
      - name: sortBy
        in: query
        required: false
        description: Sort mode.
        schema:
          type: string
          enum:
          - name
          - name_desc
      responses:
        '200':
          description: The operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignListResponse'
        '400':
          description: The request could not be validated or completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: The bearer token is missing, invalid, or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: The requested organization resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: The organization API rate limit was exceeded.
          headers:
            Retry-After:
              description: Seconds until another request should be attempted.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      operationId: createCampaign
      summary: Create a campaign draft
      description: Creates a draft campaign using an explicit or organization-default email sender.
      tags:
      - Campaigns
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CampaignInput'
      responses:
        '200':
          description: The operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignResponse'
        '400':
          description: The request could not be validated or completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: The bearer token is missing, invalid, or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: The requested organization resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: The organization API rate limit was exceeded.
          headers:
            Retry-After:
              description: Seconds until another request should be attempted.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/v1/campaigns/{campaignId}:
    get:
      operationId: getCampaign
      summary: Get a campaign
      description: Returns one campaign and its current draft or send metadata.
      tags:
      - Campaigns
      security:
      - bearerAuth: []
      parameters:
      - name: campaignId
        in: path
        required: true
        description: Campaign ID in the authenticated organization.
        schema:
          type: string
          minLength: 1
      responses:
        '200':
          description: The operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignResponse'
        '400':
          description: The request could not be validated or completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: The bearer token is missing, invalid, or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: The requested organization resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: The organization API rate limit was exceeded.
          headers:
            Retry-After:
              description: Seconds until another request should be attempted.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    patch:
      operationId: updateCampaign
      summary: Update a draft campaign
      description: Updates mutable content and sender fields while the campaign remains a draft.
      tags:
      - Campaigns
      security:
      - bearerAuth: []
      parameters:
      - name: campaignId
        in: path
        required: true
        description: Campaign ID in the authenticated organization.
        schema:
          type: string
          minLength: 1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CampaignUpdateInput'
      responses:
        '200':
          description: The operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignResponse'
        '400':
          description: The request could not be validated or completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: The bearer token is missing, invalid, or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: The requested organization resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: The organization API rate limit was exceeded.
          headers:
            Retry-After:
              description: Seconds until another request should be attempted.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      operationId: deleteCampaign
      summary: Delete a draft campaign
      description: Deletes the campaign only when it is still in draft state.
      tags:
      - Campaigns
      security:
      - bearerAuth: []
      parameters:
      - name: campaignId
        in: path
        required: true
        description: Campaign ID in the authenticated organization.
        schema:
          type: string
          minLength: 1
      responses:
        '200':
          description: The operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '400':
          description: The request could not be validated or completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: The bearer token is missing, invalid, or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: The requested organization resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: The organization API rate limit was exceeded.
          headers:
            Retry-After:
              description: Seconds until another request should be attempted.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/v1/campaigns/{campaignId}/send:
    post:
      operationId: sendCampaign
      summary: Send or schedule a campaign
      description: Atomically transitions a valid draft to scheduled state and queues its delivery workflow.
      tags:
      - Campaigns
      security:
      - bearerAuth: []
      parameters:
      - name: campaignId
        in: path
        required: true
        description: Campaign ID in the authenticated organization.
        schema:
          type: string
          minLength: 1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CampaignSendInput'
      responses:
        '200':
          description: The operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignResponse'
        '400':
          description: The request could not be validated or completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: The bearer token is missing, invalid, or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: The requested organization resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: The organization API rate limit was exceeded.
          headers:
            Retry-After:
              description: Seconds until another request should be attempted.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CampaignUpdateInput:
      type: object
      minProperties: 1
      properties:
        name:
          type: string
          minLength: 1
        subject:
          type: string
          minLength: 1
        preview:
          type:
          - string
          - 'null'
        contentType:
          type: string
          enum:
          - MARKDOWN
          - HTML
          - TIPTAP
        content: {}
        senderId:
          type: string
        replyTo:
          type:
          - string
          - 'null'
          format: email
      additionalProperties: false
    CampaignInput:
      type: object
      required:
      - name
      - subject
      properties:
        name:
          type: string
          minLength: 1
        subject:
          type: string
          minLength: 1
        preview:
          type: string
        contentType:
          type: string
          enum:
          - MARKDOWN
          - HTML
          - TIPTAP
        content: {}
        senderId:
          type: string
        replyTo:
          type: string
          format: email
      additionalProperties: false
    CampaignResponse:
      type: object
      required:
      - success
      - campaign
      - campaignId
      properties:
        success:
          type: boolean
          const: true
        campaign:
          $ref: '#/components/schemas/Campaign'
        campaignId:
          type: string
    ErrorResponse:
      type: object
      required:
      - name
      - message
      - statusCode
      properties:
        name:
          type: string
        message:
          type: string
        statusCode:
          type: integer
        details:
          type: object
          additionalProperties: true
    Campaign:
      type: object
      required:
      - id
      - name
      - subject
      - status
      properties:
        id:
          type: string
        campaignId:
          type: string
        name:
          type: string
        subject:
          type: string
        preview:
          type:
          - string
          - 'null'
        status:
          type: string
        contentType:
          type: string
          enum:
          - MARKDOWN
          - HTML
          - TIPTAP
        content: {}
        scheduledAt:
          type:
          - string
          - 'null'
          format: date-time
        sendAt:
          type:
          - string
          - 'null'
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      additionalProperties: true
    SuccessResponse:
      type: object
      additionalProperties: true
    CampaignListResponse:
      type: object
      required:
      - success
      - campaigns
      - total
      - page
      - limit
      - pageCount
      properties:
        success:
          type: boolean
          const: true
        campaigns:
          type: array
          items:
            $ref: '#/components/schemas/Campaign'
        total:
          type: integer
          minimum: 0
        page:
          type: integer
          minimum: 1
        limit:
          type: integer
          minimum: 1
        pageCount:
          type: integer
          minimum: 0
    CampaignSendInput:
      type: object
      properties:
        scheduledAt:
          type: string
          format: date-time
        timezone:
          type: string
          examples:
          - Europe/Paris
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Lumail organization API token
      description: 'Create an organization API token in Lumail and send it as Authorization: Bearer lum_....'
externalDocs:
  description: Lumail API and agent documentation
  url: https://lumail.io/docs/api-reference