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

# List all customers

> Returns all customer objects, sorted by creation date (newest first). If no parameters are provided, results are paginated in pages of 30.



## OpenAPI

````yaml api-reference/anode/flatpeak-api-spec-anode.json GET /customers
openapi: 3.0.3
info:
  description: Flatpeak API
  version: 2025-09-14.anode
  title: Flatpeak API
  termsOfService: https://flatpeak.com/legal
  contact:
    name: Technical Support
    email: support@flatpeak.com
    url: https://flatpeak.com/contact
  license:
    name: Apache 2.0
    url: https://flatpeak.com/legal
servers:
  - url: https://api.flatpeak.com
    description: Location
security: []
tags:
  - name: Consumption
    description: Consumption operations
  - name: Customers
    description: Customer operations
  - name: Devices
    description: Device operations
  - name: Meters
    description: Meter readings operations
  - name: Events
    description: Events operations
  - name: Login
    description: Bearer auth token operations
  - name: Connect
    description: Connect operations
  - name: Locations
    description: Location operations
  - name: Rates
    description: Rates operations
  - name: Costs
    description: Consumption cost calculations
  - name: Schedules
    description: Consumption schedules
  - name: Tariffs
    description: Tariff operations
  - name: Slots
    description: Slots operations
externalDocs:
  description: Location documentation
  url: https://docs.flatpeak.com
paths:
  /customers:
    parameters: []
    get:
      tags:
        - Customers
      summary: List all customers
      description: >-
        Returns all customer objects, sorted by creation date (newest first). If
        no parameters are provided, results are paginated in pages of 30.
      operationId: list-customers
      parameters:
        - $ref: '#/components/parameters/ending_before'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/starting_after'
        - $ref: '#/components/parameters/reference_id'
      responses:
        '200':
          $ref: '#/components/responses/CustomerList'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '429':
          $ref: '#/components/responses/429'
      security:
        - bearerAuth: []
components:
  parameters:
    ending_before:
      schema:
        type: string
      in: query
      name: ending_before
      description: >-
        Specifies a cursor for pagination use; provider_id defines the place in
        the list. To retrieve the previous page in the list, include
        ending_before, which is the first ID in the currently retrieved list.
    limit:
      schema:
        type: integer
      in: query
      name: limit
      description: >-
        A limit on the number of objects to be returned. Can range between 1 and
        100, and the default is 30.
    starting_after:
      schema:
        type: string
      in: query
      name: starting_after
      description: >-
        Specifies a cursor for pagination use; provider_id defines the place in
        the list. To retrieve the next page in the list include starting_after
        where ID is the last ID in the currently retrieved list.
    reference_id:
      name: reference_id
      in: query
      required: false
      schema:
        type: string
      description: >-
        A reference that is meaningful to you, for example, an ID from your
        system.
  responses:
    '403':
      description: 403 forbidden
      content:
        application/json:
          schema:
            type: object
            x-examples:
              Example:
                message: Bad credentials
            properties:
              object:
                type: string
                example: error
                x-stoplight:
                  id: gria4ysjd9zhk
                default: error
              type:
                type: string
                x-stoplight:
                  id: 7mhtfljidnqcu
                example: invalid_request
                default: invalid_request
              code:
                type: string
                x-stoplight:
                  id: sy7ljpdy5wdes
                example: access_denied
                default: access_denied
              time_created:
                type: string
                x-stoplight:
                  id: 84d5biv9dfbc9
                format: date-time
                example: '2025-01-01T00:00:00Z'
            required:
              - object
              - type
              - code
          examples: {}
    '404':
      description: 404 response
      content:
        application/json:
          schema:
            type: object
            x-examples:
              Example:
                message: Not Found
            properties:
              object:
                type: string
                example: error
                x-stoplight:
                  id: qyc690tqd4dnh
                default: error
              type:
                type: string
                x-stoplight:
                  id: 6sog2aaccgb59
                example: invalid_request
                default: invalid_request
              code:
                type: string
                x-stoplight:
                  id: 6l9jrgodwxi0c
                example: not_found
                default: not_found
              time_created:
                type: string
                x-stoplight:
                  id: 1ywndy1nsshcz
                example: '2025-01-01T00:00:00Z'
                format: date-time
          examples: {}
    '429':
      description: 429 Too many requests
      content:
        application/json:
          schema:
            type: object
            properties:
              object:
                type: string
                x-stoplight:
                  id: irkmp11gg6sjx
                example: error
                default: error
              type:
                type: string
                x-stoplight:
                  id: u0gq12cizam3d
                default: rate_limit
                example: rate_limit
              code:
                type: string
                x-stoplight:
                  id: uh7x9404d4w3q
                default: too_many_requests
                example: too_many_requests
              message:
                type: string
                x-stoplight:
                  id: 9z8h79l1coblc
                default: Too many requests. Please retry after a short delay.
                example: Too many requests. Please retry after a short delay.
              time_created:
                type: string
                x-stoplight:
                  id: ea7o3uvdojrtc
                format: date-time
                default: '2026-01-29T17:11:52Z'
                example: '2026-01-29T17:11:52Z'
            required:
              - object
              - type
              - code
              - message
    CustomerList:
      description: ''
      content:
        application/json:
          schema:
            type: object
            x-examples:
              '':
                object: list
                url: /customers
                has_more: false
                data:
                  - live_mode: true
                    object: customer
                    id: cus_a83ec6da1e0d4917b9e9abf58d60574e
                    account_id: acc_c85e9f90aa18454487b50d3c1785ed4e
                    reference_id: ABC1234567890
                    time_created: '2021-05-05T05:37:27Z'
                    personal_details:
                      email: user@example.com
                      email_verified: true
                      phone: '440123456789'
                      phone_verified: true
                      preferred_locale: EN
                      timezone: Etc/UTC
                    postal_address:
                      address_line1: '123'
                      address_line2: Infinite Drive
                      city: London
                      state: Greater London
                      post_code: SE110AA
                      country_code: GB
                    geo_location:
                      latitude: '-77.52907766250239'
                      longitude: '167.1522246611749'
                    legal:
                      terms_accepted: true
                      timestamp: '2021-05-05T05:37:27Z'
                      ip: 8.8.8.8
                    providers:
                      - prv_37ef12d765d0403e8745c29b29826d69
                    locations:
                      - loc_5de9bad5d97b49a1b7382f2c0cec9799
                      - loc_b84526631dc54037940b75d3cb5971de
                    devices:
                      - dev_021ff68976894b73b62ec1d71cd6bb7b
                      - dev_458dc1492183456696fa3e42ab246a1e
                      - dev_fe23b2eeec81413bb305e676a7e63558
            properties:
              object:
                type: string
                description: Represents the object’s type. i.e. `list`.
                example: list
              url:
                type: string
                description: Represents the URL slug for the object.
                example: /customers
              has_more:
                type: boolean
                description: Is set to `true` if more objects are available.
              data:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
        application/xml:
          schema:
            type: object
            properties: {}
  schemas:
    Customer:
      type: object
      x-examples: {}
      title: Customer
      description: This object represents a customer of your business.
      x-tags:
        - Customers
      properties:
        id:
          type: string
          description: Flatpeak unique object Id.
          example: cus_65e421d1daa4a24082b4f590
        object:
          type: string
          description: Represents the object’s type.
          example: customer
        live_mode:
          type: boolean
          description: >-
            Has the value true if the object exists in live mode or the value
            false if the object exists in test mode.
        reference_id:
          type: string
          description: >-
            A reference that is meaningful to you, for example, an ID from your
            system.
          example: CUS1234567890
        locations:
          type: array
          description: >-
            An array of Flatpeak location IDs that are associated with this
            object.
          items:
            type: string
            example: loc_641b90b758fb8e6293716e40
        time_created:
          type: string
          description: Time when the object was created, in UTC.
          example: '2021-05-05T05:37:27Z'
        account_id:
          type: string
          description: Flatpeak unique account id
          example: acc_65e421bed29d88d9012e0662
      required:
        - id
        - object
        - live_mode
        - time_created
        - account_id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authenticate with `bearer` you obtained from
        [authentication](/api-reference/anode/authentication) endpoint.

````