Empfio Docs

Leads API

Create, read, update, and manage leads in Empfio.

All endpoints require a valid Bearer token. See Authentication.

Lead schema

FieldTypeDescription
idUUIDUnique lead identifier
namestringCustomer name
phonestringPhone number
emailstringEmail address
companystringCompany name (optional)
channelstringSource channel: whatsapp, telegram, web, email, voice
channel_idstringChannel-specific identifier (phone number, telegram user ID, etc.)
statusstringLead status (see below)
preferred_servicesstring[]Services the customer is interested in
appointment_notesstringNotes about the appointment request
metadataobjectAdditional data (notes, tags, custom fields)
created_atdatetimeWhen the lead was created
updated_atdatetimeWhen the lead was last updated

Lead statuses

StatusMeaning
newJust captured, not yet contacted
contactedAgent has collected some contact info
booking_offeredAvailable slots have been presented
bookedAppointment confirmed
confirmedBooking double-confirmed
completedAppointment took place
no_showCustomer didn't show up
cancelledAppointment cancelled
lostLead is no longer active

List leads

GET /api/v1/leads

Query parameters:

ParameterTypeDefaultDescription
pageinteger1Page number
sizeinteger20Results per page (max: 100)
statusstringFilter by status
channelstringFilter by channel
searchstringSearch by name, email, company, or phone

Response:

{
  "leads": [
    {
      "id": "550e8400-...",
      "name": "Jane Smith",
      "phone": "+49123456789",
      "email": "jane@example.com",
      "company": null,
      "channel": "whatsapp",
      "status": "booked",
      "created_at": "2026-03-01T10:00:00Z"
    }
  ],
  "total": 42,
  "page": 1,
  "size": 20
}

Get a lead

GET /api/v1/leads/{lead_id}

Returns the full lead record including all fields, metadata, and timestamps.

Create a lead

POST /api/v1/leads
Content-Type: application/json

{
  "name": "Jane Smith",
  "email": "jane@example.com",
  "phone": "+49123456789",
  "channel": "web",
  "channel_id": "manual-abc123"
}

Response (201 Created): Full lead object.

Use this to manually create leads for phone or walk-in inquiries.

Update a lead

PATCH /api/v1/leads/{lead_id}
Content-Type: application/json

{
  "status": "contacted",
  "name": "Jane Smith-Updated",
  "appointment_notes": "Interested in premium package"
}

All fields are optional — only include the fields you want to change.

Updatable fieldType
namestring
phonestring
emailstring
companystring
statusstring
preferred_servicesstring[]
appointment_notesstring
metadataobject

Delete a lead

DELETE /api/v1/leads/{lead_id}

Soft-deletes the lead by setting its status to lost. Returns 204 No Content.

Add a note

POST /api/v1/leads/{lead_id}/notes
Content-Type: application/json

{
  "content": "Called back, interested in the premium package"
}

Response (201 Created):

{
  "notes": [
    {
      "content": "Called back, interested in the premium package",
      "author": "you@example.com",
      "created_at": "2026-03-07T14:30:00Z"
    }
  ]
}

Notes are stored in the lead's metadata and attributed to the authenticated user.

On this page