Skip to main content
PUT
/
api
/
leads
/
{id}
Update Lead
curl --request PUT \
  --url https://app.famulor.de/api/leads/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "campaign_id": 123,
  "phone_number": "<string>",
  "status": "<string>",
  "variables": {}
}
'
{
  "message": "Lead successfully updated"
}
Update a lead by providing the lead ID and the fields you want to change. Only the fields included in the request will be updated.

Path Parameters

id
integer
required
The ID of the lead to be updated

Request Body

campaign_id
integer
The ID of the campaign to which the lead should be assigned
phone_number
string
The lead’s phone number (automatically formatted to E164)
status
string
The status of the lead. Must be one of the following values: created, completed, reached-max-retries
variables
object
Custom variables to be merged with the existing lead variables

Response Fields

message
string
Success message indicating the lead was updated

Notes

  • The lead must belong to the authenticated user
  • When updating the campaign, the new campaign must also belong to the authenticated user
  • Phone numbers are automatically formatted and validated
  • Variables are merged with existing variables (not replaced)
  • Only allowed fields can be updated: campaign_id, phone_number, status, variables
  • The status field has restricted values to maintain data integrity
{
  "campaign_id": 2,
  "phone_number": "+1234567890",
  "status": "completed",
  "variables": {
    "customer_name": "Jane Doe",
    "email": "jane.doe@example.com",
    "notes": "Successfully contacted"
  }
}
{
  "message": "Lead successfully updated"
}