curl --request POST \
--url https://my.cloudtalk.io/api/contacts/edit/{contactId}.json \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"title": "<string>",
"company": "<string>",
"industry": "<string>",
"website": "<string>",
"address": "<string>",
"city": "<string>",
"zip": "<string>",
"state": "<string>",
"country_id": 123,
"favorite_agent": 123,
"ExternalUrl": [
{
"name": "<string>",
"url": "<string>"
}
],
"ContactNumber": [
{
"public_number": "<string>"
}
],
"ContactEmail": [
{
"email": "jsmith@example.com"
}
],
"ContactsTag": [
{
"name": "<string>"
}
],
"ContactAttribute": [
{
"attribute_id": 123,
"value": "<string>"
}
]
}
'import requests
url = "https://my.cloudtalk.io/api/contacts/edit/{contactId}.json"
payload = {
"name": "<string>",
"title": "<string>",
"company": "<string>",
"industry": "<string>",
"website": "<string>",
"address": "<string>",
"city": "<string>",
"zip": "<string>",
"state": "<string>",
"country_id": 123,
"favorite_agent": 123,
"ExternalUrl": [
{
"name": "<string>",
"url": "<string>"
}
],
"ContactNumber": [{ "public_number": "<string>" }],
"ContactEmail": [{ "email": "jsmith@example.com" }],
"ContactsTag": [{ "name": "<string>" }],
"ContactAttribute": [
{
"attribute_id": 123,
"value": "<string>"
}
]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
title: '<string>',
company: '<string>',
industry: '<string>',
website: '<string>',
address: '<string>',
city: '<string>',
zip: '<string>',
state: '<string>',
country_id: 123,
favorite_agent: 123,
ExternalUrl: [{name: '<string>', url: '<string>'}],
ContactNumber: [{public_number: '<string>'}],
ContactEmail: [{email: 'jsmith@example.com'}],
ContactsTag: [{name: '<string>'}],
ContactAttribute: [{attribute_id: 123, value: '<string>'}]
})
};
fetch('https://my.cloudtalk.io/api/contacts/edit/{contactId}.json', 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://my.cloudtalk.io/api/contacts/edit/{contactId}.json",
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>',
'title' => '<string>',
'company' => '<string>',
'industry' => '<string>',
'website' => '<string>',
'address' => '<string>',
'city' => '<string>',
'zip' => '<string>',
'state' => '<string>',
'country_id' => 123,
'favorite_agent' => 123,
'ExternalUrl' => [
[
'name' => '<string>',
'url' => '<string>'
]
],
'ContactNumber' => [
[
'public_number' => '<string>'
]
],
'ContactEmail' => [
[
'email' => 'jsmith@example.com'
]
],
'ContactsTag' => [
[
'name' => '<string>'
]
],
'ContactAttribute' => [
[
'attribute_id' => 123,
'value' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://my.cloudtalk.io/api/contacts/edit/{contactId}.json"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"company\": \"<string>\",\n \"industry\": \"<string>\",\n \"website\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"zip\": \"<string>\",\n \"state\": \"<string>\",\n \"country_id\": 123,\n \"favorite_agent\": 123,\n \"ExternalUrl\": [\n {\n \"name\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"ContactNumber\": [\n {\n \"public_number\": \"<string>\"\n }\n ],\n \"ContactEmail\": [\n {\n \"email\": \"jsmith@example.com\"\n }\n ],\n \"ContactsTag\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"ContactAttribute\": [\n {\n \"attribute_id\": 123,\n \"value\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://my.cloudtalk.io/api/contacts/edit/{contactId}.json")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"company\": \"<string>\",\n \"industry\": \"<string>\",\n \"website\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"zip\": \"<string>\",\n \"state\": \"<string>\",\n \"country_id\": 123,\n \"favorite_agent\": 123,\n \"ExternalUrl\": [\n {\n \"name\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"ContactNumber\": [\n {\n \"public_number\": \"<string>\"\n }\n ],\n \"ContactEmail\": [\n {\n \"email\": \"jsmith@example.com\"\n }\n ],\n \"ContactsTag\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"ContactAttribute\": [\n {\n \"attribute_id\": 123,\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://my.cloudtalk.io/api/contacts/edit/{contactId}.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"company\": \"<string>\",\n \"industry\": \"<string>\",\n \"website\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"zip\": \"<string>\",\n \"state\": \"<string>\",\n \"country_id\": 123,\n \"favorite_agent\": 123,\n \"ExternalUrl\": [\n {\n \"name\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"ContactNumber\": [\n {\n \"public_number\": \"<string>\"\n }\n ],\n \"ContactEmail\": [\n {\n \"email\": \"jsmith@example.com\"\n }\n ],\n \"ContactsTag\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"ContactAttribute\": [\n {\n \"attribute_id\": 123,\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"responseData": {
"status": 200
}
}{
"responseData": {
"status": 404,
"message": "Not found."
}
}{
"responseData": {
"status": 406,
"message": "Invalid input data.",
"data": {
"email": [
"Please supply a valid email address."
]
}
}
}{
"responseData": {
"status": 500,
"message": "Something went wrong."
}
}Edit contact
Only sent parameters/values will be updated. If you want to clear the value, just set empty string for that attribute. After sending empty string for properties of ContactNumber, ContactEmail, ContactsTag or ContactAttribute all data from these properties will be cleared. When you send values for properties of ContactNumber, ContactEmail, ContactsTag or ContactAttribute only these data will be updated, all other will be cleared.
curl --request POST \
--url https://my.cloudtalk.io/api/contacts/edit/{contactId}.json \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"title": "<string>",
"company": "<string>",
"industry": "<string>",
"website": "<string>",
"address": "<string>",
"city": "<string>",
"zip": "<string>",
"state": "<string>",
"country_id": 123,
"favorite_agent": 123,
"ExternalUrl": [
{
"name": "<string>",
"url": "<string>"
}
],
"ContactNumber": [
{
"public_number": "<string>"
}
],
"ContactEmail": [
{
"email": "jsmith@example.com"
}
],
"ContactsTag": [
{
"name": "<string>"
}
],
"ContactAttribute": [
{
"attribute_id": 123,
"value": "<string>"
}
]
}
'import requests
url = "https://my.cloudtalk.io/api/contacts/edit/{contactId}.json"
payload = {
"name": "<string>",
"title": "<string>",
"company": "<string>",
"industry": "<string>",
"website": "<string>",
"address": "<string>",
"city": "<string>",
"zip": "<string>",
"state": "<string>",
"country_id": 123,
"favorite_agent": 123,
"ExternalUrl": [
{
"name": "<string>",
"url": "<string>"
}
],
"ContactNumber": [{ "public_number": "<string>" }],
"ContactEmail": [{ "email": "jsmith@example.com" }],
"ContactsTag": [{ "name": "<string>" }],
"ContactAttribute": [
{
"attribute_id": 123,
"value": "<string>"
}
]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
title: '<string>',
company: '<string>',
industry: '<string>',
website: '<string>',
address: '<string>',
city: '<string>',
zip: '<string>',
state: '<string>',
country_id: 123,
favorite_agent: 123,
ExternalUrl: [{name: '<string>', url: '<string>'}],
ContactNumber: [{public_number: '<string>'}],
ContactEmail: [{email: 'jsmith@example.com'}],
ContactsTag: [{name: '<string>'}],
ContactAttribute: [{attribute_id: 123, value: '<string>'}]
})
};
fetch('https://my.cloudtalk.io/api/contacts/edit/{contactId}.json', 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://my.cloudtalk.io/api/contacts/edit/{contactId}.json",
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>',
'title' => '<string>',
'company' => '<string>',
'industry' => '<string>',
'website' => '<string>',
'address' => '<string>',
'city' => '<string>',
'zip' => '<string>',
'state' => '<string>',
'country_id' => 123,
'favorite_agent' => 123,
'ExternalUrl' => [
[
'name' => '<string>',
'url' => '<string>'
]
],
'ContactNumber' => [
[
'public_number' => '<string>'
]
],
'ContactEmail' => [
[
'email' => 'jsmith@example.com'
]
],
'ContactsTag' => [
[
'name' => '<string>'
]
],
'ContactAttribute' => [
[
'attribute_id' => 123,
'value' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://my.cloudtalk.io/api/contacts/edit/{contactId}.json"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"company\": \"<string>\",\n \"industry\": \"<string>\",\n \"website\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"zip\": \"<string>\",\n \"state\": \"<string>\",\n \"country_id\": 123,\n \"favorite_agent\": 123,\n \"ExternalUrl\": [\n {\n \"name\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"ContactNumber\": [\n {\n \"public_number\": \"<string>\"\n }\n ],\n \"ContactEmail\": [\n {\n \"email\": \"jsmith@example.com\"\n }\n ],\n \"ContactsTag\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"ContactAttribute\": [\n {\n \"attribute_id\": 123,\n \"value\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://my.cloudtalk.io/api/contacts/edit/{contactId}.json")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"company\": \"<string>\",\n \"industry\": \"<string>\",\n \"website\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"zip\": \"<string>\",\n \"state\": \"<string>\",\n \"country_id\": 123,\n \"favorite_agent\": 123,\n \"ExternalUrl\": [\n {\n \"name\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"ContactNumber\": [\n {\n \"public_number\": \"<string>\"\n }\n ],\n \"ContactEmail\": [\n {\n \"email\": \"jsmith@example.com\"\n }\n ],\n \"ContactsTag\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"ContactAttribute\": [\n {\n \"attribute_id\": 123,\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://my.cloudtalk.io/api/contacts/edit/{contactId}.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"company\": \"<string>\",\n \"industry\": \"<string>\",\n \"website\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"zip\": \"<string>\",\n \"state\": \"<string>\",\n \"country_id\": 123,\n \"favorite_agent\": 123,\n \"ExternalUrl\": [\n {\n \"name\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"ContactNumber\": [\n {\n \"public_number\": \"<string>\"\n }\n ],\n \"ContactEmail\": [\n {\n \"email\": \"jsmith@example.com\"\n }\n ],\n \"ContactsTag\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"ContactAttribute\": [\n {\n \"attribute_id\": 123,\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"responseData": {
"status": 200
}
}{
"responseData": {
"status": 404,
"message": "Not found."
}
}{
"responseData": {
"status": 406,
"message": "Invalid input data.",
"data": {
"email": [
"Please supply a valid email address."
]
}
}
}{
"responseData": {
"status": 500,
"message": "Something went wrong."
}
}Authorizations
HTTP Basic Authentication. Use your API Access Key ID as the username and your API Access Key Secret as the password. Generate keys in the CloudTalk Dashboard under Account -> Settings -> API Keys (https://dashboard.cloudtalk.io/menu/account/settings/API-keys).
Path Parameters
Contact ID to edit
Body
Name
150Title
255Company name
100Industry
100Website
100Address
255City
255ZIP code
15State
255Country ID
Favorite agent ID
List of all URLs which points to a detail page of a contact in an external service, e.g. CRMs, Helpdesk or any other custom service you use. You may list up to 3 URLs.
3Show child attributes
Show child attributes
Numbers assigned to contact
Show child attributes
Show child attributes
Emails assigned to contact
Show child attributes
Show child attributes
Tags for contact - can include multiple
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
No error
Show child attributes
Show child attributes