Clients
The Clients API provides CRUD access to clients, plus ancillary actions for setting tags, changing the status, and changing the account owner.New to the API? Start with Getting started (base URL, response envelope, errors, pagination) and Authentication (API keys). Those conventions apply to every endpoint below and are not repeated here.
Identifier note: unlike most resources, clients are addressed by their numericclient_id(the clients table has no unique-id column). Wherever{id}appears below it is theclient_id.
The client object
All endpoints that return a client use this shape:List / search clients
Query parameters
Example request
Example response — 200 OK
Get a client
Example request
200) with message “Client retrieved successfully.”
Create a client
first_name,
last_name and email (these are required). If a contact-type user already exists with that
email, it is promoted to the client’s primary user. A welcome email is not sent unless you
pass send_email=yes. The account owner can later be changed with the owner action.
Body parameters
Required custom fields configured for clients must also be supplied (using their field
name). Missing required custom fields return a 422.
Example request
Example response — 201 Created
Update a client
client_company_name is required. The primary user / account owner is not changed here —
use the owner action.
Body parameters
As with create, required client custom fields must be supplied.
Example request
Example response — 200 OK
Delete a client
Example request
Example response — 200 OK
Set tags
tags array is the full set — it replaces existing tags; an
empty array clears them.
200) with message “Client tags updated successfully.”
Change status
200) with message “Client status updated successfully.”
Change account owner
owner must be the id of a user that already
belongs to this client; it replaces the previous account owner.
200) with message “Client account owner updated successfully.”