Assign lead
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| Property | Value |
|---|---|
| Method | PUT |
| Base path | /engage/v1/leads |
| Full URL | https://client-api.e-so.in/engage/v1/leads/{team-member-id}/{lead-id}/assign |
| Authentication | Required |
Authentication
Every request must include a business access token in one of the following headers. If both headers are sent, Authorization is used.
| Header | Format | Example |
|---|---|---|
Authorization | Bearer <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
| Parameter | Type | Required | Description |
|---|---|---|---|
team-member-id | integer | Yes | ID of the team member who should own the lead. |
lead-id | integer | Yes | ID 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
| Header | Required | Description |
|---|---|---|
Authorization or auth-key | Yes | Business access token. |
Content-Type | No | No 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_TOKENResponses
Success — 201 Created
The lead was assigned to the requested team member.
{
"status": 201,
"success": true,
"message": "Operation Successful."
}| Field | Type | Description |
|---|---|---|
status | number | HTTP status code, 201. |
success | boolean | true when the assignment succeeds. |
message | string | Confirmation message. |
Error responses
Errors use the following JSON structure:
{
"status": 404,
"success": false,
"message": "Lead not found!"
}| HTTP status | Message | When it happens | Resolution |
|---|---|---|---|
401 | Unauthorized Access Token | The token is missing, invalid, expired, or revoked. | Check the header name and token value. Request a new token if needed. |
404 | Router default | One or both path parameters are not numeric. | Use integer IDs in the order /{team-member-id}/{lead-id}/assign. |
404 | Lead not found! | The lead does not exist in the business or was deleted. | Confirm the lead ID and verify it belongs to the business. |
500 | Internal server error | An 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
| Behavior | Details |
|---|---|
| Repeat assignment | Assigning the same lead to the same team member is safe to retry and returns 201. |
| Re-assignment | If another team member owns the lead, the request replaces the previous owner. |
| Side effects | The endpoint changes only the lead owner. It does not add or remove tags, trigger automations, or modify the lead journey. |
| Visibility | After 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}")Related endpoints
| Method | Path | Purpose |
|---|---|---|
PUT | /engage/v1/leads/{lead-id}/unassign | Remove the owner from a lead. |
POST | /engage/v1/leads | Retrieve a single lead by ID or phone number, including assigned owner details. |
GET | /engage/v1/leads | List 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.