> ## 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.

# List Templates

> This API returns a paginated list of the personalization templates available in the workspace.
Requires the `read:offers` scope.


<Info>
  Use the `id` of a template as the value for `meta.templateId` in `offer_content` when you create or update an offering with content `type` set to `template`.
</Info>

#### Rate Limit

The rate limits are at the workspace level. Each endpoint allows 100 requests per minute, 300 requests per hour, and 600 requests per day.


## OpenAPI

````yaml /api/offerings/offerings.yaml get /v5/offers/templates
openapi: 3.0.0
info:
  title: Offerings Public API
  version: 1.0.0
  description: >
    This API creates, updates, and lists offerings in a MoEngage

    workspace, and lists the personalization templates available for offering
    content.


    An offering is a targeted piece of personalized content — such as a
    promotional card or

    banner — that MoEngage Offer Decisioning serves to a chosen user segment
    within a

    scheduled window.


    **Tags**: Attach tags to an offering to group offerings and let Decision
    Policies select

    them by tag. Tags are referenced by tag ID and must already exist in the
    workspace.


    **Capping rules**: Limit how often an offering is delivered with two
    independent rules —

    an overall cap across all users and a per-user cap. Each rule uses a single
    time-based

    schedule (daily, weekly, or monthly) and a limit value.


    **Rate Limits**: The following limits apply to each endpoint, per workspace.

     | Rate Limit Name | Rate Limit |
     | :--- | :--- |
     | Requests per minute | The total number of requests per minute per workspace allowed is 100. |
     | Requests per hour | The total number of requests per hour per workspace allowed is 300. |
     | Requests per day | The total number of requests per day per workspace allowed is 600. |

     <Note>
       * Breaching any limit rejects the request with a `429` response that includes a `Retry-After` header.
       * A `429` response does not count against your quota.
     </Note>
servers:
  - url: https://api-{dc}.moengage.com
    variables:
      dc:
        default: '01'
        description: >
          MoEngage data center identifier. Replace it with the number assigned
          to your account, such as 01 (US), 02 (EU), 03 (India), 05 (Singapore),
          or 06 (Indonesia). For example, https://api-01.moengage.com.
        enum:
          - '01'
          - '02'
          - '03'
          - '05'
          - '06'
security: []
paths:
  /v5/offers/templates:
    get:
      tags:
        - Public Offerings
      summary: List Templates
      description: >
        This API returns a paginated list of the personalization templates
        available in the workspace.

        Requires the `read:offers` scope.
      operationId: listPublicOfferTemplates
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
            minimum: 1
            maximum: 500
          description: >
            Page number to retrieve, starting at 1. Range 1–500. A value outside
            this range returns `400 INVALID_REQUEST`.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 100
          description: >
            Number of items per page. Default 20, range 1–100. A value outside
            this range returns `400 INVALID_REQUEST`.
        - name: X-MOE-Request-Id
          in: header
          required: false
          schema:
            type: string
            format: uuid
          description: >
            Client-supplied trace ID (UUID v4). The server echoes it in the
            `X-MOE-Request-Id` response header so you can correlate the request
            with server-side logs.
      responses:
        '200':
          description: Paginated list of templates.
          headers:
            X-MOE-Request-Id:
              schema:
                type: string
              description: >-
                Trace ID echoed from the request, or server-generated if none
                was sent.
            X-RateLimit-Limit:
              schema:
                type: integer
                example: 100
              description: Maximum requests allowed in the current per-minute window.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: Requests remaining in the current per-minute window.
            X-RateLimit-Reset:
              schema:
                type: integer
              description: UTC epoch second when the current per-minute window resets.
          content:
            application/json:
              schema:
                type: object
                properties:
                  response_id:
                    type: string
                    description: Server-generated UUID for tracing this response.
                  type:
                    type: string
                    enum:
                      - template_list
                    description: Resource type discriminator. Always `template_list`.
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/TemplateListItem'
                      pagination:
                        $ref: '#/components/schemas/PagePagination'
              example:
                response_id: f47ac10b-58cc-4372-a567-0e02b2c3d479
                type: template_list
                data:
                  items:
                    - id: app_small
                      value: app_small
                      label: App small
                      template_type: []
                    - id: web_promo_card
                      value: web_promo_card
                      label: Web promo card
                      template_type:
                        - web
                  pagination:
                    page: 1
                    limit: 20
                    has_more: false
                    total_count: 2
        '400':
          description: >
            `page` or `limit` is outside its allowed range. Error code:
            `INVALID_REQUEST`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: INVALID_REQUEST
                  message: page must be between 1 and 500.
                  doc_url: https://docs.moengage.com/errors/INVALID_REQUEST
                response_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        '401':
          $ref: '#/components/responses/GatewayAuthError'
        '403':
          $ref: '#/components/responses/FeatureNotEnabled'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - basicAuth: []
components:
  schemas:
    TemplateListItem:
      description: >
        A personalization template available in the workspace. Returned by `GET
        /v5/offers/templates`.
      type: object
      properties:
        id:
          type: string
          description: >
            Template identifier. Use this value as `meta.templateId` in
            `offer_content` when the content `type` is `template`. Template IDs
            are human-readable strings, not prefixed IDs.
          example: app_small
        value:
          type: string
          description: >-
            Always identical to `id`. Retained for compatibility with existing
            workflows.
          example: app_small
        label:
          type: string
          description: Human-readable display name of the template.
          example: App small
        template_type:
          type: array
          description: >-
            Surface tags for the template, such as `web`. Empty array if none
            are set.
          items:
            type: string
          example:
            - web
        fields:
          type: array
          description: >
            Field definitions for this template. Use these to construct the
            `value` object when `content_1.type` is `template`. Fields marked
            `required: true` must be present in `value` or the API returns `400
            MISSING_TEMPLATE_FIELD`.
          items:
            $ref: '#/components/schemas/TemplateField'
    PagePagination:
      description: Pagination metadata included in list responses.
      type: object
      properties:
        page:
          type: integer
          description: Current page number, starting at 1.
          example: 1
        limit:
          type: integer
          description: Number of items per page, matching the `limit` parameter.
          example: 20
        has_more:
          type: boolean
          description: >
            Whether more pages exist beyond this one. Use this as the primary
            pagination signal — when `true`, increment `page` to fetch the next
            page.
          example: true
        total_count:
          type: integer
          format: int64
          description: Total number of items matching the applied filters.
          example: 42
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Machine-readable error code in `ALL_CAPS_SNAKE_CASE`.
              example: VALIDATION_FAILED
            message:
              type: string
              description: Human-readable description of the error.
            target:
              type: string
              description: The field or parameter the error relates to.
            details:
              type: array
              description: >-
                Per-field errors. The create and update endpoints return every
                error together.
              items:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code for this field.
                  target:
                    type: string
                    description: Dot-notation path to the field that failed validation.
                  message:
                    type: string
                    description: Human-readable description of this field error.
            doc_url:
              type: string
              description: Link to documentation for this error code.
        response_id:
          type: string
          description: Server-generated UUID for tracing this response.
    TemplateField:
      description: A single field definition within a personalization template.
      type: object
      properties:
        key:
          type: string
          description: Field key name used as the property name in the `value` object.
          example: headline
        required:
          type: boolean
          description: >
            Whether this field must be present in `value` when creating or
            updating an offering with this template. Omitting a required field
            returns `400 MISSING_TEMPLATE_FIELD`.
          example: true
        type:
          type: string
          description: Expected data type of the field value.
          enum:
            - string
            - number
            - boolean
            - url
          example: string
  responses:
    GatewayAuthError:
      description: >
        Authentication failed because the `Authorization` header is missing,
        malformed, or invalid (`401 UNAUTHORIZED`). This response is returned by
        the APISIX gateway.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: UNAUTHORIZED
              message: >-
                Authentication failed. Ensure the Authorization header is set to
                Basic with a valid API key.
              target: Authorization
            response_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
    FeatureNotEnabled:
      description: >
        The Offer Decisioning feature is not enabled for this workspace (`403
        FORBIDDEN`). Contact your MoEngage account team to request access.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: FORBIDDEN
              message: The Offer Decisioning feature is not enabled for this workspace.
              target: workspace
            response_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
    RateLimited:
      description: >
        Rate limit exceeded (`429`). The `Retry-After` header gives the number
        of seconds until the most restrictive window resets. Limits are 100
        requests per minute, 300 per hour, and 600 per day, per workspace.
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds until the most restrictive rate-limit window resets.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: RATE_LIMITED
              message: >-
                Rate limit exceeded: per-minute limit of 100 requests reached.
                Retry after 30 seconds.
            response_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
    InternalError:
      description: An unexpected server-side error occurred (`500 INTERNAL_ERROR`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INTERNAL_ERROR
              message: >-
                An unexpected error occurred processing your request. Reference
                the X-MOE-Request-Id when contacting support.
            response_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
    ServiceUnavailable:
      description: >
        The APISIX gateway is temporarily unable to route the request (`503`),
        for example when the upstream service is unreachable. The response body
        is HTML from the gateway, not JSON.
      content:
        text/html:
          schema:
            type: string
            example: >-
              <html><body><h1>503 Service Temporarily
              Unavailable</h1></body></html>
  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
        **Personalize** tile.


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

````