Documentation

Update Lead API: Modify Details, Tags, and Contact Info

Last updated on May 7, 2026

Update Lead Details and Tags   

PUT /leads/:contact-number/update API Documentation   

Purpose 

Update an existing lead’s details, tags, or contact information using their contact number. This endpoint allows for partial updates, including adding/removing tags, updating lead data, and changing the contact number or country code.

 

Authentication 

Required:

  • Bearer Token in the Authorization header

Header Format Examples:

Authorization: Bearer <access_token>;

Error States:

  • 401 Unauthorized: Missing, expired, or invalid token.

Error Response Example:

{
  "status": 401,
  "message": "UnAuthorized Access-Token!",
  "success": false
}

Note: Only one of the headers is required. If both are present, Authorization is preferred.

 

Request Specifications 

Headers:

HeaderRequiredExample ValueDescription
AuthorizationYesBearer eyJhbGci...Bearer token for authentication
Content-TypeYesapplication/jsonRequest body media type
AcceptNoapplication/jsonExpected response media type

Supported Media Types:

  • application/json (request and response)

Path Parameters:

NameTypeConstraintsRequiredDescription
contact-numbernumberInteger, requiredYesLead’s contact number

 

Request Body 

Schema Definition:

{
  "add_tags": [1, 2],
  "remove_tags": [3],
  "lead_data": { "name": "John Doe", "email": "john@example.com" },
  "new_contact_number": 9876543210,
  "new_country_code": 91
}

Validation Rules:

FieldTypeConstraints / RulesRequiredNotes
add_tagsnumber[]Each must be a numberNoTags to add
remove_tagsnumber[]Each must be a numberNoTags to remove
lead_dataobjectAny key-value pairsNoLead fields to update
new_contact_numbernumberRequired if lead_data is not presentNoNew contact number for the lead
new_country_codenumberRequired if new_contact_number is presentNoNew country code for the lead

Example Request Body:

{
  "add_tags": [101, 102],
  "remove_tags": [103],
  "lead_data": {
    "name": "Jane Smith",
    "email": "jane.smith@example.com",
    "dob": "1990-01-01"
  },
  "new_contact_number": 9988776655,
  "new_country_code": 91
}

 

Response Handling 

Success Response:

  • Status: 201 Created
{
  "status": 201,
  "message": "Successfully updated lead.",
  "success": true
}
FieldTypeDescription
statusnumberHTTP status code (201)
messagestringSuccess message
successbooleanOperation status

Error Responses:

HTTP StatusError Code / MessageDescription / Troubleshooting
401"UnAuthorized Access-Token!"Invalid/missing token. Check credentials.
404"Invalid contact number!"Lead not found. Verify contact-number.
400Validation error messagesInvalid request body. Check field types.

 

Advanced Details 

  • Idempotency: Multiple identical update requests will result in the same lead state.
  • Partial Updates: Only provided fields are updated; others remain unchanged.
  • Tag Operations: add_tags and remove_tags can be used independently or together.