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

# List Case Templates

> Retrieve a paginated list of case templates (template workflows) with optional filtering and sorting. Case templates are reusable workflow blueprints.

Retrieve a paginated list of case templates with optional filtering and sorting.

<Note>
  Case templates are reusable workflow blueprints that can be instantiated into actual cases.
</Note>

<Tip>
  Use the `title` filter to search for templates by name with case-insensitive partial matching. This makes it easy to find the right template quickly.
</Tip>

## Common Use Cases

* List all available case templates in a workspace
* Search for templates by title
* Filter templates by owner or workspace
* Find archived vs active templates


## OpenAPI

````yaml GET /case_templates
openapi: 3.0.0
info:
  title: Penbox API
  version: '1.0'
  description: >-
    The Penbox API provides programmatic access to Penbox's form management,
    case management, and document processing capabilities. Authenticate using
    Bearer tokens created at https://app.penbox.io/workspace/settings/api
servers:
  - url: https://connect.penbox.io/v1
    description: Production
  - url: https://connect.aiboov.com/v1
    description: Staging
security:
  - BearerAuth: []
paths:
  /case_templates:
    get:
      summary: List Case Templates
      description: >-
        Retrieve a paginated list of case templates (template workflows) with
        optional filtering and sorting. Case templates are reusable workflow
        blueprints.
      operationId: list-case-templates
      parameters:
        - name: title
          in: query
          description: Filter by case template title (case-insensitive partial match)
          schema:
            type: string
        - $ref: '#/components/parameters/CaseReference'
        - $ref: '#/components/parameters/Archived'
        - $ref: '#/components/parameters/CaseOwnerId'
        - $ref: '#/components/parameters/OwnerEmail'
        - $ref: '#/components/parameters/CaseWorkspaceId'
        - $ref: '#/components/parameters/CaseWorkspaceSlug'
        - $ref: '#/components/parameters/CaseContactGivenName'
        - $ref: '#/components/parameters/CaseContactFamilyName'
        - $ref: '#/components/parameters/CaseContactEmail'
        - $ref: '#/components/parameters/AdvancedFilter'
        - $ref: '#/components/parameters/PageNumber'
        - $ref: '#/components/parameters/PageSize'
        - name: sort
          in: query
          description: Sort field (prefix with - for descending)
          schema:
            type: string
            default: '-created_at'
          example: '-created_at'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      total_count:
                        type: integer
                        description: Total number of case templates
                        example: 50
                      total_pages:
                        type: integer
                        description: Total number of pages
                        example: 5
                      page_size:
                        type: integer
                        description: Items per page
                        example: 10
                      current_page:
                        type: integer
                        description: Current page number
                        example: 1
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Case'
components:
  parameters:
    CaseReference:
      name: reference
      in: query
      description: Filter by custom reference number
      schema:
        type: string
    Archived:
      name: archived
      in: query
      description: Filter by archived status
      schema:
        type: boolean
        default: false
    CaseOwnerId:
      name: owner[id]
      in: query
      description: Filter by owner UUID
      schema:
        type: string
        format: uuid
    OwnerEmail:
      name: owner[email]
      in: query
      description: Filter by owner email
      schema:
        type: string
        format: email
    CaseWorkspaceId:
      name: workspace[id]
      in: query
      description: Filter by workspace UUID
      schema:
        type: string
        format: uuid
    CaseWorkspaceSlug:
      name: workspace[slug]
      in: query
      description: Filter by workspace slug
      schema:
        type: string
    CaseContactGivenName:
      name: contact[given_name]
      in: query
      description: Filter by contact first name
      schema:
        type: string
    CaseContactFamilyName:
      name: contact[family_name]
      in: query
      description: Filter by contact last name
      schema:
        type: string
    CaseContactEmail:
      name: contact[email]
      in: query
      description: Filter by contact email
      schema:
        type: string
        format: email
    AdvancedFilter:
      name: filter
      in: query
      description: >-
        Filter using advanced JSON syntax. If specified, will ignore all other
        filter parameters. See the [Advanced
        Filters](/api-reference/advanced-filters) guide for more information.
      schema:
        type: string
    PageNumber:
      name: page[number]
      in: query
      description: Page number (starts at 1)
      schema:
        type: integer
        default: 1
        minimum: 1
    PageSize:
      name: page[size]
      in: query
      description: 'Number of items per page (max: 100)'
      schema:
        type: integer
        default: 10
        maximum: 100
        minimum: 1
  schemas:
    Case:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Case UUID
        created_at:
          type: string
          format: date-time
          description: Creation timestamp
        updated_at:
          type: string
          format: date-time
          description: Last update timestamp
        title:
          type: string
          description: Case title
        description:
          type: string
          nullable: true
          description: Case description
        locale:
          type: string
          nullable: true
          description: Language/locale code
        reference:
          type: string
          nullable: true
          description: Custom reference number
        status:
          type: string
          nullable: true
          description: Custom status value
        parent_status:
          type: string
          enum:
            - draft
            - pending
            - in_progress
            - closed
          description: Parent status
        waiting_for:
          type: string
          enum:
            - none
            - owner
            - contact
          description: Who the case is waiting for
        archived_at:
          type: string
          format: date-time
          nullable: true
          description: Timestamp when archived
        contacts:
          type: array
          description: Array of contact objects
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
                description: Contact UUID
              key:
                type: string
                description: Contact identifier
              name:
                type: string
                description: Contact role/name
              email:
                type: string
                format: email
                description: Contact email
              given_name:
                type: string
                description: First name
              family_name:
                type: string
                description: Last name
              phone:
                type: string
                description: Phone number
            additionalProperties: true
        template:
          type: string
          nullable: true
          description: Template reference
        owner:
          type: object
          nullable: true
          description: Case owner information
          properties:
            id:
              type: string
              format: uuid
            email:
              type: string
              format: email
            given_name:
              type: string
            family_name:
              type: string
      required:
        - id
        - title
        - parent_status
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: token
      description: >-
        API token (starts with pnbx_). Create at
        https://app.penbox.io/workspace/settings/api. Include as: Authorization:
        Bearer {token}

````