DialerBee APIv1 · 1.0.0-rc6

Leads

Update a lead's name, email or custom fields

PATCH /v1/leads/{lead_id}

Scope
leads:write
Tier
Tier 1
Data
Personal data
Idempotency
Idempotency-Key: optional

Only full_name, email and custom_fields can change. The phone number can never change: import the new number as a new lead. In custom_fields, a key set to null is removed and keys you do not send are kept. Send If-Match with the lead's ETag to refuse the update (412) when someone changed the lead since you read it.

Parameters

NameInTypeRequiredDescription
lead_idpathstring (LeadId)yes
Idempotency-KeyheaderstringnoOptional here. When sent, it behaves exactly as on the operations that require it. (min length 1; max length 255)
If-MatchheaderstringnoThe ETag from your last read. The request is refused with 412 if the resource changed since. (max length 128)
X-Correlation-IDheaderstringnoYour own trace value, logged with the request. Metadata only, never identity. (min length 1; max length 128)

Request body

The fields to change.

JSON: LeadUpdateRequest

Response

200: The updated lead.

HeaderMeaning
X-Request-IDThe DialerBee request id. Quote it to support. Every response carries X-Request-ID: req_<ULID>, or edge_<32 hex> when the edge answered before the request reached the API.
Cache-ControlAlways no-store.
Idempotency-Replayedtrue when this answer is the stored answer of an earlier request with the same Idempotency-Key.
ETagThe resource version. Send it back as If-Match.

Examples

Request example

curl

curl -sS -X PATCH \
  "https://app.dialerbee.com/api/v1/leads/lead_0f8fad5b-d9cb-469f-a165-70867728950e" \
  -H "Authorization: Bearer $DIALERBEE_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "email": "[email protected]",
  "custom_fields": {
    "tier": "platinum"
  }
}'

Python (SDK)

from dialerbee import DialerBee

db = DialerBee()  # reads DIALERBEE_API_KEY from the environment

result = db.leads.update(
    "lead_0f8fad5b-d9cb-469f-a165-70867728950e",
    email="[email protected]",
    custom_fields={"tier": "platinum"},
)

Response example

200

{
  "id": "lead_0f8fad5b-d9cb-469f-a165-70867728950e",
  "campaign_id": "cmp_0f8fad5b-d9cb-469f-a165-70867728950e",
  "external_id": "CRM-1001",
  "phone": "+12125550101",
  "full_name": "Ann Lee",
  "email": "[email protected]",
  "status": "contacted",
  "attempts": 1,
  "custom_fields": {
    "tier": "platinum"
  },
  "last_attempt_at": "2026-09-29T11:58:00Z",
  "next_attempt_at": "2026-09-30T10:00:00Z",
  "disposition_code": "interested",
  "hangup_cause": "NORMAL_CLEARING",
  "created_at": "2026-09-29T09:15:00Z",
  "updated_at": "2026-09-29T09:20:00Z"
}

Error examples

403 insufficient_scope

{
  "type": "https://docs.dialerbee.com/errors/insufficient-scope",
  "title": "Not permitted",
  "status": 403,
  "detail": "The API client does not hold the scope this operation requires.",
  "instance": "urn:dialerbee:request:req_01K6BZ3M9X4T7Q2V8N5R6P1W0C",
  "code": "insufficient_scope",
  "request_id": "req_01K6BZ3M9X4T7Q2V8N5R6P1W0C"
}

400 validation_failed

{
  "type": "https://docs.dialerbee.com/errors/validation-failed",
  "title": "Invalid request",
  "status": 400,
  "detail": "The request is not valid.",
  "instance": "urn:dialerbee:request:req_01K6BZ3M9X4T7Q2V8N5R6P1W0C",
  "code": "validation_failed",
  "request_id": "req_01K6BZ3M9X4T7Q2V8N5R6P1W0C",
  "errors": [
    {
      "pointer": "/leads/1/phone",
      "code": "missing"
    }
  ]
}

401 invalid_api_key

{
  "type": "https://docs.dialerbee.com/errors/invalid-api-key",
  "title": "Invalid API key",
  "status": 401,
  "detail": "The Authorization header is missing, is not Bearer dbk_live_..., or the key is not recognised, has expired or was revoked (one answer for every key problem, so a key's state is never revealed).",
  "instance": "urn:dialerbee:request:req_01K6BZ3M9X4T7Q2V8N5R6P1W0C",
  "code": "invalid_api_key",
  "request_id": "req_01K6BZ3M9X4T7Q2V8N5R6P1W0C"
}

Errors

StatusCodeTitle
401invalid_api_keyInvalid API key
403api_access_disabledAPI access disabled
403ip_not_allowedIP address not allowed
403insufficient_scopeNot permitted
400credential_in_urlCredential in URL
400credential_in_bodyCredential in body
400, 422validation_failedInvalid request
413payload_too_largePayload too large
415unsupported_media_typeUnsupported media type
404not_foundNot found
409conflictRequest in progress
409idempotency_conflictIdempotency key reused
409outcome_unknownOutcome unknown
412precondition_failedPrecondition failed
429rate_limit_exceededToo many requests
503temporarily_unavailableTemporarily unavailable
503upstream_unavailableTemporarily unavailable
502upstream_invalid_responseUpstream error
500internal_errorInternal error

Objects

LeadUpdateRequest

FieldTypeRequiredDescription
full_namestring or nullno (max length 200)
emailstring or nullno (max length 254)
custom_fieldsobjectno (max keys 20)

Lead

FieldTypeRequiredDescription
idstring (LeadId)yesA lead (a contact of a campaign). lead_ + a lower-case UUID.
campaign_idstring (CampaignId) or nullyes
external_idstring or nullyesYour id for this lead, if this API client set one.
phonestringyes
full_namestring or nullyes
emailstring or nullyes
statusstringyes
attemptsintegeryes
custom_fieldsobject or nullyes
last_attempt_atstring (date-time) or nullyes
next_attempt_atstring (date-time) or nullyes
disposition_codestring or nullyesThe agent's outcome of the last attempt, if any.
hangup_causestring or nullyesThe carrier's outcome of the last attempt, if any.
created_atstring (date-time)yes
updated_atstring (date-time)yes