Skip to main content
PATCH
/
leads
/
{leadId}
cURL
curl --request PATCH \
  --url https://api.attent.app/v1/leads/{leadId} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "email": "newemail@example.com",
  "timeZone": "America/Los_Angeles",
  "additionalInfo": {
    "newField": "newValue",
    "existingField": "updatedValue",
    "fieldToRemove": null
  },
  "followUpConfig": {
    "1": {
      "hours": 24,
      "channel": "text"
    },
    "2": {
      "hours": 72,
      "channel": "email"
    },
    "3": {
      "hours": 168,
      "channel": "call",
      "voicemailEnabled": true
    }
  },
  "followUpStep": 1
}'
{
  "message": "Lead updated successfully."
}

Usage Notes

Updating additionalInfo

The additionalInfo field uses merge/upsert behavior:
  • New keys are added to the existing additionalInfo
  • Existing keys are updated with new values
  • To delete a key, set its value to null
{
  "additionalInfo": {
    "newKey": "newValue", // Adds new key
    "existingKey": "updated", // Updates existing key
    "oldKey": null // Removes this key
  }
}

Follow-up Configuration

The followUpConfig defines the follow-up schedule. Each step must include both hours and channel:
{
  "followUpConfig": {
    "1": { "hours": 24, "channel": "text" },
    "2": { "hours": 72, "channel": "email" },
    "3": { "hours": 168, "channel": "call", "voicemailEnabled": true }
  }
}
Allowed channels: text, call, email Optional properties:
  • voicemailEnabled (boolean): Only valid for call channel. If true, leaves a voicemail when call is not answered.
Channel requirements: - text: Always available (SMS) - call: Requires voice to be enabled on the customer profile - email: Requires email to be enabled on both the customer profile and organization
To stop all follow-ups for a lead, set followUpConfig to an empty object {} . This will cancel any scheduled follow-ups and set the lead to STOPPED state.

Follow-up Scheduling Behavior

When updating followUpStep and/or followUpConfig, the timer always resets to now + hours:
  1. Update followUpStep only: Schedules that specific step
  2. Update followUpConfig only: Reschedules with new timing, preserving the current step
  3. Update both: Full reset with the new config starting at the specified step

Special followUpStep Values

  • Positive integers (1, 2, 3, …): Schedule that specific follow-up step
  • -1 (STOPPED): Stops all follow-ups for this lead
  • -2 (LONG_TERM): Moves lead to long-term nurture mode

Authorizations

x-api-key
string
header
required

Path Parameters

leadId
string
required

The ID of the lead to update

Body

application/json

Fields to update on the lead. All fields are optional.

email
string

The email address of the lead. Must be a valid email format.

timeZone
string

The timezone of the lead in tz database format (e.g. America/New_York).

additionalInfo
object | null

Key-value object to merge with existing additionalInfo. Set a value to null to remove that key.

followUpConfig
object

Follow-up schedule configuration. Keys are step numbers (1, 2, 3, etc.), values are objects with hours and channel.

followUpStep
integer

The follow-up step to schedule. Use positive integers (1, 2, 3, ...) for specific steps, -1 for STOPPED, or -2 for LONG_TERM.

Response

Lead updated successfully.

message
string

Returns "Lead updated successfully." when the update completes.