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

# Obtener Plantillas

> Recupera todas las plantillas HSM configuradas en tu canal

Obtén la lista de todas las plantillas configuradas en tu canal. Puedes filtrar por nombre, estado o categoría.

```
GET /v1/bots/{botId}/templates
```

> [!TIP]
>
> Revisa las plantillas existentes antes de crear una nueva para evitar duplicados.

***

## Parámetros de ruta

| Propiedad | Tipo | Descripción |
| - | - | - |
| **botId** | string | ID único del bot. Ejemplo: `123456789` |

***

## Parámetros de consulta

| Propiedad | Tipo | Descripción |
| - | - | - |
| **query** | string | Buscar plantillas por **elementName** |
| **status** | string | Buscar plantillas por estado. Valores posibles: `PENDING`, `REJECTED`, `APPROVED` |
| **category** | string | Buscar plantillas por categoría. Valores posibles: `UTILITY`, `MARKETING`, `AUTHENTICATION` |

***

## Respuestas

> [accordion] 200 - Respuesta exitosa
>
> ```json theme={null}
> {
>   "data": [
>     {
>       "template": "¡Hola! Somos *Jelou*. \nTe damos la bienvenida _{{1}}_.",
>       "displayName": "Bienvenida",
>       "elementName": "bienvenida_cliente",
>       "params": [
>         {"label": "Nombre del cliente", "param": "1"}
>       ],
>       "paramsNumber": 1,
>       "isVisible": true,
>       "language": "ES",
>       "status": "APPROVED",
>       "category": "UTILITY",
>       "createdAt": "2021-01-28T15:08:38.492Z",
>       "updatedAt": "2021-01-28T15:08:38.492Z"
>     }
>   ]
> }
> ```

> [accordion] 401 - Unauthorized
>
> ```json theme={null}
> {
>   "message": "Authentication failed"
> }
> ```

> [accordion] 404 - Not Found
>
> ```json theme={null}
> {
>   "message": ["The Channel could not be found at the moment."],
>   "statusMessage": "failed",
>   "error": {
>     "code": "E1019",
>     "key": "BOT_NOT_FOUND"
>   }
> }
> ```


## OpenAPI

````yaml GET /v1/bots/{botId}/templates
openapi: 3.1.0
info:
  title: Jelou API
  description: >-
    API for the Jelou platform. Send messages, manage campaigns, handle
    conversations, users, databases, and widgets.
  version: 1.0.0
servers:
  - url: https://api.jelou.ai
    description: Production server
security:
  - basicAuth: []
tags:
  - name: Messages
    description: Send messages to users
  - name: Campaigns
    description: HSM campaigns and templates
  - name: Conversations
    description: Chat history and metrics
  - name: Users
    description: User state and cache management
  - name: Clients
    description: WhatsApp clients of the company
  - name: Resources
    description: Media resource management
  - name: Datum
    description: Database CRUD operations
  - name: Widget
    description: Widget and room management
  - name: PMA Custom
    description: External support panel integration
  - name: Memory
    description: Per-user session memory management (Memory API v2)
paths:
  /v1/bots/{botId}/templates:
    get:
      tags:
        - Campaigns
      summary: Obtener Plantillas
      description: Recupera todas las plantillas HSM configuradas en un bot.
      operationId: getTemplates
      parameters:
        - name: botId
          in: path
          required: true
          schema:
            type: string
        - name: query
          in: query
          description: Buscar por elementName
          schema:
            type: string
        - name: status
          in: query
          schema:
            type: string
            enum:
              - PENDING
              - REJECTED
              - APPROVED
        - name: category
          in: query
          schema:
            type: string
            enum:
              - UTILITY
              - MARKETING
              - AUTHENTICATION
      responses:
        '200':
          description: Plantillas recuperadas exitosamente
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    Unauthorized:
      description: Unauthorized - Invalid authentication credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Not found - Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        message:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        statusMessage:
          type: string
        status:
          type: integer
        error:
          type: object
          properties:
            code:
              type: string
            key:
              type: string
            description:
              type: string
            developerMessages:
              type: object
            clientMessages:
              type: object
        validationError:
          type: object
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Basic authentication using Base64 encoded clientId:clientSecret

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.