メインコンテンツへスキップ
The Create Client endpoint lets you add clients directly to your AgencyHandy workspace from an external system. Unlike leads, clients are fully onboarded contacts who can be assigned to orders, invoices, and projects. Use this endpoint to sync new clients from a CRM, onboarding form, or any other data source.
Before using this endpoint, complete the Getting Started guide to obtain your API key. You do not need to send a company ID or role ID. AgencyHandy assigns the client to the workspace client role automatically.

Prerequisites

  • ✅ API key generated from Workspace Config → API Key

Endpoint

Headers

Request body

The request body is a JSON array. You can create one or more clients in a single request.
email
string
必須
The client’s email address. It must be valid and should be unique within your workspace.
firstName
string
必須
The client’s first name.
lastName
string
必須
The client’s last name.
status
string
必須
The client’s status. The only accepted value for this endpoint is Client.
password
string
Optional password for the client. If provided, it must contain at least 8 characters, one uppercase letter, one lowercase letter, one number, and one special character.
contactNo
string
The client’s phone number. Optional. Defaults to an empty string if omitted.
country
string
The client’s country. Optional.
city
string
The client’s city. Optional.
state
string
The client’s state or region. Optional.
zipCode
string
The client’s ZIP or postal code. Optional.
address
string
The client’s address. Optional.
category
string[]
Optional array of category or label IDs. Each ID must exist in the workspace.
companyName
string
The client’s company name. Optional.
sendInvitationEmail
boolean
Whether to send an invitation email. Optional. Defaults to true.
source
string
How you acquired this client. Optional. Example values: website, referral, social.
leadValue
string
The estimated value associated with the client. Optional.
website
string
The client’s website. Optional.
agent
string
Optional assigned agent ID.
lastContactedAt
string
Optional date for when the client was last contacted.
files
string[]
Optional array of file IDs attached to the client.
profileImage
string
Optional profile image URL or file reference.
customFields
array
Optional custom field responses for client custom fields.
Do not send companyId, role, isConvertedClient, or positionInBoard. The endpoint does not use those request fields. Unknown fields are removed during validation.

Full payload example

Only email, firstName, lastName, and status are required. Every other field shown here is optional.
customFields[]._id
string
必須
The custom field ID when sending a custom field response.
customFields[].stringValue
string
Optional string response value.
customFields[].numberValue
number
Optional number response value.
customFields[].dateValue
string
Optional date response value.
customFields[].booleanValue
boolean
Optional boolean response value.
customFields[].arrayValue
array
Optional array response value. Each item can include value and label.
customFields[].fileValue
array
Optional file response value. Each file item must include _id, link, sizeInBytes, s3Key, type, company, and isVersion.

Example request

cURL

Success response

success
boolean
Indicates whether at least one client was added.
data.addedClients
array
Clients that were created, restored, or converted from existing leads.
data.addedClients[].\_id
string
Unique ID of the newly created client. Use this ID when assigning the client to orders or invoices via the API.
data.addedClients[].name
string
The full name of the client (firstName + lastName).
data.addedClients[].status
string
The status of the client as stored.
data.notAddedClients
array
Clients that were not created. Each item includes the submitted email and a reason, such as Client already exists or One or more category not found.
You can pass up to 200 client objects in the array. If a submitted email belongs to an existing lead, AgencyHandy converts that lead into a client.