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

# GET /v1/crm/customers/:id

> Fetch a single customer by id.

Returns one customer. The id is the `_id` returned by [`GET /v1/crm/customers`](/dev/endpoints/crm-customers-list) or [`POST /v1/crm/customers`](/dev/endpoints/crm-customer-create).

## Endpoint

```
GET https://api.keebai.com/v1/crm/customers/{id}
```

## Required scope

`crm:customers:read`

## Headers

| Header          | Required | Value                    |
| --------------- | -------- | ------------------------ |
| `Authorization` | Yes      | `Bearer kbai_pk_<token>` |

## Path parameters

| Field | Type     | Required | Description                 |
| ----- | -------- | -------- | --------------------------- |
| `id`  | `string` | Yes      | `ObjectId` of the customer. |

## Example request

<CodeGroup>
  ```bash curl theme={null}
  curl https://api.keebai.com/v1/crm/customers/65a1f2b3c4d5e6f7a8b9c0d1 \
    -H "Authorization: Bearer kbai_pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  ```

  ```js JavaScript theme={null}
  const response = await fetch(
    `https://api.keebai.com/v1/crm/customers/${customerId}`,
    {
      headers: { Authorization: `Bearer ${process.env.KEEBAI_API_TOKEN}` },
    },
  );
  const { customer } = await response.json();
  ```

  ```python Python theme={null}
  import os, requests

  resp = requests.get(
      f"https://api.keebai.com/v1/crm/customers/{customer_id}",
      headers={"Authorization": f"Bearer {os.environ['KEEBAI_API_TOKEN']}"},
      timeout=10,
  )
  resp.raise_for_status()
  customer = resp.json()["customer"]
  ```
</CodeGroup>

## Response

### 200 OK

```json theme={null}
{
  "customer": {
    "_id": "65a1f2b3c4d5e6f7a8b9c0d1",
    "name": "Juan",
    "last_name": "Pérez",
    "email": "juan@example.com",
    "phone": "+56912345678",
    "identification_number": "12345678-9",
    "identification_type": "rut",
    "identification_country": "CL",
    "external_ids": [
      { "provider": "shopify", "external_id": "gid://shopify/Customer/1234" }
    ],
    "custom_fields": {},
    "tags": [],
    "accepts_marketing": false,
    "created_at": "2026-05-02T14:31:07.221Z",
    "updated_at": "2026-05-02T14:31:07.221Z"
  }
}
```

Note the response wraps the record in a `customer` key, unlike the list endpoint which returns a `data` array.

### 401 Unauthorized

Missing, invalid, revoked, or expired token.

### 403 Forbidden

The token does not have the `crm:customers:read` scope.

### 404 Not Found

No customer with that id, or the customer belongs to a different company.


## OpenAPI

````yaml GET /v1/crm/customers/{id}
openapi: 3.0.0
info:
  title: Keebai Public API
  description: Superficie pública REST autenticada con Personal Access Tokens (PAT).
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.keebai.com
    description: Production
security: []
tags: []
paths:
  /v1/crm/customers/{id}:
    get:
      tags:
        - crm-customers
      summary: Obtener detalle de un cliente
      operationId: PublicCustomersController_get
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicCustomerEnvelopeDto'
      security:
        - PAT: []
components:
  schemas:
    PublicCustomerEnvelopeDto:
      type: object
      properties:
        customer:
          $ref: '#/components/schemas/PublicCustomerResponseDto'
      required:
        - customer
    PublicCustomerResponseDto:
      type: object
      properties:
        _id:
          type: string
          description: ObjectId del cliente
        name:
          type: string
        last_name:
          type: string
        email:
          type: string
        phone:
          type: string
        identification_number:
          type: string
        identification_type:
          type: string
          enum:
            - rut
            - dni
            - passport
            - other
        identification_country:
          type: string
          description: Código de país ISO 3166-1 alpha-2
        external_ids:
          type: array
          items:
            $ref: '#/components/schemas/PublicCustomerExternalIdResponseDto'
        custom_fields:
          type: object
          description: Campos personalizados de la company
        tags:
          description: Ids de tags del CRM
          type: array
          items:
            type: string
        accepts_marketing:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - _id
        - name
        - external_ids
        - custom_fields
        - tags
        - accepts_marketing
        - created_at
        - updated_at
    PublicCustomerExternalIdResponseDto:
      type: object
      properties:
        provider:
          type: string
          description: Sistema externo dueño del identificador
        external_id:
          type: string
          description: Identificador del cliente en ese sistema
      required:
        - provider
        - external_id
  securitySchemes:
    PAT:
      scheme: bearer
      bearerFormat: kbai_pk_<hex>
      type: http
      description: >-
        Personal Access Token con prefijo `kbai_pk_`. Generar desde el portal
        con permiso `developer.manage_tokens`.

````