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

# List banner templates

> The jurisdiction templates a banner can be created from, grouped by
region. Use a template's `id` as the `jurisdiction_id` for
`POST /consent-banners/from-template`.




## OpenAPI

````yaml get /banner-templates
openapi: 3.1.0
info:
  title: CookieChimp API
  description: |
    API for CookieChimp.com.

    ## Request bodies

    Resource endpoints expect the resource wrapped under its own key, e.g.
    `{"category": {"name": "Analytics"}}` rather than a bare object.
    `PUT /password` wraps in `user`. Two endpoints take their body unwrapped:
    `POST /auth`, which takes `email` and `password` at the top level, and
    `POST /consent-banners/from-template`, which takes `jurisdiction_id` —
    a selector for which template to build from, not an attribute of the
    banner it creates.

    ## Response envelopes

    Listing endpoints — including `GET /groups` and `GET /accounts` — return
    `{"pagination": {...}, "data": [...]}`. `GET /banner-templates` is the
    exception: it returns `{"data": [...]}` with no pagination, being a fixed
    catalogue rather than a collection of the account's records.
    Most single-resource endpoints
    return `{"data": {...}}`; a single group or account is returned unwrapped.
    Resource-deletion endpoints return `{"message": "..."}`; `DELETE /auth`
    returns an empty object.
  version: 1.2.0
servers:
  - url: https://cookiechimp.com/api/v1
security:
  - authorization: []
paths:
  /banner-templates:
    get:
      tags:
        - Consent Banners
      summary: List banner templates
      description: |
        The jurisdiction templates a banner can be created from, grouped by
        region. Use a template's `id` as the `jurisdiction_id` for
        `POST /consent-banners/from-template`.
      operationId: listBannerTemplates
      parameters:
        - $ref: '#/components/parameters/account_id'
      responses:
        '200':
          description: Templates grouped by region
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BannerTemplatesResponse'
        '401':
          $ref: '#/components/responses/AccountTokenRequired'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    account_id:
      name: account_id
      in: query
      description: |
        Which account to act on, as the account's API id. Only meaningful for a
        user API key, which may reach several accounts — an account key already
        identifies exactly one and ignores this.

        Accepted by the endpoints that declare it; others act on the account the
        key resolves to on its own.

        Optional for reads, where it narrows the request to that account.
        Required for writes that declare it when the key can reach more than one
        account: without it the request would act on an account it picked rather
        than one you named, so it is refused with a `400`.
      required: false
      schema:
        type: string
  schemas:
    BannerTemplatesResponse:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              region:
                type: string
              region_label:
                type: string
              templates:
                type: array
                items:
                  $ref: '#/components/schemas/BannerTemplate'
      example:
        data:
          - region: europe
            region_label: Europe
            templates:
              - id: gdpr
                name: GDPR
                flag: 🇪🇺
                consent_type: opt_in
                consent_type_label: Opt-in
    BannerTemplate:
      type: object
      properties:
        id:
          type: string
          description: Pass as `jurisdiction_id` when creating a banner
        name:
          type: string
        flag:
          type:
            - string
            - 'null'
        consent_type:
          type: string
          description: e.g. `opt_in`, `opt_out`
        consent_type_label:
          type: string
          description: e.g. `Opt-in`
    Error:
      type: object
      description: |
        The standard error envelope, used for authentication, authorization,
        pagination and not-found errors.
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: integer
              message:
                type: string
      example:
        errors:
          - code: 401
            message: Invalid API Key
  responses:
    AccountTokenRequired:
      description: |
        Missing or invalid API token, or a token that does not resolve to an
        account. Account-scoped endpoints accept an account token, or a user
        token whose user belongs to an account; partner tokens are rejected.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            errors:
              - code: 401
                message: API key must belong to an account
    RateLimited:
      description: |
        Too many requests. The general limit is 300 requests per 5 minutes per
        API token; the auth endpoints are throttled more tightly per IP.
      headers:
        Retry-After:
          description: Seconds until the current rate-limit window resets
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            errors:
              - code: 429
                message: Too many requests. Please retry later.
  securitySchemes:
    authorization:
      type: http
      scheme: bearer
      description: API token obtained from the login endpoint or the dashboard

````