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

# List customers

> Retrieve a paginated, searchable list of the store's customers. Requires the READ_CUSTOMERS scope.

Returns the store's customers sorted by most recent activity, with optional free-text search across name, email and phone. The store is bound to your app token server-side — never send a shop id.


## OpenAPI

````yaml GET /customers
openapi: 3.1.0
info:
  title: Salesive Apps API — Customers & Categories
  version: 1.0.0
  description: >-
    Read and manage the store's customers and product categories from an
    installed third-party app. Every endpoint authenticates with an
    installed-app access token (prefix `app_`) and requires a specific OAuth
    scope. The target store is bound to the token server-side from the
    installation — never send a shop id.
servers:
  - url: https://api.salesive.com/api/v1
    description: Production
security:
  - AppToken: []
paths:
  /customers:
    get:
      tags:
        - Customers
      summary: List customers
      description: >-
        Returns a paginated list of the store's customers, sorted by most
        recently active. Supports a free-text search across name, email and
        phone. The store is bound to the app token server-side from the
        installation — never send a shop id. Requires the `READ_CUSTOMERS`
        scope.
      operationId: listCustomers
      parameters:
        - name: page
          in: query
          required: false
          description: 1-based page number.
          schema:
            type: integer
            default: 1
            minimum: 1
        - name: limit
          in: query
          required: false
          description: Items per page. Defaults to 10, capped at 100.
          schema:
            type: integer
            default: 10
            minimum: 1
            maximum: 100
        - name: search
          in: query
          required: false
          description: >-
            Case-insensitive substring match against customer name, email or
            phone.
          schema:
            type: string
      responses:
        '200':
          description: Paginated list of customers.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/EnvelopeBase'
                  - type: object
                    properties:
                      data:
                        allOf:
                          - $ref: '#/components/schemas/PageMeta'
                          - type: object
                            properties:
                              customers:
                                type: array
                                items:
                                  $ref: '#/components/schemas/Customer'
              example:
                status: 200
                success: true
                message: Customers retrieved
                data:
                  customers:
                    - _id: 665a1f2c9b1e4a0012ab34cd
                      user:
                        _id: 6650aa11bb22cc33dd44ee55
                        name: Ada Obi
                        email: ada@example.com
                        avatar: https://cdn.example.com/u/ada.png
                      shop: 664f0e2a1c2b3d4e5f6a7b8c
                      name: Ada Obi
                      phone: '+2348012345678'
                      email: ada@example.com
                      lastActive: '2026-06-27T14:05:00.000Z'
                      online: false
                      active: true
                      createdAt: '2026-05-01T09:00:00.000Z'
                      updatedAt: '2026-06-27T14:05:00.000Z'
                      avatar: https://cdn.example.com/u/ada.png
                      id: 665a1f2c9b1e4a0012ab34cd
                  page: 1
                  pages: 4
                  total: 37
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    EnvelopeBase:
      type: object
      description: >-
        Standard Salesive response envelope. The operation-specific payload is
        carried in `data`.
      required:
        - status
        - success
        - message
      properties:
        status:
          type: integer
          description: HTTP status code, echoed in the body.
        success:
          type: boolean
          description: Whether the request succeeded.
        message:
          type: string
          description: Human-readable result message.
    PageMeta:
      type: object
      description: >-
        Flat pagination metadata returned alongside the items array on list
        responses.
      properties:
        page:
          type: integer
          description: Current page (1-based).
        pages:
          type: integer
          description: Total number of pages.
        total:
          type: integer
          description: Total number of matching items.
    Customer:
      type: object
      description: A store-scoped customer record.
      properties:
        _id:
          type: string
        id:
          type: string
          description: Virtual alias of `_id`.
        user:
          oneOf:
            - $ref: '#/components/schemas/UserProfile'
            - type: 'null'
          description: >-
            Linked platform user, or null when the customer is not linked to a
            user.
        shop:
          type: string
          description: The store id (bound server-side).
        name:
          type: string
        phone:
          type:
            - string
            - 'null'
        email:
          type: string
        lastActive:
          type: string
          format: date-time
        online:
          type: boolean
        active:
          type: boolean
        avatar:
          type:
            - string
            - 'null'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    UserProfile:
      type: object
      description: The platform user linked to the customer, when one exists.
      properties:
        _id:
          type: string
        name:
          type: string
        email:
          type: string
        avatar:
          type:
            - string
            - 'null'
    Envelope:
      allOf:
        - $ref: '#/components/schemas/EnvelopeBase'
        - type: object
          properties:
            data:
              description: Operation-specific payload (object, array, or null).
  responses:
    Unauthorized:
      description: Missing or invalid app access token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Envelope'
          example:
            status: 401
            success: false
            message: Authentication required
            data: null
    Forbidden:
      description: The app token is missing the OAuth scope required for this operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Envelope'
          example:
            status: 403
            success: false
            message: Insufficient scope
            data: null
  securitySchemes:
    AppToken:
      type: http
      scheme: bearer
      description: >-
        Installed-app access token (prefix app_), issued by the OAuth install
        flow. The store is bound to the token server-side — never send a shop
        id.

````