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

# List campaign models

> Lists the tenant's campaign templates with pagination, search and
sorting. Returns HTTP 206 instead of 200 when more pages are available.



## OpenAPI

````yaml /api/services-api.yaml get /v1/tenants/{tenantID}/campaigns-models
openapi: 3.0.3
info:
  description: >-
    Talqui is an omnichannel customer service platform that unifies
    conversations from WhatsApp, Instagram, Telegram, and many other channels
    into a single attendant panel, alongside a broader ecosystem of plugins and
    integrations. This API gives developers programmatic access to Talqui's
    services layer, exposing the operations needed to read and manage tenants,
    conversations, plugins, and related resources that power that platform.


    Authentication is available on behalf of an Operator (the default for this
    API), a Plugin Connection, or a Plugin — see the [Talqui authentication
    guide](https://docs.talqui.chat/guides/introduction/authentication/) for how
    each token is obtained and when to use it.


    Need help or have questions not covered here? Reach out to
    support@talqui.com.
  license:
    name: ISC
    url: https://opensource.org/license/isc-license-txt
  title: Talqui - Services API
  version: 0.65.0
servers:
  - description: Production
    url: https://services-api.talqui.chat
security: []
tags:
  - name: Tenants
  - name: Settings
  - name: Analytics
  - name: Campaigns
  - name: Campaigns models
  - name: Contacts
  - name: Handoff links
  - name: Inboxes
  - name: Messages
  - name: Notifications
  - name: Sessions
  - name: Operators
  - name: Plugins
  - name: Setup
  - name: Uploads
paths:
  /v1/tenants/{tenantID}/campaigns-models:
    get:
      tags:
        - Campaigns models
      summary: List campaign models
      description: |-
        Lists the tenant's campaign templates with pagination, search and
        sorting. Returns HTTP 206 instead of 200 when more pages are available.
      operationId: ListCampaignModelsController
      parameters:
        - in: path
          name: tenantID
          required: true
          schema:
            type: string
        - in: query
          name: page
          required: false
          schema:
            default: 1
            description: 1-indexed page number to fetch.
            maximum: 9007199254740991
            minimum: 1
            type: integer
        - in: query
          name: perPage
          required: false
          schema:
            default: 50
            description: Number of campaign models per page (max 200).
            maximum: 200
            minimum: 1
            type: integer
        - in: query
          name: sortBy
          required: false
          schema:
            default: createdAt
            description: Field to sort results by.
            enum:
              - createdAt
              - campaignModelID
            type: string
        - in: query
          name: sortDesc
          required: false
          schema:
            default: -1
            description: 'Sort direction: -1 for descending, 1 for ascending.'
            maximum: 9007199254740991
            minimum: -9007199254740991
            type: integer
        - in: query
          name: search
          required: false
          schema:
            description: Free-text search against the campaign model name.
            type: string
        - in: query
          name: filters
          required: false
          schema:
            description: JSON-encoded object of additional field filters.
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    description: Campaign models for the requested page.
                    items:
                      additionalProperties: false
                      properties:
                        __campaignModelErrorCode:
                          description: >-
                            Provider error code, present when the template was
                            refused.
                          type: number
                        __campaignModelErrorMessage:
                          description: >-
                            Provider error message, present when the template
                            was refused.
                          type: string
                        approvedAt:
                          description: >-
                            When the provider approved the template, if
                            applicable.
                          format: date-time
                          nullable: true
                          type: string
                        campaignModelChannel:
                          description: >-
                            The channel this campaign model targets (e.g.
                            whatsapp).
                          type: string
                        campaignModelChannelID:
                          description: >-
                            Identifier of the specific channel connection this
                            campaign model belongs to.
                          type: string
                        campaignModelDescription:
                          description: >-
                            Free-text description of the campaign model, for
                            internal reference only.
                          type: string
                        campaignModelExternalID:
                          description: The provider-assigned identifier for this template.
                          type: string
                        campaignModelGatewayMeta:
                          additionalProperties: {}
                          description: >-
                            Provider-specific display/gateway configuration for
                            this template.
                          type: object
                        campaignModelGatewayRaw:
                          additionalProperties: {}
                          description: >-
                            Raw, unprocessed payload as returned by the
                            provider.
                          type: object
                        campaignModelID:
                          description: Unique identifier for this campaign model.
                          type: string
                        campaignModelMeta:
                          additionalProperties: {}
                          description: Arbitrary metadata attached to the campaign model.
                          type: object
                        campaignModelName:
                          description: The name of the campaign model.
                          type: string
                        campaignModelSlots:
                          additionalProperties: false
                          description: The template content, broken down by provider slot.
                          properties:
                            body:
                              additionalProperties: false
                              description: Body slot of the template.
                              properties:
                                content:
                                  description: Resolved body content.
                                  type: string
                                text:
                                  description: Resolved body text.
                                  type: string
                                variables:
                                  description: >-
                                    Variables referenced in the body slot
                                    content.
                                  items:
                                    additionalProperties: false
                                    properties:
                                      fallback:
                                        description: >-
                                          Value used when the variable cannot be
                                          resolved.
                                        type: string
                                      id:
                                        description: >-
                                          Variable identifier within the body
                                          slot.
                                        type: string
                                      key:
                                        description: >-
                                          Variable name as it appears in the body
                                          content.
                                        type: string
                                      type:
                                        description: The expected variable type.
                                        type: string
                                    required:
                                      - id
                                      - key
                                      - type
                                    type: object
                                  type: array
                              required:
                                - content
                                - text
                                - variables
                              type: object
                            buttons:
                              description: Interactive buttons attached to the template.
                              items:
                                additionalProperties: false
                                properties:
                                  example:
                                    description: >-
                                      Example value for variables used in this
                                      button, for provider review.
                                    type: string
                                  otpType:
                                    description: >-
                                      The one-time-password delivery mode, when
                                      type is OTP.
                                    enum:
                                      - COPY_CODE
                                      - ONE_TAP
                                      - ZERO_TAP
                                    type: string
                                  phoneNumber:
                                    description: >-
                                      Target phone number, when type is
                                      PHONE_NUMBER.
                                    type: string
                                  text:
                                    description: Label text shown on the button.
                                    type: string
                                  ttlMinutes:
                                    description: >-
                                      Minutes before a one-time code button
                                      expires, when type is OTP.
                                    type: number
                                  type:
                                    description: The interactive button type.
                                    enum:
                                      - ORDER_DETAILS
                                      - QUICK_REPLY
                                      - URL
                                      - PHONE_NUMBER
                                      - COPY_CODE
                                      - VOICE_CALL
                                      - OTP
                                    type: string
                                  url:
                                    description: Target URL, when type is URL.
                                    type: string
                                required:
                                  - type
                                  - text
                                type: object
                              type: array
                            footer:
                              additionalProperties: false
                              description: Footer slot of the template.
                              properties:
                                text:
                                  description: Footer text shown below the template body.
                                  type: string
                              type: object
                            header:
                              additionalProperties: false
                              description: Header slot of the template.
                              properties:
                                content:
                                  additionalProperties: {}
                                  description: Raw provider-specific header content.
                                  properties: {}
                                  type: object
                                preview:
                                  description: Preview text shown for the header slot.
                                  type: string
                                text:
                                  description: Resolved header text.
                                  type: string
                                type:
                                  description: Media type of the header slot.
                                  enum:
                                    - text
                                    - image
                                    - video
                                    - document
                                    - location
                                  type: string
                                variables:
                                  description: >-
                                    Variables referenced in the header slot
                                    content.
                                  items:
                                    additionalProperties: false
                                    properties:
                                      fallback:
                                        description: >-
                                          Value used when the variable cannot be
                                          resolved.
                                        type: string
                                      id:
                                        description: >-
                                          Variable identifier within the header
                                          slot.
                                        type: string
                                      key:
                                        description: >-
                                          Variable name as it appears in the
                                          header content.
                                        type: string
                                      type:
                                        description: The expected variable type.
                                        type: string
                                    required:
                                      - id
                                      - key
                                      - type
                                    type: object
                                  type: array
                              required:
                                - content
                                - preview
                                - text
                                - variables
                              type: object
                          required:
                            - header
                            - body
                            - footer
                            - buttons
                          type: object
                        campaignModelStatus:
                          description: >-
                            Current approval status of the template with the
                            provider.
                          type: string
                        campaignModelTags:
                          description: Tags used for organizing/filtering campaign models.
                          items:
                            type: string
                          type: array
                        campaignModelType:
                          description: >-
                            The template type/category as defined by the
                            provider.
                          type: string
                        createdAt:
                          description: When this campaign model was created.
                          format: date-time
                          type: string
                        createdBy:
                          description: Identifier of who created this campaign model.
                          type: string
                        deletedAt:
                          description: >-
                            When this campaign model was soft-deleted, if
                            applicable.
                          format: date-time
                          type: string
                        evaluatingAt:
                          description: >-
                            When the provider started evaluating the template,
                            if applicable.
                          format: date-time
                          nullable: true
                          type: string
                        modelVariables:
                          description: >-
                            Variables that must be filled in when sending this
                            template.
                          items:
                            additionalProperties: false
                            properties:
                              fallback:
                                description: >-
                                  Value used when the variable cannot be
                                  resolved.
                                type: string
                              key:
                                description: >-
                                  The variable name as it appears in the
                                  template slot content.
                                type: string
                              required:
                                description: >-
                                  Whether the provider requires this variable to
                                  be filled.
                                type: boolean
                              type:
                                description: The expected variable type.
                                type: string
                            required:
                              - key
                            type: object
                          type: array
                        processingAt:
                          description: >-
                            When the template was submitted for provider review,
                            if applicable.
                          format: date-time
                          nullable: true
                          type: string
                        refusedAt:
                          description: >-
                            When the provider refused the template, if
                            applicable.
                          format: date-time
                          nullable: true
                          type: string
                        tenantID:
                          description: The tenant this campaign model belongs to.
                          type: string
                        updatedAt:
                          description: When this campaign model was last updated.
                          format: date-time
                          type: string
                        updatedBy:
                          description: Identifier of who last updated this campaign model.
                          type: string
                      required:
                        - tenantID
                        - campaignModelID
                        - campaignModelChannel
                        - campaignModelChannelID
                        - campaignModelExternalID
                        - campaignModelType
                        - campaignModelName
                        - campaignModelTags
                        - campaignModelStatus
                        - campaignModelMeta
                        - campaignModelSlots
                        - campaignModelGatewayRaw
                        - campaignModelGatewayMeta
                        - processingAt
                        - evaluatingAt
                        - approvedAt
                        - refusedAt
                        - createdBy
                        - createdAt
                        - updatedBy
                        - updatedAt
                      type: object
                    type: array
                  meta:
                    additionalProperties: false
                    description: Pagination metadata.
                    properties:
                      count:
                        description: Number of items in this page.
                        type: number
                      currentPage:
                        description: The page number returned.
                        type: number
                      hasMore:
                        description: Whether more pages are available.
                        type: boolean
                      perPage:
                        description: Number of items per page.
                        type: number
                      totalCount:
                        description: Total number of campaign models matching the query.
                        type: number
                      totalPages:
                        description: Total number of pages available.
                        type: number
                    required:
                      - hasMore
                      - count
                      - totalCount
                      - totalPages
                      - currentPage
                      - perPage
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Response for status 200.
        '206':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    description: Campaign models for the requested page.
                    items:
                      additionalProperties: false
                      properties:
                        __campaignModelErrorCode:
                          description: >-
                            Provider error code, present when the template was
                            refused.
                          type: number
                        __campaignModelErrorMessage:
                          description: >-
                            Provider error message, present when the template
                            was refused.
                          type: string
                        approvedAt:
                          description: >-
                            When the provider approved the template, if
                            applicable.
                          format: date-time
                          nullable: true
                          type: string
                        campaignModelChannel:
                          description: >-
                            The channel this campaign model targets (e.g.
                            whatsapp).
                          type: string
                        campaignModelChannelID:
                          description: >-
                            Identifier of the specific channel connection this
                            campaign model belongs to.
                          type: string
                        campaignModelDescription:
                          description: >-
                            Free-text description of the campaign model, for
                            internal reference only.
                          type: string
                        campaignModelExternalID:
                          description: The provider-assigned identifier for this template.
                          type: string
                        campaignModelGatewayMeta:
                          additionalProperties: {}
                          description: >-
                            Provider-specific display/gateway configuration for
                            this template.
                          type: object
                        campaignModelGatewayRaw:
                          additionalProperties: {}
                          description: >-
                            Raw, unprocessed payload as returned by the
                            provider.
                          type: object
                        campaignModelID:
                          description: Unique identifier for this campaign model.
                          type: string
                        campaignModelMeta:
                          additionalProperties: {}
                          description: Arbitrary metadata attached to the campaign model.
                          type: object
                        campaignModelName:
                          description: The name of the campaign model.
                          type: string
                        campaignModelSlots:
                          additionalProperties: false
                          description: The template content, broken down by provider slot.
                          properties:
                            body:
                              additionalProperties: false
                              description: Body slot of the template.
                              properties:
                                content:
                                  description: Resolved body content.
                                  type: string
                                text:
                                  description: Resolved body text.
                                  type: string
                                variables:
                                  description: >-
                                    Variables referenced in the body slot
                                    content.
                                  items:
                                    additionalProperties: false
                                    properties:
                                      fallback:
                                        description: >-
                                          Value used when the variable cannot be
                                          resolved.
                                        type: string
                                      id:
                                        description: >-
                                          Variable identifier within the body
                                          slot.
                                        type: string
                                      key:
                                        description: >-
                                          Variable name as it appears in the body
                                          content.
                                        type: string
                                      type:
                                        description: The expected variable type.
                                        type: string
                                    required:
                                      - id
                                      - key
                                      - type
                                    type: object
                                  type: array
                              required:
                                - content
                                - text
                                - variables
                              type: object
                            buttons:
                              description: Interactive buttons attached to the template.
                              items:
                                additionalProperties: false
                                properties:
                                  example:
                                    description: >-
                                      Example value for variables used in this
                                      button, for provider review.
                                    type: string
                                  otpType:
                                    description: >-
                                      The one-time-password delivery mode, when
                                      type is OTP.
                                    enum:
                                      - COPY_CODE
                                      - ONE_TAP
                                      - ZERO_TAP
                                    type: string
                                  phoneNumber:
                                    description: >-
                                      Target phone number, when type is
                                      PHONE_NUMBER.
                                    type: string
                                  text:
                                    description: Label text shown on the button.
                                    type: string
                                  ttlMinutes:
                                    description: >-
                                      Minutes before a one-time code button
                                      expires, when type is OTP.
                                    type: number
                                  type:
                                    description: The interactive button type.
                                    enum:
                                      - ORDER_DETAILS
                                      - QUICK_REPLY
                                      - URL
                                      - PHONE_NUMBER
                                      - COPY_CODE
                                      - VOICE_CALL
                                      - OTP
                                    type: string
                                  url:
                                    description: Target URL, when type is URL.
                                    type: string
                                required:
                                  - type
                                  - text
                                type: object
                              type: array
                            footer:
                              additionalProperties: false
                              description: Footer slot of the template.
                              properties:
                                text:
                                  description: Footer text shown below the template body.
                                  type: string
                              type: object
                            header:
                              additionalProperties: false
                              description: Header slot of the template.
                              properties:
                                content:
                                  additionalProperties: {}
                                  description: Raw provider-specific header content.
                                  properties: {}
                                  type: object
                                preview:
                                  description: Preview text shown for the header slot.
                                  type: string
                                text:
                                  description: Resolved header text.
                                  type: string
                                type:
                                  description: Media type of the header slot.
                                  enum:
                                    - text
                                    - image
                                    - video
                                    - document
                                    - location
                                  type: string
                                variables:
                                  description: >-
                                    Variables referenced in the header slot
                                    content.
                                  items:
                                    additionalProperties: false
                                    properties:
                                      fallback:
                                        description: >-
                                          Value used when the variable cannot be
                                          resolved.
                                        type: string
                                      id:
                                        description: >-
                                          Variable identifier within the header
                                          slot.
                                        type: string
                                      key:
                                        description: >-
                                          Variable name as it appears in the
                                          header content.
                                        type: string
                                      type:
                                        description: The expected variable type.
                                        type: string
                                    required:
                                      - id
                                      - key
                                      - type
                                    type: object
                                  type: array
                              required:
                                - content
                                - preview
                                - text
                                - variables
                              type: object
                          required:
                            - header
                            - body
                            - footer
                            - buttons
                          type: object
                        campaignModelStatus:
                          description: >-
                            Current approval status of the template with the
                            provider.
                          type: string
                        campaignModelTags:
                          description: Tags used for organizing/filtering campaign models.
                          items:
                            type: string
                          type: array
                        campaignModelType:
                          description: >-
                            The template type/category as defined by the
                            provider.
                          type: string
                        createdAt:
                          description: When this campaign model was created.
                          format: date-time
                          type: string
                        createdBy:
                          description: Identifier of who created this campaign model.
                          type: string
                        deletedAt:
                          description: >-
                            When this campaign model was soft-deleted, if
                            applicable.
                          format: date-time
                          type: string
                        evaluatingAt:
                          description: >-
                            When the provider started evaluating the template,
                            if applicable.
                          format: date-time
                          nullable: true
                          type: string
                        modelVariables:
                          description: >-
                            Variables that must be filled in when sending this
                            template.
                          items:
                            additionalProperties: false
                            properties:
                              fallback:
                                description: >-
                                  Value used when the variable cannot be
                                  resolved.
                                type: string
                              key:
                                description: >-
                                  The variable name as it appears in the
                                  template slot content.
                                type: string
                              required:
                                description: >-
                                  Whether the provider requires this variable to
                                  be filled.
                                type: boolean
                              type:
                                description: The expected variable type.
                                type: string
                            required:
                              - key
                            type: object
                          type: array
                        processingAt:
                          description: >-
                            When the template was submitted for provider review,
                            if applicable.
                          format: date-time
                          nullable: true
                          type: string
                        refusedAt:
                          description: >-
                            When the provider refused the template, if
                            applicable.
                          format: date-time
                          nullable: true
                          type: string
                        tenantID:
                          description: The tenant this campaign model belongs to.
                          type: string
                        updatedAt:
                          description: When this campaign model was last updated.
                          format: date-time
                          type: string
                        updatedBy:
                          description: Identifier of who last updated this campaign model.
                          type: string
                      required:
                        - tenantID
                        - campaignModelID
                        - campaignModelChannel
                        - campaignModelChannelID
                        - campaignModelExternalID
                        - campaignModelType
                        - campaignModelName
                        - campaignModelTags
                        - campaignModelStatus
                        - campaignModelMeta
                        - campaignModelSlots
                        - campaignModelGatewayRaw
                        - campaignModelGatewayMeta
                        - processingAt
                        - evaluatingAt
                        - approvedAt
                        - refusedAt
                        - createdBy
                        - createdAt
                        - updatedBy
                        - updatedAt
                      type: object
                    type: array
                  meta:
                    additionalProperties: false
                    description: Pagination metadata.
                    properties:
                      count:
                        description: Number of items in this page.
                        type: number
                      currentPage:
                        description: The page number returned.
                        type: number
                      hasMore:
                        description: Whether more pages are available.
                        type: boolean
                      perPage:
                        description: Number of items per page.
                        type: number
                      totalCount:
                        description: Total number of campaign models matching the query.
                        type: number
                      totalPages:
                        description: Total number of pages available.
                        type: number
                    required:
                      - hasMore
                      - count
                      - totalCount
                      - totalPages
                      - currentPage
                      - perPage
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Response for status 206.
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      oneOf:
                        - $ref: '#/components/schemas/MissingTenantIDError'
                        - $ref: '#/components/schemas/RequestValidationError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            MissingTenantIDError (error_code 1001): tenantID absent from the
            URL. | RequestValidationError (error_code 1002): query params fail
            schema validation.
        '401':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/UnauthorizedError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: 'UnauthorizedError (error_code 1003): missing/invalid operator token.'
        '403':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/ForbiddenError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: 'ForbiddenError (error_code 1004): operator token rejected upstream.'
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/UnknownError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            UnknownError (error_code 5999): Unexpected internal error not
            otherwise documented for this endpoint.
      security:
        - operatorAuth: []
components:
  schemas:
    MissingTenantIDError:
      additionalProperties: false
      properties:
        error:
          enum:
            - MissingTenantIDError
          type: string
        error_code:
          enum:
            - 1001
          type: number
        message:
          example: tenantID is required.
          type: string
        statusCode:
          enum:
            - 400
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    RequestValidationError:
      additionalProperties: false
      properties:
        error:
          enum:
            - RequestValidationError
          type: string
        error_code:
          enum:
            - 1002
          type: number
        fields:
          items:
            additionalProperties: false
            properties:
              allowed:
                type: string
              field:
                type: string
              received:
                type: string
            required:
              - field
              - received
              - allowed
            type: object
          type: array
        message:
          example: Invalid request data.
          type: string
        statusCode:
          enum:
            - 400
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
        - fields
      type: object
    UnauthorizedError:
      additionalProperties: false
      properties:
        error:
          enum:
            - UnauthorizedError
          type: string
        error_code:
          enum:
            - 1003
          type: number
        message:
          example: You are not authorized to perform this request.
          type: string
        statusCode:
          enum:
            - 401
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    ForbiddenError:
      additionalProperties: false
      properties:
        error:
          enum:
            - ForbiddenError
          type: string
        error_code:
          enum:
            - 1004
          type: number
        message:
          example: You do not have access to this resource.
          type: string
        statusCode:
          enum:
            - 403
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    UnknownError:
      additionalProperties: false
      properties:
        error:
          enum:
            - UnknownError
          type: string
        error_code:
          enum:
            - 5999
          type: number
        message:
          example: For some unknown reason your request has not succeeded.
          type: string
        statusCode:
          enum:
            - 500
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
  securitySchemes:
    operatorAuth:
      bearerFormat: JWT
      description: >-
        Behalf of an Operator (default). A JWT issued by Talqui Core when an
        operator signs in, scoped to every tenant that operator belongs to. Send
        as `Authorization: Bearer <jwt-token>`.
      scheme: bearer
      type: http

````

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