Skip to main content
Update Customer
curl --request PUT \
  --url https://api.agents.timepay.ai/api/v1/customers/update \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "campaignId": "<string>",
  "loan_id": "<string>",
  "lead_id": "<string>",
  "data": {
    "payment_status": "<string>",
    "first_name": "<string>",
    "phone_number": "<string>"
  }
}
'
{
  "success": true,
  "message": "Customer data updated successfully",
  "data": {
    "id": "loan_12345",
    "result": "updated"
  }
}

Headers

Authorization
string
required
Bearer token for authentication (e.g., Bearer <your_token>).

Body Parameters

campaignId
string
required
The unique identifier of the campaign (e.g., camp_abc123).
loan_id
string
The Loan ID identifying the record. Required if lead_id is not provided.
lead_id
string
The Lead ID identifying the record. Required if loan_id is not provided.
data
object
required
An object containing the key-value pairs of the fields to update.

Response

success
boolean
Indicates if the update was successful.
message
string
A confirmation message.
data
object
error
string
The error type or code (Error responses only).
{
  "success": true,
  "message": "Customer data updated successfully",
  "data": {
    "id": "loan_12345",
    "result": "updated"
  }
}