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

# Get Client by ID

> Fetch a client, optionally with its permissions, credits, code integrations and whitelabel details

<Note>
  Related data is opt-in. With no `include*` flags, only the client's own fields are returned. Use `includeCodeIntegrations=true` to read the client's code snippets (for example to get a snippet `id` to update).
</Note>

## Path Parameters

<ParamField path="id" type="number" required>
  Client ID
</ParamField>

## Query Parameters

<ParamField query="api_key" type="string" required>
  Your SmartLead API key (client API keys are not allowed)
</ParamField>

<ParamField query="includePermissions" type="boolean">
  Include `client_permissions`
</ParamField>

<ParamField query="includeCredits" type="boolean">
  Include `user_client_credit`
</ParamField>

<ParamField query="includeCodeIntegrations" type="boolean">
  Include `client_code_integrations`
</ParamField>

<ParamField query="includeWhitelabel" type="boolean">
  Include `user` (your account's whitelabel details)
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://server.smartlead.ai/api/v1/client/456?api_key=YOUR_KEY&includePermissions=true&includeCodeIntegrations=true"
  ```

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

  response = requests.get(
      "https://server.smartlead.ai/api/v1/client/456",
      params={"api_key": "YOUR_API_KEY", "includeCodeIntegrations": "true"}
  )
  snippets = response.json()["data"]["client_code_integrations"]
  print(snippets)
  ```
</RequestExample>

## Response

<ResponseField name="data" type="object">
  The client: `id`, `uuid`, `name`, `email`, `logo`, `user_id`, `created_at`, `logo_url`, `is_credit_assigned`, `mobile_device_id`, `ga_view_access`, `client_preferences`, plus the requested related sets:

  * `client_permissions` (with `includePermissions`): one-element array of `{ permission, retricted_category }` (empty array when none). `retricted_category` holds the hidden lead category IDs (the key is spelled this way).
  * `user_client_credit` (with `includeCredits`): `{ id, lead_credits, lead_credits_used, email_credits, email_credits_used }` or `null`
  * `client_code_integrations` (with `includeCodeIntegrations`): array of `{ id, snippet_name, snippet_code }`, ordered by `id`
  * `user` (with `includeWhitelabel`): `{ gpt_api_info, whitelabel_details, display_whitelabel_credentials, wl_google_client_id, wl_microsoft_client_id }`
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "ok": true,
    "data": {
      "id": 456,
      "uuid": "5b0c1c9e-2f3a-4d7b-9d1e-1a2b3c4d5e6f",
      "name": "Acme Client",
      "email": "client@acme.com",
      "logo": null,
      "user_id": 11,
      "created_at": "2026-01-10T09:00:00.000Z",
      "logo_url": null,
      "is_credit_assigned": false,
      "mobile_device_id": null,
      "ga_view_access": false,
      "client_preferences": {},
      "client_permissions": [
        { "permission": ["reply_master_inbox"], "retricted_category": [4, 5] }
      ],
      "client_code_integrations": [
        {
          "id": 12,
          "snippet_name": "LinkedIn Outreach",
          "snippet_code": "<script>...</script>"
        }
      ]
    }
  }
  ```

  ```json 404 theme={null}
  {
    "message": "Client not found or does not belong to the user"
  }
  ```
</ResponseExample>
