Ana içeriğe atla
The Create Lead endpoint lets you programmatically add new leads to your AgencyHandy workspace from any external system — a web form, a CRM, a marketing automation platform, or a custom script. Leads created via this endpoint appear in your lead pipeline immediately, just as if they were added manually.
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 lead to the workspace client role automatically.

Prerequisites

  • ✅ API key generated from Workspace Config → API Key

Create new leads

Endpoint

Headers

Request body

The request body is a JSON array — you can create one or more leads in a single call.
type
string
gerekli
The lead type. Allowed values: individual, leadCompanyMember.
email
string
gerekli
The lead’s email address. It must be valid and should be unique within your workspace.
status
string
gerekli
The lead’s pipeline status. Allowed values: New, Contacted, Qualified, Working, Proposal Sent, Negotiation.
password
string
Optional password for the lead. If provided, it must contain at least 8 characters, one uppercase letter, one lowercase letter, one number, and one special character.
firstName
string
The lead’s first name. Optional.
lastName
string
The lead’s last name. Optional.
contactNo
string
The lead’s phone number. Optional. Defaults to an empty string if omitted.
country
string
The lead’s country. Optional.
city
string
The lead’s city. Optional.
state
string
The lead’s state or region. Optional.
zipCode
string
The lead’s ZIP or postal code. Optional.
address
string
The lead’s address. Optional.
category
string[]
Optional array of category or label IDs. Each ID must exist in the workspace.
companyName
string
The lead’s company name. Optional.
sendInvitationEmail
boolean
Whether to send an invitation email. Optional. Defaults to true.
source
string
How you acquired this lead. Optional. Example values: website, referral, social.
leadValue
string
The estimated value of the lead. Optional.
website
string
The lead’s website. Optional.
agent
string
Optional assigned agent ID.
lastContactedAt
string
Optional date for when the lead was last contacted.
files
string[]
Optional array of file IDs attached to the lead.
profileImage
string
Optional profile image URL or file reference.
customFields
array
Optional custom field responses for lead custom fields.
closedWonDealCurrency
string
Optional currency code for a closed-won deal amount.
closedWonDealAmount
number
Optional closed-won deal amount. Can be null or an empty string.
contactLastEngagementDate
string
Optional date of the lead’s last engagement.
contactLastEngagementType
string
Optional last engagement type. Allowed values: Email, Phone, One-to-One, Online Meeting.
firstOutreachDate
string
Optional date of the first outreach.
disqualificationReason
string
Optional disqualification reason. Can be null or an empty string.
emailCount
number
Optional email activity count. Can be null or an empty string.
lastActivityDate
string
Optional date of the last activity.
meetingCount
number
Optional meeting count. Can be null or an empty string.
messageThreadCount
number
Optional message thread count. Can be null or an empty string.
outreachActivityCount
number
Optional outreach activity count. Can be null or an empty string.
Do not send role, isConvertedClient, or positionInBoard. The endpoint does not use those fields. Unknown fields are removed during validation.

Full payload example

Only type, email, and status are required. Every other field shown here is optional.

Example request

cURL

Success response

success
boolean
Indicates whether the request was processed successfully.
data.addedLeads
array
Leads that were created successfully.
data.addedLeads[].\_id
string
The unique ID of the newly created lead. Store this if you need to reference the lead in subsequent API calls.
data.addedLeads[].name
string
The full name of the lead (firstName + lastName).
data.addedLeads[].status
string
The pipeline status of the lead as stored.
data.notAddedLeads
array
Leads that were not created. Each item includes the submitted email, a reason, and sometimes the existing lead object.
You can pass up to 200 lead objects in the array. A valid request returns 201 when at least one lead is added, or 200 when all submitted leads are skipped, such as duplicates.