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

# List Templates

> Retrieve a paginated list of templates in a workspace. Returns template metadata including name, slug, status, enabled channels, and linked workflows.



## OpenAPI

````yaml GET /v2/{workspace}/template/
openapi: 3.1.1
info:
  title: SuprSend API
  description: APIs supported on suprsend platform
  version: 1.2.2
servers:
  - url: https://hub.suprsend.com
security:
  - sec0: []
  - BearerAuth: []
paths:
  /v2/{workspace}/template/:
    get:
      summary: List Templates
      description: >-
        Retrieve a paginated list of templates in a workspace. Returns template
        metadata including name, slug, status, enabled channels, and linked
        workflows.
      operationId: list-templates-v2
      parameters:
        - in: path
          name: workspace
          required: true
          schema:
            type: string
          description: Workspace slug (e.g., `staging`, `production`).
        - in: query
          name: mode
          schema:
            type: string
            enum:
              - draft
              - live
            default: draft
          description: Return draft or live version of templates.
        - in: query
          name: limit
          schema:
            type: integer
            default: 20
          description: Number of results per page.
        - in: query
          name: offset
          schema:
            type: integer
            default: 0
          description: Offset for pagination.
        - in: query
          name: q
          schema:
            type: string
          description: Search by template name or slug.
      responses:
        '200':
          description: Successfully retrieved list of templates
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      count:
                        type: integer
                        description: Total number of templates matching the query
                        example: 22
                      limit:
                        type: integer
                        example: 10
                      offset:
                        type: integer
                        example: 0
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        $schema:
                          type: string
                          description: Schema URL for template validation
                          example: https://schema.suprsend.com/template/v2/schema.json
                        name:
                          type: string
                          example: Order Confirmation Email
                        slug:
                          type: string
                          example: order-confirmation-email
                        description:
                          type: string
                          nullable: true
                        tags:
                          type: array
                          items:
                            type: string
                        enabled_channels:
                          type: array
                          items:
                            type: string
                          example:
                            - email
                            - inbox
                        status:
                          type: string
                          enum:
                            - draft
                            - active
                          example: active
                        version_no:
                          type: integer
                          nullable: true
                        hash:
                          type: string
                        commit_message:
                          type: string
                          nullable: true
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
                        active_at:
                          type: string
                          format: date-time
                          nullable: true
                        last_triggered_at:
                          type: string
                          format: date-time
                          nullable: true
                          description: >-
                            Timestamp of the last workflow run that used this
                            template
                        updated_by:
                          type: object
                          properties:
                            name:
                              type: string
                            email:
                              type: string
                          description: User who last updated the template
                        channels:
                          type: array
                          items:
                            type: object
                            properties:
                              channel:
                                type: string
                              is_active:
                                type: boolean
                              variants_count:
                                type: integer
              example:
                meta:
                  count: 22
                  limit: 10
                  offset: 0
                results:
                  - $schema: https://schema.suprsend.com/template/v2/schema.json
                    slug: order-confirmation-email
                    created_at: '2026-04-07T10:39:28.502737Z'
                    last_triggered_at: '2026-04-07T16:45:34.549989Z'
                    name: Order Confirmation Email
                    description: Email template for order confirmation notifications
                    tags: []
                    enabled_channels:
                      - email
                    status: active
                    version_no: 4
                    hash: >-
                      637edaabc624d09db3793829ea872a3516ed0362ce79ee3875607fc7317381b9
                    commit_message: null
                    active_at: '2026-04-07T16:42:13.821446Z'
                    updated_at: '2026-04-07T16:42:13.827644Z'
                    updated_by:
                      name: Jane Smith
                      email: jane.smith@example.com
                    channels:
                      - channel: email
                        is_active: true
                        variants_count: 1
                  - $schema: https://schema.suprsend.com/template/v2/schema.json
                    slug: payment-confirmation
                    created_at: '2026-04-07T07:05:13.747248Z'
                    last_triggered_at: null
                    name: Payment Confirmation
                    description: Payment confirmation notification with order details
                    tags: []
                    enabled_channels:
                      - email
                      - inbox
                    status: active
                    version_no: 2
                    hash: >-
                      ea6007ab4cffac8f110e15145eedbd40b5897fcc880717411416b9cdb64b170e
                    commit_message: null
                    active_at: '2026-04-07T07:27:53.708887Z'
                    updated_at: '2026-04-07T07:27:53.715438Z'
                    updated_by:
                      name: Alex Johnson
                      email: alex.johnson@example.com
                    channels:
                      - channel: email
                        is_active: true
                        variants_count: 1
                      - channel: inbox
                        is_active: true
                        variants_count: 1
        '401':
          $ref: '#/components/responses/AuthenticationError'
      security:
        - ServiceTokenAuth: []
      servers:
        - url: https://management-api.suprsend.com
      x-codeSamples:
        - lang: cURL
          label: List Templates
          source: >
            curl -X GET
            "https://management-api.suprsend.com/v2/{workspace}/template/?mode=live"
            \
              --header 'Authorization: ServiceToken <token>' \
              --header 'Content-Type: application/json'
components:
  responses:
    AuthenticationError:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 401
            error_code: authentication_failed
            type: AuthenticationFailed
            message: Invalid service token.
            detail: Invalid service token.
  schemas:
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
          description: HTTP status code
        error_code:
          type: string
          description: Specific error code identifier
        type:
          type: string
          description: Error type classification
        message:
          type: string
          description: Human-readable error message
        detail:
          type: string
          description: Additional error details
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where <token>
        is your auth token.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API_Key
      description: >-
        Pass as `Bearer <API_KEY>`. Get API Key from SuprSend dashboard
        Developers -> API Keys section.
    ServiceTokenAuth:
      type: apiKey
      in: header
      name: ServiceToken <token>
      description: >-
        You can get Service Token from [SuprSend dashboard -> Account Settings
        -> Service
        Tokens](https://app.suprsend.com/en/account-settings/service-tokens)
        section.

````