Documentation

Unassign Lead

Last updated on August 20, 2026

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
PropertyValue
MethodPUT
Base path/engage/v1/leads
Full URLhttps://client-api.e-so.in/engage/v1/leads/{lead-id}/unassign
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 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

ParameterTypeRequiredDescription
lead-idintegerYesID 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

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 lead is identified in the URL.

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

Responses

Success — 201 Created

The lead was successfully unassigned.

{
  "status": 201,
  "success": true,
  "message": "Operation Successful."
}
FieldTypeDescription
statusnumberHTTP status code, 201.
successbooleantrue when the operation 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 defaultThe lead-id is not numeric.Use an integer ID in the form /{lead-id}/unassign.
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 unassignmentUnassigning an already unassigned lead still returns 201 and is safe to retry.
Clears any ownerThe endpoint removes the current owner without requiring the current team member's ID.
Side effectsThe endpoint only clears the lead owner. It does not add or remove tags, trigger automations, or modify the lead journey.
VisibilityAfter 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 AssignTo 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}")
MethodPathPurpose
PUT/engage/v1/leads/{team-member-id}/{lead-id}/assignAssign a lead to a specific team member.
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.