Documentation

Get Lead Information

Last updated on August 20, 2026

Retrieve one lead by its ID or WhatsApp contact number. The response includes lead details, the assigned owner, journey information, and custom data fields.

Endpoint

POST /engage/v1/leads
PropertyValue
MethodPOST
Base path/engage/v1/leads
Full URLhttps://client-api.e-so.in/engage/v1/leads
AuthenticationRequired

Authentication

Every request must include a business access token in one of the following headers. If both headers are sent, Authorization is used.

HeaderFormatExample
AuthorizationBearer <token>Authorization: Bearer abc123...
auth-key<token>auth-key: abc123...
  • Tokens are scoped to the business, so only leads belonging to that business can be retrieved.
  • A missing, invalid, or expired token returns 401 Unauthorized.
  • Keep the token secret and rotate it immediately if it may have been exposed.

Request

Headers

HeaderRequiredDescription
Authorization or auth-keyYesBusiness access token.
Content-TypeYesapplication/json.

Body

Send exactly one lookup value. lead_id takes effect if both values are sent; contact_number is ignored in that case.

FieldTypeRequiredDescription
lead_idintegerOne of the twoLead ID. Required when contact_number is not sent.
contact_numberintegerOne of the twoWhatsApp number as digits only, without + or spaces.
POST /engage/v1/leads HTTP/1.1
Host: client-api.e-so.in
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "lead_id": 1234
}

Responses

Success — 200 OK

{
  "status": 200,
  "success": true,
  "message": "success.",
  "payload": {
    "id": 1234,
    "phone_number": "+919876543210",
    "country_code": 91,
    "source": "whatsapp",
    "name": "Example Lead",
    "auto_reminder": "ENABLED",
    "created_at": "2024-05-20T10:30:00.000Z",
    "opt_in": true,
    "updated_at": "2024-05-21T08:00:00.000Z",
    "origin": "api",
    "assign_user": {
      "name": "Example Owner",
      "email": "owner@example.com"
    },
    "journey": ["new_lead", "qualified"],
    "last_message_at": "2024-05-21T09:15:00.000Z",
    "lead_data": {
      "city": "Example City",
      "email": "lead@example.com",
      "custom_field": "value"
    }
  }
}
FieldTypeDescription
statusnumberHTTP status code, 200.
successbooleantrue when the request succeeds.
messagestringConfirmation message: success.
payload.idintegerLead ID.
payload.phone_numberstringFull phone number with a + prefix.
payload.country_codenumberCountry calling code.
payload.sourcestringSource platform.
payload.namestringDisplay name.
payload.assign_userobject or nullAssigned owner's name and email, or null when unassigned.
payload.journeyarrayJourney stages for the lead.
payload.last_message_atstring or nullISO timestamp of the last message.
payload.lead_dataobjectCustom lead fields with internal fields removed.

Error responses

HTTP statusWhen it happensResolution
401The token is missing, invalid, or expired.Verify the header and token value.
404No lead with the ID or contact number exists in the business.Confirm the lookup value and business scope.
422Neither lookup field was sent, or a value is not numeric.Send one numeric lead_id or contact_number.
500An unexpected server error occurred.Retry with backoff. If it persists, contact EasySocial Support.

Leads are isolated by business. A lead belonging to another business returns Lead not found!.

Behavior

BehaviorDetails
Business scopeThe lookup is limited to the business associated with the access token.
Contact number formatSend digits only without + or spaces. The response adds the + prefix.
Assignment visibilityUse this endpoint after Assign or Unassign to verify the assign_user value.

Code examples

cURL

# By lead ID
curl -X POST "https://client-api.e-so.in/engage/v1/leads" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"lead_id": 1234}'

# By contact number
curl -X POST "https://client-api.e-so.in/engage/v1/leads" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"contact_number": 919876543210}'

JavaScript — fetch

async function getLead({ leadId, contactNumber }) {
  const body = leadId
    ? { lead_id: leadId }
    : { contact_number: contactNumber };

  const response = await fetch("https://client-api.e-so.in/engage/v1/leads", {
    method: "POST",
    headers: {
      Authorization: "Bearer YOUR_TOKEN",
      "Content-Type": "application/json",
    },
    body: JSON.stringify(body),
  });

  const data = await response.json();
  if (!response.ok) throw new Error(`${data.status}: ${data.message}`);
  return data.payload;
}

const lead = await getLead({ leadId: 1234 });
console.log(lead.name, lead.assign_user);

Python — requests

import requests

url = "https://client-api.e-so.in/engage/v1/leads"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
response = requests.post(url, json={"lead_id": 1234}, headers=headers)

if response.status_code == 200:
    lead = response.json()["payload"]
    print(lead["name"], lead["assign_user"])
else:
    print(f"Error {response.status_code}: {response.text}")
MethodPathPurpose
GET/engage/v1/leadsList leads with date and assignment filters.
PUT/engage/v1/leads/{team-member-id}/{lead-id}/assignAssign a lead to a team member.
PUT/engage/v1/leads/{lead-id}/unassignRemove the owner from a lead.

Support

If an integration issue continues, contact EasySocial Support and include the request payload, response status and message, and the UTC timestamp. Never include the access-token value.