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

# List message templates

> Lists the message-template drafts in one project.

Requires a verified dashboard bearer and current organization authorization. Organization keys and project tokens are not accepted.



## OpenAPI

````yaml /api-reference/openapi.management.json get /v1/templates
openapi: 3.0.3
info:
  title: Polymorfa Management API
  version: 1.0.0
  description: >-
    Public customer management surface (25 HTTP operations).


    Each public `/v1` operation declares its supported credential: a scoped
    `titan_` organization key or a verified dashboard JWT, or dashboard-only
    authorization when a specific user's authority is required. The `/v1`
    boundary rejects `titan_pt_` project tokens.


    Most transitional body/response schemas remain loose (`additionalProperties:
    true`); session-control operations use explicit strict schemas.
servers:
  - url: https://api.polymorfa.com
  - url: http://localhost:8080
    description: local dev
security: []
paths:
  /v1/templates:
    get:
      tags:
        - templates
      summary: List message templates
      description: >-
        Lists the message-template drafts in one project.


        Requires a verified dashboard bearer and current organization
        authorization. Organization keys and project tokens are not accepted.
      operationId: messageTemplates.listByProject
      parameters:
        - name: projectId
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  data:
                    type: array
                    maxItems: 500
                    items:
                      $ref: '#/components/schemas/ManagementTemplate'
                required:
                  - data
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - ConsoleSession: []
components:
  schemas:
    ManagementTemplate:
      type: object
      additionalProperties: false
      properties:
        id:
          $ref: '#/components/schemas/TemplateId'
        createdAt:
          type: integer
          format: int64
          minimum: 0
        name:
          type: string
          minLength: 1
          maxLength: 512
        category:
          type: string
        language:
          type: string
        status:
          type: string
        kind:
          type: string
        definition:
          type: object
          additionalProperties: true
          nullable: true
        sampleValues:
          type: object
          additionalProperties:
            type: string
          nullable: true
        cloudLinks:
          type: array
          items:
            type: object
            additionalProperties: true
        updatedAt:
          type: integer
          format: int64
          minimum: 0
      required:
        - id
        - createdAt
        - name
        - category
        - language
        - status
        - kind
        - definition
        - sampleValues
        - cloudLinks
        - updatedAt
    TemplateId:
      type: string
      format: uuid
      description: Message-template draft UUID.
    ErrorEnvelope:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
      required:
        - error
  responses:
    BadRequest:
      description: A path, query, or request-body value did not pass validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Unauthorized:
      description: Missing/invalid credential for this audience.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Forbidden:
      description: Authenticated but lacks the required scope/role/audience.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    NotFound:
      description: >-
        The requested resource was not found inside the authenticated
        organization or project scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    ConsoleSession:
      type: http
      scheme: bearer
      description: >-
        Verified dashboard JWT for signed-in Console requests. This is not a
        server credential.

````