Documentation

Assign lead

Last updated on August 20, 2026

Assign a lead to a team member so it appears in that member's assigned queue and can be followed up on.

Endpoint

PUT /engage/v1/leads/{team-member-id}/{lead-id}/assign
PropertyValue
MethodPUT
Base path/engage/v1/leads
Full URLhttps://client-api.e-so.in/engage/v1/leads/{team-member-id}/{lead-id}/assign
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 issued per business and can assign only leads belonging to that business.
  • A missing, invalid, or expired token returns 401 Unauthorized.
  • Keep the token secret. Do not expose it in client-side code or public repositories. Rotate it immediately if it may have been leaked.

Path parameters

ParameterTypeRequiredDescription
team-member-idintegerYesID of the team member who should own the lead.
lead-idintegerYesID of the lead to assign. The lead must belong to the business.

Both values must be positive integers. The order matters: use /{team-member-id}/{lead-id}/assign. Non-numeric values do not match the route and return 404 Not Found.

Request

Headers

HeaderRequiredDescription
Authorization or auth-keyYesBusiness access token.
Content-TypeNoNo body is required. If sent, application/json is accepted and ignored.

Body

No request body is required. The team member and lead are provided in the URL.

PUT /engage/v1/leads/42/1234/assign HTTP/1.1
Host: client-api.e-so.in
Authorization: Bearer YOUR_TOKEN

Responses

Success — 201 Created

The lead was assigned to the requested team member.

{
  "status": 201,
  "success": true,
  "message": "Operation Successful."
}
FieldTypeDescription
statusnumberHTTP status code, 201.
successbooleantrue when the assignment succeeds.
messagestringConfirmation message.

Error responses

Errors use the following JSON structure:

{
  "status": 404,
  "success": false,
  "message": "Lead not found!"
}
HTTP statusMessageWhen it happensResolution
401Unauthorized Access TokenThe token is missing, invalid, expired, or revoked.Check the header name and token value. Request a new token if needed.
404Router defaultOne or both path parameters are not numeric.Use integer IDs in the order /{team-member-id}/{lead-id}/assign.
404Lead not found!The lead does not exist in the business or was deleted.Confirm the lead ID and verify it belongs to the business.
500Internal server errorAn unexpected server error occurred.Retry with exponential backoff. If it persists, contact EasySocial Support with the request ID and timestamp.

Leads are isolated by business. If a lead belongs to another business, the response is Lead not found!.

Behavior

BehaviorDetails
Repeat assignmentAssigning the same lead to the same team member is safe to retry and returns 201.
Re-assignmentIf another team member owns the lead, the request replaces the previous owner.
Side effectsThe endpoint changes only the lead owner. It does not add or remove tags, trigger automations, or modify the lead journey.
VisibilityAfter success, the lead appears in GET /engage/v1/leads?assigned=true and includes assigned user details when fetched through POST /engage/v1/leads.

Code examples

These examples use team-member-id = 42 and lead-id = 1234. Replace YOUR_TOKEN with the business access token.

cURL

curl -X PUT "https://client-api.e-so.in/engage/v1/leads/42/1234/assign" \
  -H "Authorization: Bearer YOUR_TOKEN"

# Alternative header
curl -X PUT "https://client-api.e-so.in/engage/v1/leads/42/1234/assign" \
  -H "auth-key: YOUR_TOKEN"

JavaScript — fetch

const response = await fetch(
  "https://client-api.e-so.in/engage/v1/leads/42/1234/assign",
  {
    method: "PUT",
    headers: { Authorization: "Bearer YOUR_TOKEN" },
  },
);

const body = await response.json();
if (!response.ok) {
  console.error(`Error ${body.status}: ${body.message}`);
} else {
  console.log(body.message);
}

Python — requests

import requests

url = "https://client-api.e-so.in/engage/v1/leads/42/1234/assign"
headers = {"Authorization": "Bearer YOUR_TOKEN"}
response = requests.put(url, headers=headers)

if response.status_code == 201:
    print(response.json()["message"])
elif response.status_code == 401:
    print("Authentication failed — check your token.")
elif response.status_code == 404:
    print("Lead not found — check the lead ID and business.")
else:
    print(f"Unexpected error {response.status_code}: {response.text}")
MethodPathPurpose
PUT/engage/v1/leads/{lead-id}/unassignRemove the owner from a lead.
POST/engage/v1/leadsRetrieve a single lead by ID or phone number, including assigned owner details.
GET/engage/v1/leadsList leads with optional assignment, date-range, and pagination filters.

Support

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