Skip to main content

Create Client

POST /v1/clients
Creates a new authorized client.

Request Body

FieldTypeRequiredDescription
namestringYesDisplay name for the client
ip_addressstringYesIP address or CIDR range (e.g., 203.0.113.42 or 10.0.0.0/16)
typestringNoClient type: user or server (defaults to server)
ip_notesobjectNoMetadata about the IP address
descriptionstringNoHuman-readable description

Response

Returns the created client row. Unlike Get Client, 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.
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"
  }'
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()
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();

Errors

StatusTypeDescription
400validation_errorMissing required fields or invalid type
403plan_limitClient limit reached for your subscription plan