Skip to main content
curl --request PUT \
  --url https://api.agents.timepay.ai/api/v1/customer-data \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "campaignId": "camp_abc123",
  "loan_id": "loan_12345",
  "data": {
    "payment_status": "paid",
    "emi_amount": 5000,
    "last_contacted": "2025-01-02"
  }
}'

{
  "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).
curl --request PUT \
  --url https://api.agents.timepay.ai/api/v1/customer-data \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "campaignId": "camp_abc123",
  "loan_id": "loan_12345",
  "data": {
    "payment_status": "paid",
    "emi_amount": 5000,
    "last_contacted": "2025-01-02"
  }
}'

{
  "success": true,
  "message": "Customer data updated successfully",
  "data": {
    "id": "loan_12345",
    "result": "updated"
  }
}