Update variable
curl --request POST \
--url https://api.wotnot.io/v1/accounts/{account_id}/conversations/{conversation_id}/variables \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"variables": [
{
"name": "name",
"type": "conversation",
"value": "John Doe"
},
{
"name": "phone",
"type": "contact",
"value": "9999999999"
},
{
"name": "company",
"type": "conversation",
"value": "Example"
},
{
"name": "email",
"type": "contact",
"value": "john.doe@gmail.com"
}
]
}
'import requests
url = "https://api.wotnot.io/v1/accounts/{account_id}/conversations/{conversation_id}/variables"
payload = { "variables": [
{
"name": "name",
"type": "conversation",
"value": "John Doe"
},
{
"name": "phone",
"type": "contact",
"value": "9999999999"
},
{
"name": "company",
"type": "conversation",
"value": "Example"
},
{
"name": "email",
"type": "contact",
"value": "john.doe@gmail.com"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
variables: [
{name: 'name', type: 'conversation', value: 'John Doe'},
{name: 'phone', type: 'contact', value: '9999999999'},
{name: 'company', type: 'conversation', value: 'Example'},
{name: 'email', type: 'contact', value: 'john.doe@gmail.com'}
]
})
};
fetch('https://api.wotnot.io/v1/accounts/{account_id}/conversations/{conversation_id}/variables', 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.wotnot.io/v1/accounts/{account_id}/conversations/{conversation_id}/variables",
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([
'variables' => [
[
'name' => 'name',
'type' => 'conversation',
'value' => 'John Doe'
],
[
'name' => 'phone',
'type' => 'contact',
'value' => '9999999999'
],
[
'name' => 'company',
'type' => 'conversation',
'value' => 'Example'
],
[
'name' => 'email',
'type' => 'contact',
'value' => 'john.doe@gmail.com'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.wotnot.io/v1/accounts/{account_id}/conversations/{conversation_id}/variables"
payload := strings.NewReader("{\n \"variables\": [\n {\n \"name\": \"name\",\n \"type\": \"conversation\",\n \"value\": \"John Doe\"\n },\n {\n \"name\": \"phone\",\n \"type\": \"contact\",\n \"value\": \"9999999999\"\n },\n {\n \"name\": \"company\",\n \"type\": \"conversation\",\n \"value\": \"Example\"\n },\n {\n \"name\": \"email\",\n \"type\": \"contact\",\n \"value\": \"john.doe@gmail.com\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.wotnot.io/v1/accounts/{account_id}/conversations/{conversation_id}/variables")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"variables\": [\n {\n \"name\": \"name\",\n \"type\": \"conversation\",\n \"value\": \"John Doe\"\n },\n {\n \"name\": \"phone\",\n \"type\": \"contact\",\n \"value\": \"9999999999\"\n },\n {\n \"name\": \"company\",\n \"type\": \"conversation\",\n \"value\": \"Example\"\n },\n {\n \"name\": \"email\",\n \"type\": \"contact\",\n \"value\": \"john.doe@gmail.com\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wotnot.io/v1/accounts/{account_id}/conversations/{conversation_id}/variables")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"variables\": [\n {\n \"name\": \"name\",\n \"type\": \"conversation\",\n \"value\": \"John Doe\"\n },\n {\n \"name\": \"phone\",\n \"type\": \"contact\",\n \"value\": \"9999999999\"\n },\n {\n \"name\": \"company\",\n \"type\": \"conversation\",\n \"value\": \"Example\"\n },\n {\n \"name\": \"email\",\n \"type\": \"contact\",\n \"value\": \"john.doe@gmail.com\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"ok": true
}{
"ok": false,
"message": {
"variables": [
"Shorter than minimum length 1."
]
},
"status": 400,
"error": "BAD_REQUEST"
}{
"error": "UNAUTHORIZED",
"ok": false,
"status": 401,
"message": "Invalid token. Provide the valid account token."
}{
"message": "Conversation is not found",
"ok": false,
"error": "CONVERSATION_NOT_FOUND",
"code": "CONVERSATION_NOT_FOUND",
"status": 404
}Update variable
Updates the variables in a conversation, such as the contact’s phone or email, or conversation details like company.
POST
/
v1
/
accounts
/
{account_id}
/
conversations
/
{conversation_id}
/
variables
Update variable
curl --request POST \
--url https://api.wotnot.io/v1/accounts/{account_id}/conversations/{conversation_id}/variables \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"variables": [
{
"name": "name",
"type": "conversation",
"value": "John Doe"
},
{
"name": "phone",
"type": "contact",
"value": "9999999999"
},
{
"name": "company",
"type": "conversation",
"value": "Example"
},
{
"name": "email",
"type": "contact",
"value": "john.doe@gmail.com"
}
]
}
'import requests
url = "https://api.wotnot.io/v1/accounts/{account_id}/conversations/{conversation_id}/variables"
payload = { "variables": [
{
"name": "name",
"type": "conversation",
"value": "John Doe"
},
{
"name": "phone",
"type": "contact",
"value": "9999999999"
},
{
"name": "company",
"type": "conversation",
"value": "Example"
},
{
"name": "email",
"type": "contact",
"value": "john.doe@gmail.com"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
variables: [
{name: 'name', type: 'conversation', value: 'John Doe'},
{name: 'phone', type: 'contact', value: '9999999999'},
{name: 'company', type: 'conversation', value: 'Example'},
{name: 'email', type: 'contact', value: 'john.doe@gmail.com'}
]
})
};
fetch('https://api.wotnot.io/v1/accounts/{account_id}/conversations/{conversation_id}/variables', 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.wotnot.io/v1/accounts/{account_id}/conversations/{conversation_id}/variables",
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([
'variables' => [
[
'name' => 'name',
'type' => 'conversation',
'value' => 'John Doe'
],
[
'name' => 'phone',
'type' => 'contact',
'value' => '9999999999'
],
[
'name' => 'company',
'type' => 'conversation',
'value' => 'Example'
],
[
'name' => 'email',
'type' => 'contact',
'value' => 'john.doe@gmail.com'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.wotnot.io/v1/accounts/{account_id}/conversations/{conversation_id}/variables"
payload := strings.NewReader("{\n \"variables\": [\n {\n \"name\": \"name\",\n \"type\": \"conversation\",\n \"value\": \"John Doe\"\n },\n {\n \"name\": \"phone\",\n \"type\": \"contact\",\n \"value\": \"9999999999\"\n },\n {\n \"name\": \"company\",\n \"type\": \"conversation\",\n \"value\": \"Example\"\n },\n {\n \"name\": \"email\",\n \"type\": \"contact\",\n \"value\": \"john.doe@gmail.com\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.wotnot.io/v1/accounts/{account_id}/conversations/{conversation_id}/variables")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"variables\": [\n {\n \"name\": \"name\",\n \"type\": \"conversation\",\n \"value\": \"John Doe\"\n },\n {\n \"name\": \"phone\",\n \"type\": \"contact\",\n \"value\": \"9999999999\"\n },\n {\n \"name\": \"company\",\n \"type\": \"conversation\",\n \"value\": \"Example\"\n },\n {\n \"name\": \"email\",\n \"type\": \"contact\",\n \"value\": \"john.doe@gmail.com\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wotnot.io/v1/accounts/{account_id}/conversations/{conversation_id}/variables")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"variables\": [\n {\n \"name\": \"name\",\n \"type\": \"conversation\",\n \"value\": \"John Doe\"\n },\n {\n \"name\": \"phone\",\n \"type\": \"contact\",\n \"value\": \"9999999999\"\n },\n {\n \"name\": \"company\",\n \"type\": \"conversation\",\n \"value\": \"Example\"\n },\n {\n \"name\": \"email\",\n \"type\": \"contact\",\n \"value\": \"john.doe@gmail.com\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"ok": true
}{
"ok": false,
"message": {
"variables": [
"Shorter than minimum length 1."
]
},
"status": 400,
"error": "BAD_REQUEST"
}{
"error": "UNAUTHORIZED",
"ok": false,
"status": 401,
"message": "Invalid token. Provide the valid account token."
}{
"message": "Conversation is not found",
"ok": false,
"error": "CONVERSATION_NOT_FOUND",
"code": "CONVERSATION_NOT_FOUND",
"status": 404
}Authorizations
Path Parameters
Body
application/json
The variables to update.
Last modified on October 22, 2026
Was this page helpful?