POST
/
v1
/
api
/
conversations
/
{conversationId}
/
customer
/
edit
curl --request POST \
  --url https://api.trillet.ai/v1/api/conversations/{conversationId}/customer/edit \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-workspace-id: <x-workspace-id>' \
  --data '{
  "name": "<string>",
  "phone": "<string>",
  "email": "<string>"
}'
{
    "status": "success",
    "conversationId": "123e3a141eccd665d3ba8abc",
    "updatedCustomerDetails": {
        "name": "Alice",
        "email": "alice@example.com",
        "phone": "+1234567890",
        "_id": "123c8e368824aa5f130b9xyz",
        "createdAt": "2025-01-01T12:00:00.000Z",
        "updatedAt": "2025-01-02T18:00:00.000Z"
    }
}

Headers

x-api-key
string
required

API key used for authenticating requests to the API.

x-workspace-id
string
required

Workspace identifier for the API.

Path Parameters

conversationId
string
required

The unique identifier for the conversation whose customer details need to be edited.

Request Body

name
string

The new name of the customer. Provide this field only if you wish to update the name.

phone
string

The new phone number of the customer in E.164 format (e.g., +1234567890). Provide this field only if you wish to update the phone number.

Make sure it is in E.164 format if you wish to change it.

email
string

The new email address of the customer. Provide this field only if you wish to update the email.

Response Fields

status
string

Indicates the status of the request. For successful requests, the value is “success”.

conversationId
string

The unique identifier for the conversation where customer details were updated.

updatedCustomerDetails
object

An object containing the updated customer details.

{
    "status": "success",
    "conversationId": "123e3a141eccd665d3ba8abc",
    "updatedCustomerDetails": {
        "name": "Alice",
        "email": "alice@example.com",
        "phone": "+1234567890",
        "_id": "123c8e368824aa5f130b9xyz",
        "createdAt": "2025-01-01T12:00:00.000Z",
        "updatedAt": "2025-01-02T18:00:00.000Z"
    }
}