> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Search SMS Templates

> This API searches and retrieves a list of SMS templates, created in your MoEngage account, based on specified filter criteria.

<Note>
  **Mandatory Pagination Update**

  We are introducing mandatory pagination, effective **November 15, 2025**, all calls to this API must include the following two parameters:

  * `page`: The page number of the results you wish to fetch.
  * `entries`: The number of templates to return per page, with a maximum value of **15**.

  Please update all integrations to include these parameters. API requests submitted without them after the effective date will result in an error and fail to execute.
</Note>

#### Rate Limit

The rate limit is **100 RPM**.


## OpenAPI

````yaml /api/sms-templates/sms-templates.yaml post /custom-templates/sms/search
openapi: 3.0.3
info:
  title: MoEngage SMS Template API
  version: '1.0'
  description: >-
    API for creating, updating, and searching SMS templates within the MoEngage
    platform.
servers:
  - url: https://api-{dc}.moengage.com/v1.0
    description: MoEngage Custom Templates 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.
security:
  - basicAuth: []
tags:
  - name: SMS Templates
    description: Operations to manage SMS templates.
paths:
  /custom-templates/sms/search:
    post:
      tags:
        - SMS Templates
      summary: Search SMS Templates
      description: >-
        This API searches and retrieves a list of SMS templates, created in your
        MoEngage account, based on specified filter criteria.
      requestBody:
        required: true
        description: Use search filters to find SMS templates.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchSmsTemplateRequest'
            example:
              page: 1
              entries: 10
              template_source:
                - API
              sort_params:
                - last_modified_date: DESCENDING
      responses:
        '200':
          description: Search successful. Returns a list of templates.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchSmsTemplateResponse'
              examples:
                success:
                  summary: Successful Search
                  value:
                    data:
                      - external_template_id: b564524f-aa08-4149-a498-dbde0b7b3740
                        version: 1
                        basic_details:
                          message: Sample SMS Template message
                        meta_info:
                          template_id: CCIJASDA12345
                          template_name: CouponCodeTemplate1
                          template_version: '1'
                          created_by: Jane Doe
                          channel: SMS
                          template_type: CUSTOM
                        created_by: Jane Doe
                        created_at: '2023-02-27T12:33:05.575000'
                        updated_by: John Doe
                        updated_at: '2023-02-27T12:33:05.575000'
        '400':
          description: Bad Request. Invalid field values in the search criteria.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_field:
                  summary: Invalid Field Value
                  value:
                    title: Invalid Field Value
                    description: Some of the field values are invalid
                    code: nGpUNpDQ
        '429':
          description: Rate limit breached (100 RPM).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                rate_limit:
                  summary: Rate Limit Breach
                  value:
                    response_id: OUUkHvcn
                    type: custom_segment
                    error:
                      code: Too Many Requests
                      message: 'API rate limit breached. Current limit: n/m mins'
        '500':
          description: Internal Server Error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
              examples:
                server_error:
                  summary: Internal Server Error
                  value:
                    title: Internal Server Error
                    message: >-
                      An unexpected error was encountered while processing this
                      request. Please contact MoEngage Team
components:
  schemas:
    SearchSmsTemplateRequest:
      type: object
      description: >-

        **Notes:**

        - `page` and `entries` are mandatory effective November 15, 2025. All
        other fields are optional.

        - You can send only template_ids if you want specific older versions of
        the SMS template. In other cases, you will receive the latest version of
        the template.
      required:
        - page
        - entries
      properties:
        page:
          type: integer
          description: >-
            This field contains the index of the pages to be returned in the
            search result
          default: 1
        entries:
          type: integer
          description: This field contains the number of templates to return per page.
          maximum: 15
          default: 15
        template_name:
          type: string
          description: >-
            This field indicates the name of the template. When this value is
            specified, the template that matches the name specified in this
            field will be returned (partial search is supported).
        template_source:
          type: array
          description: >-
            This field indicates the template source that created the template.
            When specified, templates whose source matches the one specified in
            this list will be returned.
          items:
            type: string
            enum:
              - API
              - MOENGAGE
        template_type:
          type: array
          description: >-
            This field indicates whether the template is a custom one or a
            pre-built one. When specified, templates whose template type matches
            the one specified in this list will be returned.
          items:
            type: string
            enum:
              - CUSTOM
              - PRE_BUILT
        created_by:
          type: array
          description: >-
            This field indicates the user who created the template. When
            specified, the templates for which the created_by user information
            matches that specified in this list will be returned.
          items:
            type: string
            format: email
        updated_by:
          type: array
          description: >-
            This field indicates the user who updated the template. When
            specified, the templates for which the updated_by user information
            matches that specified in this list will be returned.
          items:
            type: string
            format: email
        sort_params:
          type: array
          description: >-
            This field indicates the sorting parameters for the search result
            and the sort order.
          items:
            type: object
            properties:
              template_name:
                type: string
                enum:
                  - ASCENDING
                  - DESCENDING
              last_modified_date:
                type: string
                enum:
                  - ASCENDING
                  - DESCENDING
              last_modified_by:
                type: string
                enum:
                  - ASCENDING
                  - DESCENDING
        template_ids:
          type: array
          description: >-
            This field indicates the list of template IDs that must be fetched.
            When this value is specified, the template that matches the ID
            specified in this field will be returned.
          items:
            type: object
            properties:
              external_template_id:
                type: string
                format: uuid
              version:
                type: integer
    SearchSmsTemplateResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/SmsTemplate'
    ErrorResponse:
      type: object
      description: Standard error response format for 4xx errors.
      properties:
        error:
          type: object
          description: This field contains the reason for the request's failure.
          properties:
            code:
              type: string
              description: The HTTP status code and error type.
              example: 4xx Status Code
            message:
              type: string
              description: A description of the error.
              example: Brief description of the error.
            details:
              type: array
              description: >-
                This is a List of the error details objects. Each object
                contains the following information.
              items:
                type: object
                properties:
                  code:
                    type: string
                    example: ErrorCode
                  target:
                    type: string
                    example: Field Name
                  message:
                    type: string
                    example: Error description for this field.
            request_id:
              type: string
              description: This field contains the unique id pertaining to the request.
              example: Unique Request ID
    InternalServerError:
      type: object
      description: Schema for 500 Internal Server Error.
      properties:
        title:
          type: string
          example: Internal Server Error
        message:
          type: string
          example: >-
            An unexpected error was encountered while processing this request.
            Please contact MoEngage Team
    SmsTemplate:
      type: object
      properties:
        external_template_id:
          type: string
          format: uuid
        version:
          type: integer
        basic_details:
          type: object
          properties:
            message:
              type: string
        meta_info:
          type: object
          properties:
            template_id:
              type: string
            template_name:
              type: string
            template_version:
              type: string
            created_by:
              type: string
            channel:
              type: string
              example: SMS
            template_type:
              type: string
              enum:
                - CUSTOM
                - PRE_BUILT
        created_by:
          type: string
        created_at:
          type: string
          format: date-time
        updated_by:
          type: string
        updated_at:
          type: string
          format: date-time
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >
        Authentication is done via Basic Auth. This requires a base64-encoded
        string of your credentials in the format 'username:password'.


        - **Username**: Use your MoEngage workspace ID (also known as the App
        ID). You can find it in the MoEngage dashboard at **Settings** >
        **Account** > **APIs** > **Workspace ID (earlier app id)**.

        - **Password**: Use your API Key, which you can find within the
        **Campaign report/Business events/Custom templates/Catalog API/Inform
        Report** tile.


        For more information on authentication and getting your credentials,
        refer
        [here](https://www.moengage.com/docs/api/introduction#getting-your-credentials).

````