Unassign Lead
Remove the owner from a lead so it returns to the unassigned pool and can be reassigned or picked up by the next available team member.
Endpoint
PUT /engage/v1/leads/{lead-id}/unassign| Property | Value |
|---|---|
| Method | PUT |
| Base path | /engage/v1/leads |
| Full URL | https://client-api.e-so.in/engage/v1/leads/{lead-id}/unassign |
| 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 unassign 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 |
|---|---|---|---|
lead-id | integer | Yes | ID of the lead to unassign. The lead must belong to the business. |
The ID must be a positive integer. This endpoint does not require a team member ID; it clears the current owner regardless of who the lead is assigned to.
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 lead is identified in the URL.
PUT /engage/v1/leads/1234/unassign HTTP/1.1
Host: client-api.e-so.in
Authorization: Bearer YOUR_TOKENResponses
Success — 201 Created
The lead was successfully unassigned.
{
"status": 201,
"success": true,
"message": "Operation Successful."
}| Field | Type | Description |
|---|---|---|
status | number | HTTP status code, 201. |
success | boolean | true when the operation 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 | The lead-id is not numeric. | Use an integer ID in the form /{lead-id}/unassign. |
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 unassignment | Unassigning an already unassigned lead still returns 201 and is safe to retry. |
| Clears any owner | The endpoint removes the current owner without requiring the current team member's ID. |
| Side effects | The endpoint only clears the lead owner. It does not add or remove tags, trigger automations, or modify the lead journey. |
| Visibility | After success, the lead appears as unassigned with GET /engage/v1/leads?assigned=false. A lead fetched through POST /engage/v1/leads has no owner and its assign_user field is null. |
| Pair with Assign | To move a lead to another owner, call Assign directly or unassign first and then assign. Both approaches are supported. |
Code examples
These examples use lead-id = 1234. Replace YOUR_TOKEN with the business access token.
cURL
curl -X PUT "https://client-api.e-so.in/engage/v1/leads/1234/unassign" \
-H "Authorization: Bearer YOUR_TOKEN"
# Alternative header
curl -X PUT "https://client-api.e-so.in/engage/v1/leads/1234/unassign" \
-H "auth-key: YOUR_TOKEN"JavaScript — fetch
const leadId = 1234;
const response = await fetch(
`https://client-api.e-so.in/engage/v1/leads/${leadId}/unassign`,
{
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/1234/unassign"
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/{team-member-id}/{lead-id}/assign | Assign a lead to a specific team member. |
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.