FirstPromoter Emails API

The Emails API from FirstPromoter — 8 operation(s) for emails.

GitHub OpenAPI

Operations 11

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /emails List email templates · Get available emails #
Ask an LLM
“Which email templates are available to send?”
“Can I list only the email templates that are triggered on a specific event?”
Tell an agent
List all email templates.
Find email templates matching {q}.
POST /emails Create an email template · Create email #
Ask an LLM
“How do I create a new email template with a subject and body?”
“Can I restrict which campaigns an email template can be sent to?”
Tell an agent
Create an email template named {name} with subject {subject} and content {content}.
Create email {name} with subject {subject}, content {content} and trigger {trigger}.
GET /emails/{id} Get an email template · Get email by id #
Ask an LLM
“What subject and content does a specific email template have?”
“Can I fetch one email template by its id?”
Tell an agent
Get email template {id}.
Show the subject and content of email {id}.
PUT /emails/{id} Update an email template · Update email #
Ask an LLM
“Can I change the subject or content of an existing email template?”
“Is it possible to update the trigger on an email template?”
Tell an agent
Update email template {id} with subject {subject} and content {content}.
Set the trigger on email {id} to {trigger}.
DELETE /emails/{id} Delete an email template · Delete email #
Ask an LLM
“How do I delete an email template I no longer use?”
“Can I remove an email template by its id?”
Tell an agent destructive · confirm first
Delete email template {id}.
Remove the email template {id} permanently.
POST /emails/{id}/copy Copy an email template · Copy email #
Ask an LLM
“Can I duplicate an existing email template?”
“What happens to the copy of an email template?”
Tell an agent
Copy email template {id}.
Duplicate the email template {id} so I can edit it.
POST /emails/{id}/send_now Send an email template now · Send email #
Ask an LLM
“How do I send an email template to recipients right away?”
“Can I trigger an email template to send immediately?”
Tell an agent
Send email template {id} now.
Trigger an immediate send of email {id}.
POST /emails/{id}/send_test Send a test of an email template · Send test email #
Ask an LLM
“Can I preview how an email template will look before sending it?”
“What's the way to send a test email of a template to myself?”
Tell an agent
Send a test of email template {id} to me.
Preview email {id} by sending it to my inbox.
GET /emails/template Get the company email theme · Get the html of the company email theme #
Ask an LLM
“What does the company-wide email theme look like?”
“Can I fetch the base HTML theme used for all emails?”
Tell an agent
Get the company email theme.
Show the base HTML theme for emails.
PATCH /emails/custom_template Update the company email theme · Updates the html of the company email theme #
Ask an LLM
“How do I change the company's email theme HTML?”
“Can I customize the base email theme?”
Tell an agent
Update the company email theme to {html}.
Replace the base email theme with {html}.
POST /emails/test_custom_template Preview the custom email theme · Sends a test email to current user with the custom template #
Ask an LLM
“Can I see how my custom email theme renders in a real email?”
“What's the way to test the custom theme before it goes live?”
Tell an agent
Send a test email with my custom theme.
Preview the custom email theme by sending it to me.

Documentation

📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/payout-methods-api
📖
APIReference
https://docs.firstpromoter.com/api-reference-v2/api-admin/introduction
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/products-api
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/assets
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/campaigns
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/commissions
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/contract-documents
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/email-settings
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/payout-methods
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/payouts
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/promo-codes
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/promoter-campaigns
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/promoters
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/referral-links
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/referrals
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/reports
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/asset-categories-api
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/assets
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-admin/batches
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/campaigns-api
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-admin/commissions
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/contract-documents-api
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/contracts-api
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/custom-referral-statuses
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/dashboard-api
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-admin
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/invoices
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/payments-batches
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-admin/payouts
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-admin/promo-codes
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-admin/promoter-campaigns
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-admin/promoters
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-admin/referrals
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-admin/reports
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/rewards
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-admin/tracking-api
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-admin/webhooks

Specifications

Other Resources

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/firstpromoter:firstpromoter-emails-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

firstpromoter-emails-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: FirstPromoter Email Emails API
  version: 2.0.0
  description: API for managing email templates and triggers
servers:
- url: https://api.firstpromoter.com/api/v2/company
security:
- BearerAuth: []
tags:
- name: Emails
paths:
  /emails:
    get:
      summary: Get available emails
      tags:
      - Emails
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - name: q
        in: query
        description: Search params. Searches by name, subject.
        required: false
        schema:
          type: string
      - name: filters[trigger_enabled]
        in: query
        description: Trigger state (Enabled / Disabled)
        required: false
        schema:
          type: string
          enum:
          - 'yes'
          - 'no'
      - name: filters[trigger_on]
        in: query
        description: Trigger on
        required: false
        schema:
          type: string
          enum:
          - not_set
          - lead_subscribed
          - lead_becomes_referral
          - promoter_signs_up
          - promoter_pending
          - promoter_accepted
          - promoter_rejected
          - promoter_blocked
          - promotion_reached_target
          - reward_created
          - reward_approved
          - reward_denied
          - fulfilment_pending
          - fulfilment_completed
          - lead_signup
          - promoter_invited
          - fulfilment_due
          - lead_pending
          - fulfilment_processing
          - new_contract_document
          - invalid_invoicing_details
          - lead_cancelled
          - count_reached
          - inactivity
          - broadcast
          - recurring
      - name: filters[sent_count][from]
        in: query
        description: sent_count from
        required: false
        schema:
          type: integer
      - name: filters[sent_count][to]
        in: query
        description: sent_count to
        required: false
        schema:
          type: integer
      - name: filters[campaign_id]
        in: query
        description: Campaign ids. Can be Integer or Array of Integers
        required: false
        schema:
          oneOf:
          - type: integer
          - type: array
            items:
              type: integer
      - name: sorting[sent_count]
        in: query
        description: The sort by sent_count direction
        required: false
        schema:
          type: string
          enum:
          - asc
          - desc
      - name: sorting[subject]
        in: query
        description: The sort by subject direction
        required: false
        schema:
          type: string
          enum:
          - asc
          - desc
      responses:
        '200':
          description: Success
        '401':
          description: Unauthorized
      operationId: getEmails
      x-operation-id-source: derived
    post:
      summary: Create email
      tags:
      - Emails
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              - subject
              - content
              - allowed_campaign_ids
              - trigger
              properties:
                name:
                  type: string
                  description: Name of the email
                subject:
                  type: string
                  description: Subject of the email
                content:
                  type: string
                  description: Content of the email
                allowed_campaign_ids:
                  type: array
                  description: Array of allowed campaign ids
                trigger:
                  type: object
                  required:
                  - enabled
                  - trigger_on
                  - settings
                  properties:
                    enabled:
                      type: boolean
                      description: Flag to enable trigger
                    trigger_on:
                      type: string
                      enum:
                      - promoter_accepted
                      - promoter_rejected
                      - reward_created
                      - fulfilment_completed
                      - count_reached
                      - lead_signup
                      - inactivity
                      - broadcast
                      - recurring
                    settings:
                      type: object
                      properties:
                        delay_interval:
                          type: string
                          enum:
                          - second
                          - minute
                          - hour
                          - day
                          description: Delay interval is required when trigger_on is 'promoter_accepted'
                        delay_value:
                          type: integer
                          description: Delay value is required when trigger_on is 'promoter_accepted'
                        count:
                          type: integer
                          description: Count is required when trigger_on is 'count_reached'
                        metric:
                          type: string
                          enum:
                          - clicks
                          - referrals
                          - customers
                          - cancellations
                          description: Metric is required when trigger_on is 'count_reached' or 'inactivity'
                        period_in_days:
                          type: integer
                          description: Period in days is required when trigger_on is 'inactivity'
                        frequency:
                          type: string
                          enum:
                          - weekly
                          - monthly
                          description: Required for recurring trigger_on
                        day:
                          type: integer
                          description: Required for recurring trigger_on. When frequency == weekly -> From 0(Sunday) to 6(Saturday). When frequency == montlhy -> From 1 to 31.
                        hour:
                          type: integer
                          minimum: 0
                          maximum: 23
                          description: Required for recurring trigger_on
                        minute:
                          type: integer
                          minimum: 0
                          maximum: 59
                          description: Required for recurring trigger_on
      responses:
        '200':
          description: Success
        '401':
          description: Unauthorized
      operationId: postEmails
      x-operation-id-source: derived
  /emails/{id}:
    get:
      summary: Get email by id
      tags:
      - Emails
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - name: id
        in: path
        required: true
        description: The email id
        schema:
          type: string
      responses:
        '200':
          description: Success
        '401':
          description: Unauthorized
      operationId: getEmailsById
      x-operation-id-source: derived
    put:
      summary: Update email
      tags:
      - Emails
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - name: id
        in: path
        required: true
        description: The email id
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailRequest'
      responses:
        '200':
          description: Success
        '401':
          description: Unauthorized
      operationId: putEmailsById
      x-operation-id-source: derived
    delete:
      summary: Delete email
      tags:
      - Emails
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - name: id
        in: path
        required: true
        description: The email id
        schema:
          type: string
      responses:
        '200':
          description: Success
        '401':
          description: Unauthorized
      operationId: deleteEmailsById
      x-operation-id-source: derived
  /emails/{id}/copy:
    post:
      summary: Copy email
      tags:
      - Emails
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - name: id
        in: path
        required: true
        description: The email id
        schema:
          type: string
      responses:
        '200':
          description: Success
        '401':
          description: Unauthorized
      operationId: postEmailsByIdCopy
      x-operation-id-source: derived
  /emails/{id}/send_now:
    post:
      summary: Send email
      tags:
      - Emails
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - name: id
        in: path
        required: true
        description: The email id
        schema:
          type: string
      responses:
        '200':
          description: Success
        '401':
          description: Unauthorized
      operationId: postEmailsByIdSendNow
      x-operation-id-source: derived
  /emails/{id}/send_test:
    post:
      summary: Send test email
      tags:
      - Emails
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - name: id
        in: path
        required: true
        description: The email id
        schema:
          type: string
      responses:
        '200':
          description: Success
        '401':
          description: Unauthorized
      operationId: postEmailsByIdSendTest
      x-operation-id-source: derived
  /emails/template:
    get:
      summary: Get the html of the company email theme
      tags:
      - Emails
      responses:
        '200':
          description: Success
      operationId: getEmailsTemplate
      x-operation-id-source: derived
  /emails/custom_template:
    patch:
      summary: Updates the html of the company email theme
      tags:
      - Emails
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - html
              properties:
                html:
                  type: string
                  description: The new html content for the company email theme
      responses:
        '200':
          description: Success
        '401':
          description: Unauthorized
      operationId: patchEmailsCustomTemplate
      x-operation-id-source: derived
  /emails/test_custom_template:
    post:
      summary: Sends a test email to current user with the custom template
      tags:
      - Emails
      responses:
        '200':
          description: Success
        '401':
          description: Unauthorized
      operationId: postEmailsTestCustomTemplate
      x-operation-id-source: derived
components:
  parameters:
    AccountId:
      name: Account-ID
      in: header
      required: true
      description: Account identifier that specifies which account is making the request
      schema:
        type: string
        example: acc_123456
  schemas:
    EmailRequest:
      type: object
      required:
      - name
      - subject
      - content
      - allowed_campaign_ids
      - trigger
      properties:
        name:
          type: string
          description: Name of the email
        subject:
          type: string
          description: Subject of the email
        content:
          type: string
          description: Content of the email
        allowed_campaign_ids:
          type: array
          description: Array of allowed campaign ids
        trigger:
          type: object
          required:
          - enabled
          - trigger_on
          - settings
          properties:
            enabled:
              type: boolean
              description: Flag to enable trigger
            trigger_on:
              type: string
              enum:
              - promoter_accepted
              - promoter_rejected
              - reward_created
              - fulfilment_completed
              - count_reached
              - lead_signup
              - inactivity
              - broadcast
              - recurring
              description: Trigger on
            settings:
              type: object
              properties:
                delay_interval:
                  type: string
                  enum:
                  - second
                  - minute
                  - hour
                  - day
                  description: Delay interval is required when trigger_on is 'promoter_accepted'
                delay_value:
                  type: integer
                  description: Delay value is required when trigger_on is 'promoter_accepted'
                count:
                  type: integer
                  description: Count is required when trigger_on is 'count_reached'
                metric:
                  type: string
                  enum:
                  - clicks
                  - referrals
                  - customers
                  - cancellations
                  description: Metric is required when trigger_on is 'count_reached' or 'inactivity'
                period_in_days:
                  type: integer
                  description: Period in days is required when trigger_on is 'inactivity'
                frequency:
                  type: string
                  enum:
                  - weekly
                  - monthly
                  description: Required for recurring trigger_on
                day:
                  type: integer
                  description: Required for recurring trigger_on. When frequency == weekly -> From 0(Sunday) to 6(Saturday). When frequency == montlhy -> From 1 to 31.
                hour:
                  type: integer
                  minimum: 0
                  maximum: 23
                  description: Required for recurring trigger_on
                minute:
                  type: integer
                  minimum: 0
                  maximum: 59
                  description: Required for recurring trigger_on
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Access token passed as a Bearer token in the Authorization header
    accountId:
      type: apiKey
      in: header
      name: ACCOUNT-ID
      description: Account ID required with bearer token