MoEngage Email Templates API

Manage email templates in MoEngage.

Operations 8

POST /email-templates Create Email Template (V1) #
GET /email-templates Get All Templates #
GET /email-templates/{id} Get Specific Template #
PUT /email-templates/{id} Update Specific Template #
PUT /bulk/email-templates Bulk Create/Update Templates #
POST /custom-templates/email Create Email Template (V2) #
PUT /custom-templates/email Update Email Template #
POST /custom-templates/email/search Search Email Template #

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/moengage-email-templates-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 email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

moengage-email-templates-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Moengage Email Templates API
  version: '1.0'
  description: 'Operations tagged Email Templates across 2 of this provider''s published API definitions: moengage-email-templates-1-openapi.yml, moengage-email-templates-2-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api-{dc}.moengage.com/v2
  description: MoEngage API Server
  variables:
    dc:
      default: '01'
      description: The ‘dc’ in the API Endpoint URL refers to the MoEngage Data Center (DC). MoEngage hosts each customer in a different DC. You can find your DC number and replace the value of ‘dc’ in the URL by referring to the DC and API endpoint mapping [here](/api/introduction#data-centers). Your MoEngage Data Center (DC) can be 01, 02, 03, 04, 05, 06, or 101.
- url: https://api-{dc}.moengage.com/v1.0
  description: MoEngage API Server
  variables:
    dc:
      default: '01'
      description: The ‘dc’ in the API Endpoint URL refers to the MoEngage Data Center (DC). MoEngage hosts each customer in a different DC. You can find your DC number and replace the value of ‘dc’ in the URL by referring to the DC and API endpoint mapping [here](/api/introduction#data-centers). Your MoEngage Data Center (DC) can be 01, 02, 03, 04, 05, 06, or 101.
tags:
- name: Email Templates
  description: Manage email templates in MoEngage.
paths:
  /email-templates:
    post:
      summary: Create Email Template (V1)
      description: 'This API creates an email template in MoEngage. You can use this API to upload templates created outside the MoEngage ecosystem to MoEngage and use them for campaign creation on the MoEngage dashboard.

        '
      operationId: createEmailTemplate
      tags:
      - Email Templates
      x-mint:
        content: '#### Rate Limit

          The rate limits are at the workspace level, and a maximum of 1000 (sum of all the API requests per workspace) requests are allowed for a workspace per minute.

          '
      parameters:
      - name: MOE-APPKEY
        in: header
        required: true
        schema:
          type: string
        description: 'This is the Workspace ID of your MoEngage account that must be passed with the request. You can find it in the MoEngage dashboard at **Settings** > **Account** > **APIs** > **Workspace ID (earlier app id)**.

          '
        example: APP ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplateCreateRequest'
      responses:
        '200':
          description: This response is returned when the request is processed successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                    description: 'This field contains the status of the request and denotes whether it was successful or not.

                      '
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        description: 'This field contains the template id and needs to be stored by you. This template id would be used for searching a specific template and updating it. The template id is a String.

                          '
                        example: 63f4962d4d31f4c68d980a01
                      msg:
                        type: string
                        description: 'This field contains information about the successful creation of the template.

                          '
                        example: Custom email template saved
              examples:
                Success:
                  value:
                    status: success
                    data:
                      id: 63f4962d4d31f4c68d980a01
                      msg: Custom email template saved
        '400':
          description: This response is returned when the required parameters are missing from the request or when the provided parameters are invalid, or when a template already exists with the same version, name, or id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                InvalidRequestBody:
                  value:
                    status: error
                    data:
                      code: 400
                      title: Invalid request body
                      description: MOE-APPKEY header is invalid or empty
                EmptyName:
                  value:
                    status: error
                    data:
                      code: 400
                      title: Invalid email name
                      description: Name field is empty
        '401':
          description: This response is returned when the authorization parameters are missing in the HTTP Auth Header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                AuthFailure:
                  value:
                    status: error
                    data:
                      code: 401
                      title: Authentication required
                      description: Invalid APP_ID used in Authentication Header
        '429':
          description: This response is returned when the number of requests per minute has exceeded the rate limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                RateLimit:
                  value:
                    status: error
                    data:
                      code: 429
                      title: rate limiter exception
                      description: Exceeded rate limit for this app
        '500':
          description: This response is returned when the system runs into an unexpected error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  title:
                    type: string
                  message:
                    type: string
              examples:
                ServerError:
                  value:
                    title: Internal Server Error
                    message: An unexpected error was encountered while processing this request. Please contact MoEngage Team
      security:
      - basicAuth: []
        appKey: []
    get:
      summary: Get All Templates
      description: 'This API fetches the list of all the email templates available in your MoEngage account.

        '
      operationId: getAllTemplates
      tags:
      - Email Templates
      x-mint:
        content: '#### Rate Limit

          The rate limits are at the workspace level, and a maximum of 1000 (sum of all the API requests per workspace) requests are allowed for a workspace per minute.

          '
      parameters:
      - name: MOE-APPKEY
        in: header
        required: true
        schema:
          type: string
        description: 'This is the Workspace ID of your MoEngage account that must be passed with the request. You can find it in the MoEngage dashboard at **Settings** > **Account** > **APIs** > **Workspace ID (earlier app id)**.

          '
        example: WORKSPACE ID
      - name: page
        in: query
        description: 'This parameter represents the page number. If this value is not specified, it will be considered as one by default. Each page will have a batch size of 20( 20 templates will be returned in a page).

          '
        schema:
          type: integer
          default: 1
          example: 1
      responses:
        '200':
          description: This response is returned when the request is processed successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                    description: This field contains the status of the request and denotes whether it was successful or not.
                  data:
                    type: object
                    description: 'This field contains the id of the created template when the request is successful and the error details in case of an unsuccessful request.

                      '
                    properties:
                      templates:
                        type: array
                        items:
                          $ref: '#/components/schemas/TemplateDetails'
                      no_of_templates:
                        type: integer
                        description: The number of templates returned is also available in the response.
                        example: 13
              examples:
                Success:
                  value:
                    status: success
                    data:
                      templates:
                      - template_id: 645a2bd910e0307e6d7f7717
                        template_name: Coupon_code_template
                        is_archived: false
                        builder_supported: false
                        editor: Froala Editor
                        created_date: '2023-05-09 11:17:43.112000'
                        updated_at: '2023-05-09 11:18:37.692000'
                        updated_by: jane.doe@example.com
                      no_of_templates: 13
        '400':
          description: This response is returned when the required parameters are missing from the request or when the provided parameters are invalid, or when a template already exists with the same version, name, or id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                InvalidTemplateId:
                  value:
                    status: error
                    data:
                      code: 400
                      title: Invalid template id
                      description: Please provide a valid template id
        '401':
          description: This response is returned when the authorization parameters are missing in the HTTP Auth Header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                AuthFailure:
                  value:
                    status: error
                    data:
                      code: 401
                      title: Authentication required
                      description: Invalid APP_ID used in Authentication Header
        '429':
          description: This response is returned when the number of requests per minute has exceeded the rate limit or the number of templates has exceeded the allowed quota per channel.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                RateLimit:
                  value:
                    status: error
                    data:
                      code: 429
                      title: rate limiter exception
                      description: Exceeded rate limit for this app
        '500':
          description: This response is returned when the system runs into an unexpected error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  title:
                    type: string
                  message:
                    type: string
              examples:
                ServerError:
                  value:
                    title: Internal Server Error
                    message: An unexpected error was encountered while processing this request. Please contact MoEngage Team
      security:
      - basicAuth: []
        appKey: []
    servers:
    - url: https://api-{dc}.moengage.com/v2
      description: MoEngage API Server
      variables:
        dc:
          default: '01'
          description: The ‘dc’ in the API Endpoint URL refers to the MoEngage Data Center (DC). MoEngage hosts each customer in a different DC. You can find your DC number and replace the value of ‘dc’ in the URL by referring to the DC and API endpoint mapping [here](/api/introduction#data-centers). Your MoEngage Data Center (DC) can be 01, 02, 03, 04, 05, 06, or 101.
  /email-templates/{id}:
    get:
      summary: Get Specific Template
      description: 'This API fetches an email template using its template ID.

        '
      operationId: getTemplateById
      tags:
      - Email Templates
      x-mint:
        content: '#### Rate Limit

          The rate limits are at the workspace level, and a maximum of 1000 (sum of all the API requests per workspace) requests are allowed for a workspace per minute.

          '
      parameters:
      - name: MOE-APPKEY
        in: header
        required: true
        schema:
          type: string
        description: 'This is the Workspace ID of your MoEngage account that must be passed with the request. You can find it in the MoEngage dashboard at **Settings** > **Account** > **APIs** > **Workspace ID (earlier app id)**.

          '
        example: Workspace ID
      - name: id
        in: path
        required: true
        description: 'This is the Template id of the template being searched. The template id is a unique identifier that is generated at the time of template creation.

          '
        schema:
          type: string
          example: 63f30792c66ddcaac2ef9109
      responses:
        '200':
          description: This response is returned when the request is processed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateDetailsFlat'
              examples:
                Success:
                  value:
                    status: success
                    template_id: 645a0cec10e0307e6d7f7716
                    template_name: End_of_season_sale_template
                    subject: ''
                    template_content: <!DOCTYPE html><html>...</html>
                    attachments: []
                    source: Partner
                    sender_name: Your Brand Name
                    editor: Froala Editor
                    created_date: '2023-05-09 09:05:46.350000'
                    updated_at: '2023-05-09 10:00:57.149000'
                    updated_by: john.doe@example.com
        '400':
          description: This response is returned when the required parameters are missing from the request or when the provided parameters are invalid, or when a template already exists with the same version, name, or id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                InvalidTemplateId:
                  value:
                    status: error
                    data:
                      code: 400
                      title: Invalid template id
                      description: Please provide a valid template id
        '401':
          description: This response is returned when the authorization parameters are missing in the HTTP Auth Header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                AuthFailure:
                  value:
                    status: error
                    data:
                      code: 401
                      title: Authentication required
                      description: Invalid APP_ID used in Authentication Header
        '429':
          description: This response is returned when the number of requests per minute has exceeded the rate limit, or the number of templates has exceeded the allowed quota per channel.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                RateLimit:
                  value:
                    status: error
                    data:
                      code: 429
                      title: rate limiter exception
                      description: Exceeded rate limit for this app
        '500':
          description: This response is returned when the system runs into an unexpected error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  title:
                    type: string
                  message:
                    type: string
              examples:
                ServerError:
                  value:
                    title: Internal Server Error
                    message: An unexpected error was encountered while processing this request. Please contact MoEngage Team
      security:
      - basicAuth: []
        appKey: []
    put:
      summary: Update Specific Template
      description: Updates an existing email template by specifying its template ID in the path.
      operationId: updateTemplateById
      tags:
      - Email Templates
      x-mint:
        content: '#### Rate Limit

          The rate limits are at the workspace level, and a maximum of 1000 (sum of all the API requests per workspace) requests are allowed for a workspace per minute.

          '
      parameters:
      - name: MOE-APPKEY
        in: header
        required: true
        schema:
          type: string
        description: 'This is the Workspace ID of your MoEngage account that must be passed with the request. You can find it in the MoEngage dashboard at **Settings** > **Account** > **APIs** > **Workspace ID (earlier app id)**.

          '
        example: Workspace ID
      - name: id
        in: path
        required: true
        description: 'This is the Template id of the template being updated. It is mandatory to add this field when updating a template.

          '
        schema:
          type: string
          example: 63f30792c66ddcaac2ef9109
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplateUpdateRequest'
      responses:
        '200':
          description: This response is returned when the request is processed successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                    description: This field contains the status of the request and denotes whether it was successful or not.
                  data:
                    type: object
                    description: This field contains the id of the created template when the request is successful and the error details in case of an unsuccessful request.
                    properties:
                      id:
                        type: string
                        example: 63f4962d4d31f4c68d980a01
                      msg:
                        type: string
                        example: Custom email template updated
        '400':
          description: This response is returned when the required parameters are missing from the request or when the provided parameters are invalid, or when a template already exists with the same version, name, or id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: This response is returned when the authorization parameters are missing in the HTTP Auth Header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: This response is returned when the number of requests per minute has exceeded the rate limit or the number of templates has exceeded the allowed quota per channel.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: This response is returned when the system runs into an unexpected error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - basicAuth: []
        appKey: []
    servers:
    - url: https://api-{dc}.moengage.com/v2
      description: MoEngage API Server
      variables:
        dc:
          default: '01'
          description: The ‘dc’ in the API Endpoint URL refers to the MoEngage Data Center (DC). MoEngage hosts each customer in a different DC. You can find your DC number and replace the value of ‘dc’ in the URL by referring to the DC and API endpoint mapping [here](/api/introduction#data-centers). Your MoEngage Data Center (DC) can be 01, 02, 03, 04, 05, 06, or 101.
  /bulk/email-templates:
    put:
      summary: Bulk Create/Update Templates
      description: 'This API creates or updates email templates in bulk. You can create or update up to 50 templates in a single request.

        '
      operationId: bulkCreateUpdateTemplates
      tags:
      - Email Templates
      x-mint:
        content: '#### Rate Limit

          The rate limits are at the workspace level, and a maximum of 1000 (sum of all the API requests per workspace) requests are allowed for a workspace per minute.

          '
      parameters:
      - name: MOE-APPKEY
        in: header
        required: true
        schema:
          type: string
        description: 'This is the Workspace ID of your MoEngage account that must be passed with the request. You can find it in the MoEngage dashboard at **Settings** > **Account** > **APIs** > **Workspace ID (earlier app id)**.

          '
        example: APP ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              description: You can pass the templates to be created and/or updated as an array of JSON Objects.
              maxItems: 50
              items:
                $ref: '#/components/schemas/TemplateBulkUpdateRequest'
      responses:
        '200':
          description: This response is returned when the request is processed successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                    description: This field contains the status of the request and denotes whether it was successful or not.
                  data:
                    type: object
                    description: This field contains the id of the created template when the request is successful and the error details in case of an unsuccessful request.
                    properties:
                      new_templates:
                        type: array
                        items:
                          type: string
                        description: 'This field contains the list of template ids for the newly created templates, and these need to be stored by you. The template id would be used for searching a specific template and updating it.

                          '
                        example:
                        - 63f497844d31f4c68d980a02
                        - 63f499344d31f4c68d720b04
                      updated_templates:
                        type: array
                        items:
                          type: string
                        description: 'This field contains the list of template ids for the updated templates.

                          '
                        example:
                        - 645a2bd910e0307e6d7f7717
              examples:
                Success:
                  value:
                    status: success
                    data:
                      new_templates:
                      - 645a2c0d10e0307e6d7f7719
                      updated_templates:
                      - 645a2bd910e0307e6d7f7717
        '400':
          description: This response is returned when the required parameters are missing from the request or when the provided parameters are invalid, or when a template already exists with the same version, name, or id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                ValidationFailure:
                  value:
                    status: success
                    data:
                      new_templates:
                      - Email attachment should be valid one with size less than 6mb & total attachments size less than 20mb
                      updated_templates:
                      - Given id is invalid email template id
        '401':
          description: This response is returned when the authorization parameters are missing in the HTTP Auth Header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                AuthFailure:
                  value:
                    status: error
                    data:
                      code: 401
                      title: Authentication required
                      description: Invalid APP_ID used in Authentication Header
        '429':
          description: This response is returned when the number of requests per minute has exceeded the rate limit or the number of templates has exceeded the allowed quota per channel.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                RateLimit:
                  value:
                    status: error
                    data:
                      code: 429
                      title: rate limiter exception
                      description: Exceeded rate limit for this app
        '500':
          description: This response is returned when the system runs into an unexpected error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  title:
                    type: string
                  message:
                    type: string
              examples:
                ServerError:
                  value:
                    title: Internal Server Error
                    message: An unexpected error was encountered while processing this request. Please contact MoEngage Team
      security:
      - basicAuth: []
        appKey: []
    servers:
    - url: https://api-{dc}.moengage.com/v2
      description: MoEngage API Server
      variables:
        dc:
          default: '01'
          description: The ‘dc’ in the API Endpoint URL refers to the MoEngage Data Center (DC). MoEngage hosts each customer in a different DC. You can find your DC number and replace the value of ‘dc’ in the URL by referring to the DC and API endpoint mapping [here](/api/introduction#data-centers). Your MoEngage Data Center (DC) can be 01, 02, 03, 04, 05, 06, or 101.
  /custom-templates/email:
    post:
      summary: Create Email Template (V2)
      description: 'This API creates an email template in MoEngage. You can use this API to upload templates created outside the MoEngage ecosystem to MoEngage and use them for campaign creation. The uploaded templates can be edited in the Froala editor (custom HTML editor) on the MoEngage dashboard.

        '
      operationId: createEmailTemplate
      tags:
      - Email Templates
      x-mint:
        content: '#### Rate Limit

          The rate limit is 100 RPM. You can upload a maximum of 10000 templates per channel.

          '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - basic_details
              - meta_info
              properties:
                basic_details:
                  $ref: '#/components/schemas/BasicDetails'
                meta_info:
                  $ref: '#/components/schemas/MetaInfo'
            examples:
              Parent Template in a Template Group:
                summary: Parent Template in a Template Group
                value:
                  basic_details:
                    subject: Email_Subject
                    email_content: <!DOCTYPE html><html><head><title>My Short HTML</title></head><body><h1>Hello, World!</h1><p>This is a simple HTML example.</p></body></html>
                    thumbnail_url: '{{template_thumbnail_thumbnail_url}}'
                    sender_name: Sender_Name
                    preview_text: Preview_text
                    attachments: []
                  meta_info:
                    created_by: john.doe@example.com
                    template_id: '{{template_id_1}}'
                    template_name: '{{template_name}}'
                    template_version: '{{template_version}}'
                    locale: '{{Locale_name}}'
                    variation: 1
              Associated Templates in the Same Template Group:
                summary: Associated Templates in the Same Template Group
                value:
                  basic_details:
                    subject: Email_Subject
                    email_content: <!DOCTYPE html><html><head><title>My Short HTML</title></head><body><h1>Hello, World!</h1><p>This is a simple HTML example.</p></body></html>
                    thumbnail_url: '{{template_thumbnail_image_url}}'
                    sender_name: Sender_Name
                    preview_text: Preview_text
                    attachments: []
                  meta_info:
                    created_by: john.doe@example.com
                    template_id: '{{template_id_2}}'
                    template_name: '{{template_name}}'
                    template_version: '{{template_version}}'
                    locale: '{{Locale_name}}'
                    variation: 2
                    group_id: '{{external_template_id_of_parent_template}}'
      responses:
        '200':
          description: This response is returned when the request is processed successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  external_template_id:
                    type: string
                    description: 'This field contains the unique template id corresponding to a successful template creation request and needs to be stored by you. This template id would be used for searching a specific template and updating it.

                      For a parent (default) template, the generated "external_template_id" acts as its group ID.

                      '
              examples:
                success:
                  value:
                    external_template_id: d05a44f0-a7cf-471a-bcb6-63054800a367
        '400':
          description: This response is returned when the required parameters are missing from the request, or when the provided parameters are invalid, or when a template already exists with the same version, name, or id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse_2'
              examples:
                validation_failure:
                  value:
                    error:
                      code: 400 Bad Request
                      message: Validation failed because of invalid request data
                      details:
                      - code: MissingValue
                        target: template_id
                        message: template_id value is too short
                      request_id: LMwPhRMB
                duplicate_request:
                  value:
                    error:
                      code: 400 Bad

# --- truncated at 32 KB (69 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/moengage/refs/heads/main/openapi/moengage-email-templates-api-openapi.yml