Edit Customer Details
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>"
}
'import requests
url = "https://api.trillet.ai/v1/api/conversations/{conversationId}/customer/edit"
payload = {
"name": "<string>",
"phone": "<string>",
"email": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"x-workspace-id": "<x-workspace-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-workspace-id': '<x-workspace-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', phone: '<string>', email: '<string>'})
};
fetch('https://api.trillet.ai/v1/api/conversations/{conversationId}/customer/edit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.trillet.ai/v1/api/conversations/{conversationId}/customer/edit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'phone' => '<string>',
'email' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.trillet.ai/v1/api/conversations/{conversationId}/customer/edit"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.trillet.ai/v1/api/conversations/{conversationId}/customer/edit")
.header("x-api-key", "<api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trillet.ai/v1/api/conversations/{conversationId}/customer/edit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"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"
}
}
Conversations
Edit Customer Details
Edit customers details in a specific conversation.
POST
/
v1
/
api
/
conversations
/
{conversationId}
/
customer
/
edit
Edit Customer Details
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>"
}
'import requests
url = "https://api.trillet.ai/v1/api/conversations/{conversationId}/customer/edit"
payload = {
"name": "<string>",
"phone": "<string>",
"email": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"x-workspace-id": "<x-workspace-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-workspace-id': '<x-workspace-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', phone: '<string>', email: '<string>'})
};
fetch('https://api.trillet.ai/v1/api/conversations/{conversationId}/customer/edit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.trillet.ai/v1/api/conversations/{conversationId}/customer/edit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'phone' => '<string>',
'email' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.trillet.ai/v1/api/conversations/{conversationId}/customer/edit"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.trillet.ai/v1/api/conversations/{conversationId}/customer/edit")
.header("x-api-key", "<api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trillet.ai/v1/api/conversations/{conversationId}/customer/edit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"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
string
required
API key used for authenticating requests to the API.
string
required
Workspace identifier for the API.
Path Parameters
string
required
The unique identifier for the conversation whose customer details need to be edited.
Request Body
string
The new name of the customer. Provide this field only if you wish to update the name.
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.
string
The new email address of the customer. Provide this field only if you wish to update the email.
Response Fields
string
Indicates the status of the request. For successful requests, the value is “success”.
string
The unique identifier for the conversation where customer details were updated.
object
An object containing the updated customer details.
Show Properties
Show Properties
string
The updated name of the customer.
string
The updated email address of the customer.
string
The updated phone number of the customer in E.164 format.
string
The unique identifier of the customer in the conversation.
string
The timestamp when the customer was created in the conversation.
string
The timestamp when the customer details were last updated.
{
"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"
}
}
⌘I
