ClientSphereDocs
API reference/Leads

Create lead

Creates a lead and returns the created record with its generated id. Responds 201 on success, or 400 if the body fails validation.

POST
/leads

Authorization

AuthorizationRequiredBearer <token>

API key as Bearer token: Authorization: Bearer sk_live_.... Use sk_live_ prefixed keys for production data and sk_test_ prefixed keys for sandbox/test data.

In: header

X-API-Key<token>

API key via header: X-API-Key: sk_live_.... Use sk_live_ prefixed keys for production data and sk_test_ prefixed keys for sandbox/test data.

In: header

Request Body

application/jsonRequired
firstNamestring
lastNamestring
emailRequiredstring
Format: "email"
phonestring
jobTitlestring
companyNameRequiredstring
Minimum length: 1
websitestring
industrystring
companySizestring
Value in: "small" | "medium" | "large" | "enterprise"
stagestring
Default: "new"Value in: "new" | "contacted" | "qualified" | "disqualified"
disqualifiedReasonstring
Value in: "bad_fit" | "no_budget" | "unresponsive" | "competitor" | "duplicate" | "other"
scoreinteger
Minimum: 0Maximum: 100
sourcestring
Value in: "website" | "referral" | "cold_call" | "linkedin" | "trade_show" | "marketing" | "partner" | "other"
notesstring
tagsarray<string>
curl -X POST "https://clientsphere.io/api/v1/leads" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "John",
    "lastName": "Smith",
    "email": "john@company.com",
    "phone": "string",
    "jobTitle": "string",
    "companyName": "Acme Corp",
    "website": "string",
    "industry": "string",
    "companySize": "small",
    "stage": "new",
    "disqualifiedReason": "bad_fit",
    "score": 100,
    "source": "website",
    "notes": "string",
    "tags": [
      "string"
    ]
  }'

Created lead

{
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "companyId": "8bb73d03-06b4-47c7-80c7-59301f770eda",
    "firstName": "string",
    "lastName": "string",
    "email": "user@example.com",
    "phone": "string",
    "jobTitle": "string",
    "companyName": "string",
    "website": "string",
    "industry": "string",
    "companySize": "small",
    "stage": "new",
    "score": 100,
    "source": "website",
    "notes": "string",
    "tags": [
      "string"
    ],
    "assignedTo": 0,
    "disqualifiedReason": "bad_fit",
    "disqualifiedAt": "2019-08-24T14:15:22Z",
    "convertedAt": "2019-08-24T14:15:22Z",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}