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

# Create Client

> Creates a new authorized client

## Create Client

```text theme={"dark"}
POST /v1/clients
```

Creates a new authorized client.

### Request Body

| Field         | Type   | Required | Description                                                      |
| ------------- | ------ | -------- | ---------------------------------------------------------------- |
| `name`        | string | Yes      | Display name for the client                                      |
| `ip_address`  | string | Yes      | IP address or CIDR range (e.g., `203.0.113.42` or `10.0.0.0/16`) |
| `type`        | string | No       | Client type: `user` or `server` (defaults to `server`)           |
| `ip_notes`    | object | No       | Metadata about the IP address                                    |
| `description` | string | No       | Human-readable description                                       |

### Response

Returns the created client row. Unlike [Get Client](./get), this response does **not** include the `route_assignments` array (route assignments only appear on `GET /v1/clients/:id`) and includes the raw `tenant_id` column.

<CodeGroup>
  ```bash cURL theme={"dark"}
  curl -X POST https://api.knoxcall.com/v1/clients \
    -H "Authorization: Bearer tk_live_abc123..." \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Production Backend",
      "ip_address": "203.0.113.0/24",
      "type": "server",
      "description": "Main backend servers"
    }'
  ```

  ```python Python theme={"dark"}
  import requests

  resp = requests.post(
      "https://api.knoxcall.com/v1/clients",
      headers={
          "Authorization": "Bearer tk_live_abc123...",
          "Content-Type": "application/json"
      },
      json={
          "name": "Production Backend",
          "ip_address": "203.0.113.0/24",
          "type": "server",
          "description": "Main backend servers"
      }
  )
  client = resp.json()
  ```

  ```javascript Node.js theme={"dark"}
  const resp = await fetch("https://api.knoxcall.com/v1/clients", {
    method: "POST",
    headers: {
      Authorization: "Bearer tk_live_abc123...",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      name: "Production Backend",
      ip_address: "203.0.113.0/24",
      type: "server",
      description: "Main backend servers"
    })
  });
  const client = await resp.json();
  ```
</CodeGroup>

### Errors

| Status | Type               | Description                                     |
| ------ | ------------------ | ----------------------------------------------- |
| 400    | `validation_error` | Missing required fields or invalid type         |
| 403    | `plan_limit`       | Client limit reached for your subscription plan |
