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

# List customers

> Returns your customers, newest first. Look one up by `email` or `externalId`, or page through all of them.

Required scope: `customers:read`.




## OpenAPI

````yaml /openapi.yaml get /customers
openapi: 3.1.0
info:
  title: Cerium API
  version: 1.0.0
  description: |
    Send your customers and their conversations to Cerium from your own backend.
    Every request is authenticated with an API key.
servers:
  - url: https://api.usecerium.com/v1
    description: Production
security:
  - apiKey: []
tags:
  - name: Customers
  - name: Conversations
  - name: Messages
paths:
  /customers:
    get:
      tags:
        - Customers
      summary: List customers
      description: >
        Returns your customers, newest first. Look one up by `email` or
        `externalId`, or page through all of them.


        Required scope: `customers:read`.
      operationId: listCustomers
      parameters:
        - name: email
          in: query
          description: Only the customer with this email.
          schema:
            type: string
            format: email
            maxLength: 320
          example: ada@example.com
        - name: externalId
          in: query
          description: Only the customer with this `externalId`.
          schema:
            type: string
            maxLength: 128
          example: user_8271
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          description: A page of customers.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerList'
        '400':
          $ref: '#/components/responses/Invalid'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    Page:
      name: page
      in: query
      schema:
        type: integer
        minimum: 1
        default: 1
    Limit:
      name: limit
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
  schemas:
    CustomerList:
      type: object
      properties:
        message:
          type: string
        status:
          type: string
          example: success
        data:
          type: array
          items:
            $ref: '#/components/schemas/Customer'
        meta:
          $ref: '#/components/schemas/PageMeta'
    Customer:
      type: object
      properties:
        id:
          type: string
          example: prt_8271
          description: Cerium's id for the customer.
        externalId:
          type:
            - string
            - 'null'
          example: user_8271
          description: Your own id for the customer.
        name:
          type:
            - string
            - 'null'
          example: Ada Obi
        email:
          type:
            - string
            - 'null'
          format: email
          example: ada@example.com
        phone:
          type:
            - string
            - 'null'
          example: '+2348012345678'
        tags:
          type: array
          items:
            type: string
          example:
            - vip
        attributes:
          type: object
          description: Values for your own attributes, by name.
          additionalProperties:
            type: string
          example:
            plan: Business
        createdAt:
          type: string
          format: date-time
    PageMeta:
      type: object
      properties:
        totalItems:
          type: integer
          example: 134
        itemCount:
          type: integer
          example: 20
        itemsPerPage:
          type: integer
          example: 20
        totalPages:
          type: integer
          example: 7
        currentPage:
          type: integer
          example: 1
    Error:
      type: object
      description: >
        `message` is always present. `code` is a stable identifier for specific
        errors you may want to handle in code.

        A validation error has a `message` that is a list of everything to fix.
      properties:
        code:
          type: string
          description: A stable identifier you can match on.
        message:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        statusCode:
          type: integer
        error:
          type: string
      required:
        - message
  responses:
    Invalid:
      description: The request is not valid. `message` says what to fix.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 400
            error: Bad Request
            message:
              - email must be an email
    Unauthorized:
      description: The key is missing or not valid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 401
            message: Authentication token is missing.
    Forbidden:
      description: The key does not have the scope this call needs.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 403
            message: This key cannot do that.
    RateLimited:
      description: Too many requests. Wait, then try again.
      headers:
        Retry-After:
          description: Seconds to wait before trying again.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >
        Your API key, sent as `Authorization: Bearer <key>`. Create keys in the
        Cerium dashboard.

        Keep them on your servers only.

````