> ## 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.

# Create Client

> Create a new client (whitelabel sub-account) under your account

<Note>
  Create client sub-accounts to manage multiple brands or agencies from a single SmartLead account. Each client gets their own isolated workspace with configurable permissions.
</Note>

## Overview

Creates a new client sub-account under your main SmartLead account. Clients are whitelabel sub-accounts that allow agencies to manage multiple brands with isolated data and configurable permissions.

## Query Parameters

<ParamField query="api_key" type="string" required>
  Your SmartLead API key
</ParamField>

## Request Body

<ParamField body="email" type="string" required>
  Client email address. Must be unique across the platform.
</ParamField>

<ParamField body="name" type="string" required>
  Client display name (company or brand name)
</ParamField>

<ParamField body="password" type="string">
  Login password for the client. If not provided, the client will need to set one.
</ParamField>

<ParamField body="logo" type="string">
  Base64 encoded logo image for whitelabel branding
</ParamField>

<ParamField body="logo_url" type="string">
  URL to the client logo image for whitelabel branding
</ParamField>

<ParamField body="permission" type="array">
  Array of permission strings defining what the client can access. Controls feature visibility and access.
</ParamField>

<ParamField body="is_credit_assigned" type="boolean">
  Whether email/lead credits are specifically assigned to this client
</ParamField>

<ParamField body="email_credits" type="number">
  Number of email credits allocated to this client (when `is_credit_assigned` is true)
</ParamField>

<ParamField body="lead_credits" type="number">
  Number of lead credits allocated to this client (when `is_credit_assigned` is true)
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://server.smartlead.ai/api/v1/client/save?api_key=YOUR_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "email": "admin@acme.com",
      "name": "Acme Agency",
      "permission": ["campaigns", "email_accounts", "leads"],
      "is_credit_assigned": true,
      "email_credits": 10000,
      "lead_credits": 5000
    }'
  ```
</RequestExample>

## Response Codes

<ResponseField name="200" type="Success">
  Request successful
</ResponseField>

<ResponseField name="400" type="Bad Request">
  Invalid request parameters or malformed request body
</ResponseField>

<ResponseField name="401" type="Unauthorized">
  Invalid or missing API key
</ResponseField>

<ResponseField name="422" type="Validation Error">
  Request validation failed. Check parameter types and constraints.
</ResponseField>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "ok": true,
    "data": {
      "id": 301,
      "name": "Acme Agency",
      "email": "admin@acme.com",
      "api_key": "cl_xxxxxxxxxxxxxxxx",
      "created_at": "2025-12-01T10:00:00.000Z"
    }
  }
  ```

  ```json 401 - Unauthorized theme={null}
  {
    "message": "Invalid API Key"
  }
  ```
</ResponseExample>
