FusionAuth Email API

The Email API from FusionAuth — 5 operation(s) for email.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 10

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

POST /api/email/send/{emailTemplateId} Send a tenant email using a template · Send email with id #
Ask an LLM
“How do I send a welcome email to a user with a template?”
“Can I send an email to several users at once using a template?”
Tell an agent
Send template {emailTemplateId} to {toAddresses}.
Send template {emailTemplateId} to {toAddresses} with cc {ccAddresses} and bcc {bccAddresses}.
POST /api/email/template Create an email template · Create email template #
Ask an LLM
“How do I create a new email template?”
“Can I give a new email template my own ID?”
Tell an agent
Create an email template {emailTemplate}.
Create a new email template with the ID I choose.
GET /api/email/template List all email templates · Retrieve email template #
Ask an LLM
“What email templates are available for my tenant?”
“Can I see every email template in one list?”
Tell an agent
List all email templates.
Show every email template in tenant {X-FusionAuth-TenantId}.
POST /api/email/template/preview Preview an unsaved email template · Retrieve email template preview with id #
Ask an LLM
“Can I preview an email template before saving it?”
“What would a draft template look like in a given locale?”
Tell an agent
Preview template {emailTemplate} in locale {locale}.
Show a preview of this unsaved email template.
POST /api/email/template/search Search email templates · Search email templates with id #
Ask an LLM
“How do I find email templates by name or subject?”
“Can I search templates with pagination?”
Tell an agent
Search email templates with {search}.
Find email templates matching {search}.
POST /api/email/template/{emailTemplateId} Create an email template with a given ID · Create email template with id #
Ask an LLM
“How do I create a template with a specific ID?”
“Can I set the template ID myself when creating it?”
Tell an agent
Create template {emailTemplate} with ID {emailTemplateId}.
Create a new email template {emailTemplateId} for tenant {X-FusionAuth-TenantId}.
DELETE /api/email/template/{emailTemplateId} Delete an email template · Delete email template with id #
Ask an LLM
“How do I delete an email template?”
“Can I remove a template I no longer use?”
Tell an agent destructive · confirm first
Delete email template {emailTemplateId}.
Remove template {emailTemplateId} from tenant {X-FusionAuth-TenantId}.
PATCH /api/email/template/{emailTemplateId} Patch an email template · Patch email template with id #
Ask an LLM
“How do I change just the subject of an email template?”
“Can I patch a template without replacing it?”
Tell an agent
Patch email template {emailTemplateId} with {emailTemplate}.
Change only the subject of template {emailTemplateId}.
GET /api/email/template/{emailTemplateId} Get one email template · Retrieve email template with id #
Ask an LLM
“How do I fetch a single email template by ID?”
“What subject and body does one template have?”
Tell an agent
Get email template {emailTemplateId}.
Show the subject and body of template {emailTemplateId}.
PUT /api/email/template/{emailTemplateId} Replace an email template · Update email template with id #
Ask an LLM
“How do I overwrite an existing email template?”
“Can I replace a template's subject and body in full?”
Tell an agent
Replace email template {emailTemplateId} with {emailTemplate}.
Overwrite the whole template {emailTemplateId}.

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/fusionauth:fusionauth-email-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

fusionauth-email-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.66.0
  title: FusionAuth Email API
  description: This is a FusionAuth server. Find out more at https://fusionauth.io. You need to set up an API key in the FusionAuth instance you are using to test out the API calls.
  license:
    name: Apache2
servers:
- url: http://localhost:9011
- url: https://sandbox.fusionauth.io
security:
- ApiKeyAuth: []
tags:
- name: Email
paths:
  /api/email/send/{emailTemplateId}:
    post:
      description: Send an email using an email template Id. You can optionally provide requestData to access key value pairs in the email template.
      operationId: sendEmailWithId
      parameters:
      - name: emailTemplateId
        in: path
        schema:
          type: string
        required: true
        description: The Id for the template.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      tags:
      - Email
      summary: Send email with id
      x-summary-source: derived
  /api/email/template:
    post:
      description: Creates an email template. You can optionally specify an Id for the template, if not provided one will be generated.
      operationId: createEmailTemplate
      parameters:
      - in: header
        name: X-FusionAuth-TenantId
        description: The unique Id of the tenant used to scope this API request. Only required when there is more than one tenant and the API key is not tenant-scoped.
        required: false
        schema:
          type: string
          format: UUID
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailTemplateRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailTemplateResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      tags:
      - Email
      summary: Create email template
      x-summary-source: derived
    get:
      description: Retrieves the email template for the given Id. If you don't specify the Id, this will return all the email templates.
      operationId: retrieveEmailTemplate
      parameters:
      - in: header
        name: X-FusionAuth-TenantId
        description: The unique Id of the tenant used to scope this API request. Only required when there is more than one tenant and the API key is not tenant-scoped.
        required: false
        schema:
          type: string
          format: UUID
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailTemplateResponse'
        default:
          description: Error
      tags:
      - Email
      summary: Retrieve email template
      x-summary-source: derived
  /api/email/template/preview:
    post:
      description: Creates a preview of the email template provided in the request. This allows you to preview an email template that hasn't been saved to the database yet. The entire email template does not need to be provided on the request. This will create the preview based on whatever is given.
      operationId: retrieveEmailTemplatePreviewWithId
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreviewRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreviewResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      tags:
      - Email
      summary: Retrieve email template preview with id
      x-summary-source: derived
  /api/email/template/search:
    post:
      description: Searches email templates with the specified criteria and pagination.
      operationId: searchEmailTemplatesWithId
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailTemplateSearchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailTemplateSearchResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      tags:
      - Email
      summary: Search email templates with id
      x-summary-source: derived
  /api/email/template/{emailTemplateId}:
    post:
      description: Creates an email template. You can optionally specify an Id for the template, if not provided one will be generated.
      operationId: createEmailTemplateWithId
      parameters:
      - name: emailTemplateId
        in: path
        schema:
          type: string
        required: true
        description: The Id for the template. If not provided a secure random UUID will be generated.
      - in: header
        name: X-FusionAuth-TenantId
        description: The unique Id of the tenant used to scope this API request. Only required when there is more than one tenant and the API key is not tenant-scoped.
        required: false
        schema:
          type: string
          format: UUID
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailTemplateRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailTemplateResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      tags:
      - Email
      summary: Create email template with id
      x-summary-source: derived
    delete:
      description: Deletes the email template for the given Id.
      operationId: deleteEmailTemplateWithId
      parameters:
      - name: emailTemplateId
        in: path
        schema:
          type: string
        required: true
        description: The Id of the email template to delete.
      - in: header
        name: X-FusionAuth-TenantId
        description: The unique Id of the tenant used to scope this API request. Only required when there is more than one tenant and the API key is not tenant-scoped.
        required: false
        schema:
          type: string
          format: UUID
      responses:
        '200':
          description: Success
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      tags:
      - Email
      summary: Delete email template with id
      x-summary-source: derived
    patch:
      description: Updates, via PATCH, the email template with the given Id.
      operationId: patchEmailTemplateWithId
      parameters:
      - name: emailTemplateId
        in: path
        schema:
          type: string
        required: true
        description: The Id of the email template to update.
      - in: header
        name: X-FusionAuth-TenantId
        description: The unique Id of the tenant used to scope this API request. Only required when there is more than one tenant and the API key is not tenant-scoped.
        required: false
        schema:
          type: string
          format: UUID
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailTemplateRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailTemplateResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      tags:
      - Email
      summary: Patch email template with id
      x-summary-source: derived
    get:
      description: Retrieves the email template for the given Id. If you don't specify the Id, this will return all the email templates.
      operationId: retrieveEmailTemplateWithId
      parameters:
      - name: emailTemplateId
        in: path
        schema:
          type: string
        required: true
        description: The Id of the email template.
      - in: header
        name: X-FusionAuth-TenantId
        description: The unique Id of the tenant used to scope this API request. Only required when there is more than one tenant and the API key is not tenant-scoped.
        required: false
        schema:
          type: string
          format: UUID
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailTemplateResponse'
        default:
          description: Error
      tags:
      - Email
      summary: Retrieve email template with id
      x-summary-source: derived
    put:
      description: Updates the email template with the given Id.
      operationId: updateEmailTemplateWithId
      parameters:
      - name: emailTemplateId
        in: path
        schema:
          type: string
        required: true
        description: The Id of the email template to update.
      - in: header
        name: X-FusionAuth-TenantId
        description: The unique Id of the tenant used to scope this API request. Only required when there is more than one tenant and the API key is not tenant-scoped.
        required: false
        schema:
          type: string
          format: UUID
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailTemplateRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailTemplateResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      tags:
      - Email
      summary: Update email template with id
      x-summary-source: derived
components:
  schemas:
    LocalizedStrings:
      description: Models a set of localized Strings that can be stored as JSON.
      type: object
      properties: {}
    EmailTemplateResponse:
      description: Email template response.
      type: object
      properties:
        emailTemplate:
          $ref: '#/components/schemas/EmailTemplate'
        emailTemplates:
          type: array
          items:
            $ref: '#/components/schemas/EmailTemplate'
    EmailTemplateSearchResponse:
      description: Email template search response
      type: object
      properties:
        emailTemplates:
          type: array
          items:
            $ref: '#/components/schemas/EmailTemplate'
        total:
          type: integer
          format: int64
    Attachment:
      description: This class is a simple attachment with a byte array, name and MIME type.
      type: object
      properties:
        attachment:
          type: string
          format: binary
        mime:
          type: string
        name:
          type: string
    Locale:
      description: A Locale object represents a specific geographical, political, or cultural region.
      example: en_US
      type: string
    Errors:
      description: Standard error domain object that can also be used as the response from an API call.
      type: object
      properties:
        fieldErrors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        generalErrors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
    SendResponse:
      description: ''
      type: object
      properties:
        anonymousResults:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/EmailTemplateErrors'
        results:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/EmailTemplateErrors'
    EmailAddress:
      description: An email address.
      type: object
      properties:
        address:
          type: string
        display:
          type: string
    SendRequest:
      description: ''
      type: object
      properties:
        applicationId:
          type: string
          format: uuid
        bccAddresses:
          type: array
          items:
            type: string
        ccAddresses:
          type: array
          items:
            type: string
        preferredLanguages:
          type: array
          items:
            $ref: '#/components/schemas/Locale'
        requestData:
          type: object
          additionalProperties:
            type: object
        toAddresses:
          type: array
          items:
            $ref: '#/components/schemas/EmailAddress'
        userIds:
          type: array
          items:
            type: string
            format: uuid
    Error:
      description: Defines an error.
      type: object
      properties:
        code:
          type: string
        data:
          type: object
          additionalProperties:
            type: object
        message:
          type: string
    EmailTemplateSearchRequest:
      description: Search request for email templates
      type: object
      properties:
        search:
          $ref: '#/components/schemas/EmailTemplateSearchCriteria'
    PreviewRequest:
      description: ''
      type: object
      properties:
        emailTemplate:
          $ref: '#/components/schemas/EmailTemplate'
        locale:
          $ref: '#/components/schemas/Locale'
    ZonedDateTime:
      description: 'The number of milliseconds since the unix epoch: January 1, 1970 00:00:00 UTC. This value is always in UTC.'
      example: '1659380719000'
      type: integer
      format: int64
    EmailTemplateErrors:
      type: object
      properties:
        parseErrors:
          type: object
          additionalProperties:
            type: string
        renderErrors:
          type: object
          additionalProperties:
            type: string
    EmailTemplateRequest:
      description: Email template request.
      type: object
      properties:
        emailTemplate:
          $ref: '#/components/schemas/EmailTemplate'
    Email:
      description: This class is an abstraction of a simple email message.
      type: object
      properties:
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/Attachment'
        bcc:
          type: array
          items:
            $ref: '#/components/schemas/EmailAddress'
        cc:
          type: array
          items:
            $ref: '#/components/schemas/EmailAddress'
        from:
          $ref: '#/components/schemas/EmailAddress'
        html:
          type: string
        replyTo:
          $ref: '#/components/schemas/EmailAddress'
        subject:
          type: string
        text:
          type: string
        to:
          type: array
          items:
            $ref: '#/components/schemas/EmailAddress'
    EmailTemplate:
      description: Stores an email template used to send emails to users.
      type: object
      properties:
        defaultFromName:
          type: string
        defaultHtmlTemplate:
          type: string
        defaultSubject:
          type: string
        defaultTextTemplate:
          type: string
        fromEmail:
          type: string
        id:
          type: string
          format: uuid
        insertInstant:
          $ref: '#/components/schemas/ZonedDateTime'
        lastUpdateInstant:
          $ref: '#/components/schemas/ZonedDateTime'
        localizedFromNames:
          $ref: '#/components/schemas/LocalizedStrings'
        localizedHtmlTemplates:
          $ref: '#/components/schemas/LocalizedStrings'
        localizedSubjects:
          $ref: '#/components/schemas/LocalizedStrings'
        localizedTextTemplates:
          $ref: '#/components/schemas/LocalizedStrings'
        name:
          type: string
    EmailTemplateSearchCriteria:
      description: Search criteria for Email templates
      type: object
      properties:
        name:
          type: string
        numberOfResults:
          type: integer
        orderBy:
          type: string
        startRow:
          type: integer
    PreviewResponse:
      description: ''
      type: object
      properties:
        email:
          $ref: '#/components/schemas/Email'
        errors:
          $ref: '#/components/schemas/Errors'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: Authorization
      in: header
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
x-provenance:
  method: harvested
  publisher: FusionAuth
  source: https://raw.githubusercontent.com/fusionauth/fusionauth-openapi/HEAD/openapi.yaml
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)