curl --request POST \
--url https://my.cloudtalk.io/api/bulk/contacts.json \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
[
{
"action": "add_contact",
"command_id": "123",
"data": {
"name": "John Snow",
"title": "Ing.",
"company": "Night watch",
"industry": "it",
"website": "https://www.castleblack.com/",
"address": "Room 1",
"city": "New York",
"zip": "18104",
"state": "NY",
"country_id": 201,
"ContactNumber": [
{
"public_number": 421901123456
}
],
"ContactEmail": [
{
"email": "snow@example.com"
}
],
"ContactsTag": [
{
"name": "watch"
}
]
}
},
{
"action": "delete_contact",
"command_id": "1234",
"data": {
"id": 1234
}
},
{
"action": "edit_contact",
"command_id": "12345",
"data": {
"id": 123,
"name": "Daenerys Stormborn",
"title": "Ing.",
"company": "Targaryen inc.",
"industry": "it",
"website": "https://www.fireandblood.com/",
"address": "First st.",
"zip": "18104",
"state": "NY",
"country_id": 201,
"ContactNumber": [
{
"public_number": 421901123456
},
{
"public_number": 421908123456
}
],
"ContactEmail": [
{
"email": "danny@example.com"
},
{
"email": "targ@example.com"
}
],
"ContactsTag": [
{
"name": "fire"
},
{
"name": "dragons"
}
]
}
},
{
"action": "add_activity",
"command_id": "123456",
"data": {
"contact_id": 123,
"type": "order",
"name": "Burn the usurper",
"activity_date": "2020-08-22T09:53:47.000Z",
"description": "Defeat the forces at kings landing",
"activity_author": "Danny Stormborn",
"external_id": 123456,
"external_url": "https://fireandblood.io/order"
}
},
{
"action": "delete_activity",
"command_id": "1234567",
"data": {
"id": 12345
}
},
{
"action": "edit_activity",
"command_id": "12345678",
"data": {
"id": 123456,
"contact_id": 123456,
"type": "order",
"name": "Defend the Wall",
"activity_date": "2020-08-25T09:53:47.000Z",
"description": "Repel white walkers attack",
"activity_author": "Danny Stormborn",
"external_id": 1234567,
"external_url": "https://fireandblood.com/defend"
}
},
{
"action": "add_note",
"command_id": "123456789",
"data": {
"contact_id": 1234,
"note": "Dont feed the dragon",
"user_id": 12345678
}
},
{
"action": "delete_note",
"command_id": "1234567890",
"data": {
"id": 1234567890
}
},
{
"action": "edit_note",
"command_id": "1234567890A",
"data": {
"id": 123456789,
"note": "Seriously, dont",
"user_id": 1075,
"contact_id": 1234
}
}
]
'import requests
url = "https://my.cloudtalk.io/api/bulk/contacts.json"
payload = [
{
"action": "add_contact",
"command_id": "123",
"data": {
"name": "John Snow",
"title": "Ing.",
"company": "Night watch",
"industry": "it",
"website": "https://www.castleblack.com/",
"address": "Room 1",
"city": "New York",
"zip": "18104",
"state": "NY",
"country_id": 201,
"ContactNumber": [{ "public_number": 421901123456 }],
"ContactEmail": [{ "email": "snow@example.com" }],
"ContactsTag": [{ "name": "watch" }]
}
},
{
"action": "delete_contact",
"command_id": "1234",
"data": { "id": 1234 }
},
{
"action": "edit_contact",
"command_id": "12345",
"data": {
"id": 123,
"name": "Daenerys Stormborn",
"title": "Ing.",
"company": "Targaryen inc.",
"industry": "it",
"website": "https://www.fireandblood.com/",
"address": "First st.",
"zip": "18104",
"state": "NY",
"country_id": 201,
"ContactNumber": [{ "public_number": 421901123456 }, { "public_number": 421908123456 }],
"ContactEmail": [{ "email": "danny@example.com" }, { "email": "targ@example.com" }],
"ContactsTag": [{ "name": "fire" }, { "name": "dragons" }]
}
},
{
"action": "add_activity",
"command_id": "123456",
"data": {
"contact_id": 123,
"type": "order",
"name": "Burn the usurper",
"activity_date": "2020-08-22T09:53:47.000Z",
"description": "Defeat the forces at kings landing",
"activity_author": "Danny Stormborn",
"external_id": 123456,
"external_url": "https://fireandblood.io/order"
}
},
{
"action": "delete_activity",
"command_id": "1234567",
"data": { "id": 12345 }
},
{
"action": "edit_activity",
"command_id": "12345678",
"data": {
"id": 123456,
"contact_id": 123456,
"type": "order",
"name": "Defend the Wall",
"activity_date": "2020-08-25T09:53:47.000Z",
"description": "Repel white walkers attack",
"activity_author": "Danny Stormborn",
"external_id": 1234567,
"external_url": "https://fireandblood.com/defend"
}
},
{
"action": "add_note",
"command_id": "123456789",
"data": {
"contact_id": 1234,
"note": "Dont feed the dragon",
"user_id": 12345678
}
},
{
"action": "delete_note",
"command_id": "1234567890",
"data": { "id": 1234567890 }
},
{
"action": "edit_note",
"command_id": "1234567890A",
"data": {
"id": 123456789,
"note": "Seriously, dont",
"user_id": 1075,
"contact_id": 1234
}
}
]
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([
{
action: 'add_contact',
command_id: '123',
data: {
name: 'John Snow',
title: 'Ing.',
company: 'Night watch',
industry: 'it',
website: 'https://www.castleblack.com/',
address: 'Room 1',
city: 'New York',
zip: '18104',
state: 'NY',
country_id: 201,
ContactNumber: [{public_number: 421901123456}],
ContactEmail: [{email: 'snow@example.com'}],
ContactsTag: [{name: 'watch'}]
}
},
{action: 'delete_contact', command_id: '1234', data: {id: 1234}},
{
action: 'edit_contact',
command_id: '12345',
data: {
id: 123,
name: 'Daenerys Stormborn',
title: 'Ing.',
company: 'Targaryen inc.',
industry: 'it',
website: 'https://www.fireandblood.com/',
address: 'First st.',
zip: '18104',
state: 'NY',
country_id: 201,
ContactNumber: [{public_number: 421901123456}, {public_number: 421908123456}],
ContactEmail: [{email: 'danny@example.com'}, {email: 'targ@example.com'}],
ContactsTag: [{name: 'fire'}, {name: 'dragons'}]
}
},
{
action: 'add_activity',
command_id: '123456',
data: {
contact_id: 123,
type: 'order',
name: 'Burn the usurper',
activity_date: '2020-08-22T09:53:47.000Z',
description: 'Defeat the forces at kings landing',
activity_author: 'Danny Stormborn',
external_id: 123456,
external_url: 'https://fireandblood.io/order'
}
},
{action: 'delete_activity', command_id: '1234567', data: {id: 12345}},
{
action: 'edit_activity',
command_id: '12345678',
data: {
id: 123456,
contact_id: 123456,
type: 'order',
name: 'Defend the Wall',
activity_date: '2020-08-25T09:53:47.000Z',
description: 'Repel white walkers attack',
activity_author: 'Danny Stormborn',
external_id: 1234567,
external_url: 'https://fireandblood.com/defend'
}
},
{
action: 'add_note',
command_id: '123456789',
data: {contact_id: 1234, note: 'Dont feed the dragon', user_id: 12345678}
},
{action: 'delete_note', command_id: '1234567890', data: {id: 1234567890}},
{
action: 'edit_note',
command_id: '1234567890A',
data: {id: 123456789, note: 'Seriously, dont', user_id: 1075, contact_id: 1234}
}
])
};
fetch('https://my.cloudtalk.io/api/bulk/contacts.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/bulk/contacts.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([
[
'action' => 'add_contact',
'command_id' => '123',
'data' => [
'name' => 'John Snow',
'title' => 'Ing.',
'company' => 'Night watch',
'industry' => 'it',
'website' => 'https://www.castleblack.com/',
'address' => 'Room 1',
'city' => 'New York',
'zip' => '18104',
'state' => 'NY',
'country_id' => 201,
'ContactNumber' => [
[
'public_number' => 421901123456
]
],
'ContactEmail' => [
[
'email' => 'snow@example.com'
]
],
'ContactsTag' => [
[
'name' => 'watch'
]
]
]
],
[
'action' => 'delete_contact',
'command_id' => '1234',
'data' => [
'id' => 1234
]
],
[
'action' => 'edit_contact',
'command_id' => '12345',
'data' => [
'id' => 123,
'name' => 'Daenerys Stormborn',
'title' => 'Ing.',
'company' => 'Targaryen inc.',
'industry' => 'it',
'website' => 'https://www.fireandblood.com/',
'address' => 'First st.',
'zip' => '18104',
'state' => 'NY',
'country_id' => 201,
'ContactNumber' => [
[
'public_number' => 421901123456
],
[
'public_number' => 421908123456
]
],
'ContactEmail' => [
[
'email' => 'danny@example.com'
],
[
'email' => 'targ@example.com'
]
],
'ContactsTag' => [
[
'name' => 'fire'
],
[
'name' => 'dragons'
]
]
]
],
[
'action' => 'add_activity',
'command_id' => '123456',
'data' => [
'contact_id' => 123,
'type' => 'order',
'name' => 'Burn the usurper',
'activity_date' => '2020-08-22T09:53:47.000Z',
'description' => 'Defeat the forces at kings landing',
'activity_author' => 'Danny Stormborn',
'external_id' => 123456,
'external_url' => 'https://fireandblood.io/order'
]
],
[
'action' => 'delete_activity',
'command_id' => '1234567',
'data' => [
'id' => 12345
]
],
[
'action' => 'edit_activity',
'command_id' => '12345678',
'data' => [
'id' => 123456,
'contact_id' => 123456,
'type' => 'order',
'name' => 'Defend the Wall',
'activity_date' => '2020-08-25T09:53:47.000Z',
'description' => 'Repel white walkers attack',
'activity_author' => 'Danny Stormborn',
'external_id' => 1234567,
'external_url' => 'https://fireandblood.com/defend'
]
],
[
'action' => 'add_note',
'command_id' => '123456789',
'data' => [
'contact_id' => 1234,
'note' => 'Dont feed the dragon',
'user_id' => 12345678
]
],
[
'action' => 'delete_note',
'command_id' => '1234567890',
'data' => [
'id' => 1234567890
]
],
[
'action' => 'edit_note',
'command_id' => '1234567890A',
'data' => [
'id' => 123456789,
'note' => 'Seriously, dont',
'user_id' => 1075,
'contact_id' => 1234
]
]
]),
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/bulk/contacts.json"
payload := strings.NewReader("[\n {\n \"action\": \"add_contact\",\n \"command_id\": \"123\",\n \"data\": {\n \"name\": \"John Snow\",\n \"title\": \"Ing.\",\n \"company\": \"Night watch\",\n \"industry\": \"it\",\n \"website\": \"https://www.castleblack.com/\",\n \"address\": \"Room 1\",\n \"city\": \"New York\",\n \"zip\": \"18104\",\n \"state\": \"NY\",\n \"country_id\": 201,\n \"ContactNumber\": [\n {\n \"public_number\": 421901123456\n }\n ],\n \"ContactEmail\": [\n {\n \"email\": \"snow@example.com\"\n }\n ],\n \"ContactsTag\": [\n {\n \"name\": \"watch\"\n }\n ]\n }\n },\n {\n \"action\": \"delete_contact\",\n \"command_id\": \"1234\",\n \"data\": {\n \"id\": 1234\n }\n },\n {\n \"action\": \"edit_contact\",\n \"command_id\": \"12345\",\n \"data\": {\n \"id\": 123,\n \"name\": \"Daenerys Stormborn\",\n \"title\": \"Ing.\",\n \"company\": \"Targaryen inc.\",\n \"industry\": \"it\",\n \"website\": \"https://www.fireandblood.com/\",\n \"address\": \"First st.\",\n \"zip\": \"18104\",\n \"state\": \"NY\",\n \"country_id\": 201,\n \"ContactNumber\": [\n {\n \"public_number\": 421901123456\n },\n {\n \"public_number\": 421908123456\n }\n ],\n \"ContactEmail\": [\n {\n \"email\": \"danny@example.com\"\n },\n {\n \"email\": \"targ@example.com\"\n }\n ],\n \"ContactsTag\": [\n {\n \"name\": \"fire\"\n },\n {\n \"name\": \"dragons\"\n }\n ]\n }\n },\n {\n \"action\": \"add_activity\",\n \"command_id\": \"123456\",\n \"data\": {\n \"contact_id\": 123,\n \"type\": \"order\",\n \"name\": \"Burn the usurper\",\n \"activity_date\": \"2020-08-22T09:53:47.000Z\",\n \"description\": \"Defeat the forces at kings landing\",\n \"activity_author\": \"Danny Stormborn\",\n \"external_id\": 123456,\n \"external_url\": \"https://fireandblood.io/order\"\n }\n },\n {\n \"action\": \"delete_activity\",\n \"command_id\": \"1234567\",\n \"data\": {\n \"id\": 12345\n }\n },\n {\n \"action\": \"edit_activity\",\n \"command_id\": \"12345678\",\n \"data\": {\n \"id\": 123456,\n \"contact_id\": 123456,\n \"type\": \"order\",\n \"name\": \"Defend the Wall\",\n \"activity_date\": \"2020-08-25T09:53:47.000Z\",\n \"description\": \"Repel white walkers attack\",\n \"activity_author\": \"Danny Stormborn\",\n \"external_id\": 1234567,\n \"external_url\": \"https://fireandblood.com/defend\"\n }\n },\n {\n \"action\": \"add_note\",\n \"command_id\": \"123456789\",\n \"data\": {\n \"contact_id\": 1234,\n \"note\": \"Dont feed the dragon\",\n \"user_id\": 12345678\n }\n },\n {\n \"action\": \"delete_note\",\n \"command_id\": \"1234567890\",\n \"data\": {\n \"id\": 1234567890\n }\n },\n {\n \"action\": \"edit_note\",\n \"command_id\": \"1234567890A\",\n \"data\": {\n \"id\": 123456789,\n \"note\": \"Seriously, dont\",\n \"user_id\": 1075,\n \"contact_id\": 1234\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/bulk/contacts.json")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("[\n {\n \"action\": \"add_contact\",\n \"command_id\": \"123\",\n \"data\": {\n \"name\": \"John Snow\",\n \"title\": \"Ing.\",\n \"company\": \"Night watch\",\n \"industry\": \"it\",\n \"website\": \"https://www.castleblack.com/\",\n \"address\": \"Room 1\",\n \"city\": \"New York\",\n \"zip\": \"18104\",\n \"state\": \"NY\",\n \"country_id\": 201,\n \"ContactNumber\": [\n {\n \"public_number\": 421901123456\n }\n ],\n \"ContactEmail\": [\n {\n \"email\": \"snow@example.com\"\n }\n ],\n \"ContactsTag\": [\n {\n \"name\": \"watch\"\n }\n ]\n }\n },\n {\n \"action\": \"delete_contact\",\n \"command_id\": \"1234\",\n \"data\": {\n \"id\": 1234\n }\n },\n {\n \"action\": \"edit_contact\",\n \"command_id\": \"12345\",\n \"data\": {\n \"id\": 123,\n \"name\": \"Daenerys Stormborn\",\n \"title\": \"Ing.\",\n \"company\": \"Targaryen inc.\",\n \"industry\": \"it\",\n \"website\": \"https://www.fireandblood.com/\",\n \"address\": \"First st.\",\n \"zip\": \"18104\",\n \"state\": \"NY\",\n \"country_id\": 201,\n \"ContactNumber\": [\n {\n \"public_number\": 421901123456\n },\n {\n \"public_number\": 421908123456\n }\n ],\n \"ContactEmail\": [\n {\n \"email\": \"danny@example.com\"\n },\n {\n \"email\": \"targ@example.com\"\n }\n ],\n \"ContactsTag\": [\n {\n \"name\": \"fire\"\n },\n {\n \"name\": \"dragons\"\n }\n ]\n }\n },\n {\n \"action\": \"add_activity\",\n \"command_id\": \"123456\",\n \"data\": {\n \"contact_id\": 123,\n \"type\": \"order\",\n \"name\": \"Burn the usurper\",\n \"activity_date\": \"2020-08-22T09:53:47.000Z\",\n \"description\": \"Defeat the forces at kings landing\",\n \"activity_author\": \"Danny Stormborn\",\n \"external_id\": 123456,\n \"external_url\": \"https://fireandblood.io/order\"\n }\n },\n {\n \"action\": \"delete_activity\",\n \"command_id\": \"1234567\",\n \"data\": {\n \"id\": 12345\n }\n },\n {\n \"action\": \"edit_activity\",\n \"command_id\": \"12345678\",\n \"data\": {\n \"id\": 123456,\n \"contact_id\": 123456,\n \"type\": \"order\",\n \"name\": \"Defend the Wall\",\n \"activity_date\": \"2020-08-25T09:53:47.000Z\",\n \"description\": \"Repel white walkers attack\",\n \"activity_author\": \"Danny Stormborn\",\n \"external_id\": 1234567,\n \"external_url\": \"https://fireandblood.com/defend\"\n }\n },\n {\n \"action\": \"add_note\",\n \"command_id\": \"123456789\",\n \"data\": {\n \"contact_id\": 1234,\n \"note\": \"Dont feed the dragon\",\n \"user_id\": 12345678\n }\n },\n {\n \"action\": \"delete_note\",\n \"command_id\": \"1234567890\",\n \"data\": {\n \"id\": 1234567890\n }\n },\n {\n \"action\": \"edit_note\",\n \"command_id\": \"1234567890A\",\n \"data\": {\n \"id\": 123456789,\n \"note\": \"Seriously, dont\",\n \"user_id\": 1075,\n \"contact_id\": 1234\n }\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://my.cloudtalk.io/api/bulk/contacts.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 {\n \"action\": \"add_contact\",\n \"command_id\": \"123\",\n \"data\": {\n \"name\": \"John Snow\",\n \"title\": \"Ing.\",\n \"company\": \"Night watch\",\n \"industry\": \"it\",\n \"website\": \"https://www.castleblack.com/\",\n \"address\": \"Room 1\",\n \"city\": \"New York\",\n \"zip\": \"18104\",\n \"state\": \"NY\",\n \"country_id\": 201,\n \"ContactNumber\": [\n {\n \"public_number\": 421901123456\n }\n ],\n \"ContactEmail\": [\n {\n \"email\": \"snow@example.com\"\n }\n ],\n \"ContactsTag\": [\n {\n \"name\": \"watch\"\n }\n ]\n }\n },\n {\n \"action\": \"delete_contact\",\n \"command_id\": \"1234\",\n \"data\": {\n \"id\": 1234\n }\n },\n {\n \"action\": \"edit_contact\",\n \"command_id\": \"12345\",\n \"data\": {\n \"id\": 123,\n \"name\": \"Daenerys Stormborn\",\n \"title\": \"Ing.\",\n \"company\": \"Targaryen inc.\",\n \"industry\": \"it\",\n \"website\": \"https://www.fireandblood.com/\",\n \"address\": \"First st.\",\n \"zip\": \"18104\",\n \"state\": \"NY\",\n \"country_id\": 201,\n \"ContactNumber\": [\n {\n \"public_number\": 421901123456\n },\n {\n \"public_number\": 421908123456\n }\n ],\n \"ContactEmail\": [\n {\n \"email\": \"danny@example.com\"\n },\n {\n \"email\": \"targ@example.com\"\n }\n ],\n \"ContactsTag\": [\n {\n \"name\": \"fire\"\n },\n {\n \"name\": \"dragons\"\n }\n ]\n }\n },\n {\n \"action\": \"add_activity\",\n \"command_id\": \"123456\",\n \"data\": {\n \"contact_id\": 123,\n \"type\": \"order\",\n \"name\": \"Burn the usurper\",\n \"activity_date\": \"2020-08-22T09:53:47.000Z\",\n \"description\": \"Defeat the forces at kings landing\",\n \"activity_author\": \"Danny Stormborn\",\n \"external_id\": 123456,\n \"external_url\": \"https://fireandblood.io/order\"\n }\n },\n {\n \"action\": \"delete_activity\",\n \"command_id\": \"1234567\",\n \"data\": {\n \"id\": 12345\n }\n },\n {\n \"action\": \"edit_activity\",\n \"command_id\": \"12345678\",\n \"data\": {\n \"id\": 123456,\n \"contact_id\": 123456,\n \"type\": \"order\",\n \"name\": \"Defend the Wall\",\n \"activity_date\": \"2020-08-25T09:53:47.000Z\",\n \"description\": \"Repel white walkers attack\",\n \"activity_author\": \"Danny Stormborn\",\n \"external_id\": 1234567,\n \"external_url\": \"https://fireandblood.com/defend\"\n }\n },\n {\n \"action\": \"add_note\",\n \"command_id\": \"123456789\",\n \"data\": {\n \"contact_id\": 1234,\n \"note\": \"Dont feed the dragon\",\n \"user_id\": 12345678\n }\n },\n {\n \"action\": \"delete_note\",\n \"command_id\": \"1234567890\",\n \"data\": {\n \"id\": 1234567890\n }\n },\n {\n \"action\": \"edit_note\",\n \"command_id\": \"1234567890A\",\n \"data\": {\n \"id\": 123456789,\n \"note\": \"Seriously, dont\",\n \"user_id\": 1075,\n \"contact_id\": 1234\n }\n }\n]"
response = http.request(request)
puts response.read_body{
"responseData": {
"status": 200,
"data": [
{
"command_id": "123",
"status": 201,
"data": {
"id": "123"
}
},
{
"command_id": "1234",
"status": 200
},
{
"command_id": "12345",
"status": 200
},
{
"command_id": "123456",
"status": 201,
"data": {
"id": "123456"
}
},
{
"command_id": "1234567",
"status": 200
},
{
"command_id": "12345678",
"status": 200
},
{
"command_id": "12356789",
"status": 201,
"data": {
"id": "123456789"
}
},
{
"command_id": "1234567890",
"status": 200
},
{
"command_id": "123456789A",
"status": 200
}
]
}
}{
"responseData": {
"status": 406,
"message": "Invalid input data.",
"data": {
"email": [
"Please supply a valid email address."
]
}
}
}{
"responseData": {
"status": 500,
"message": "Something went wrong."
}
}Contact actions
Max 10 actions are available in one request. 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/bulk/contacts.json \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
[
{
"action": "add_contact",
"command_id": "123",
"data": {
"name": "John Snow",
"title": "Ing.",
"company": "Night watch",
"industry": "it",
"website": "https://www.castleblack.com/",
"address": "Room 1",
"city": "New York",
"zip": "18104",
"state": "NY",
"country_id": 201,
"ContactNumber": [
{
"public_number": 421901123456
}
],
"ContactEmail": [
{
"email": "snow@example.com"
}
],
"ContactsTag": [
{
"name": "watch"
}
]
}
},
{
"action": "delete_contact",
"command_id": "1234",
"data": {
"id": 1234
}
},
{
"action": "edit_contact",
"command_id": "12345",
"data": {
"id": 123,
"name": "Daenerys Stormborn",
"title": "Ing.",
"company": "Targaryen inc.",
"industry": "it",
"website": "https://www.fireandblood.com/",
"address": "First st.",
"zip": "18104",
"state": "NY",
"country_id": 201,
"ContactNumber": [
{
"public_number": 421901123456
},
{
"public_number": 421908123456
}
],
"ContactEmail": [
{
"email": "danny@example.com"
},
{
"email": "targ@example.com"
}
],
"ContactsTag": [
{
"name": "fire"
},
{
"name": "dragons"
}
]
}
},
{
"action": "add_activity",
"command_id": "123456",
"data": {
"contact_id": 123,
"type": "order",
"name": "Burn the usurper",
"activity_date": "2020-08-22T09:53:47.000Z",
"description": "Defeat the forces at kings landing",
"activity_author": "Danny Stormborn",
"external_id": 123456,
"external_url": "https://fireandblood.io/order"
}
},
{
"action": "delete_activity",
"command_id": "1234567",
"data": {
"id": 12345
}
},
{
"action": "edit_activity",
"command_id": "12345678",
"data": {
"id": 123456,
"contact_id": 123456,
"type": "order",
"name": "Defend the Wall",
"activity_date": "2020-08-25T09:53:47.000Z",
"description": "Repel white walkers attack",
"activity_author": "Danny Stormborn",
"external_id": 1234567,
"external_url": "https://fireandblood.com/defend"
}
},
{
"action": "add_note",
"command_id": "123456789",
"data": {
"contact_id": 1234,
"note": "Dont feed the dragon",
"user_id": 12345678
}
},
{
"action": "delete_note",
"command_id": "1234567890",
"data": {
"id": 1234567890
}
},
{
"action": "edit_note",
"command_id": "1234567890A",
"data": {
"id": 123456789,
"note": "Seriously, dont",
"user_id": 1075,
"contact_id": 1234
}
}
]
'import requests
url = "https://my.cloudtalk.io/api/bulk/contacts.json"
payload = [
{
"action": "add_contact",
"command_id": "123",
"data": {
"name": "John Snow",
"title": "Ing.",
"company": "Night watch",
"industry": "it",
"website": "https://www.castleblack.com/",
"address": "Room 1",
"city": "New York",
"zip": "18104",
"state": "NY",
"country_id": 201,
"ContactNumber": [{ "public_number": 421901123456 }],
"ContactEmail": [{ "email": "snow@example.com" }],
"ContactsTag": [{ "name": "watch" }]
}
},
{
"action": "delete_contact",
"command_id": "1234",
"data": { "id": 1234 }
},
{
"action": "edit_contact",
"command_id": "12345",
"data": {
"id": 123,
"name": "Daenerys Stormborn",
"title": "Ing.",
"company": "Targaryen inc.",
"industry": "it",
"website": "https://www.fireandblood.com/",
"address": "First st.",
"zip": "18104",
"state": "NY",
"country_id": 201,
"ContactNumber": [{ "public_number": 421901123456 }, { "public_number": 421908123456 }],
"ContactEmail": [{ "email": "danny@example.com" }, { "email": "targ@example.com" }],
"ContactsTag": [{ "name": "fire" }, { "name": "dragons" }]
}
},
{
"action": "add_activity",
"command_id": "123456",
"data": {
"contact_id": 123,
"type": "order",
"name": "Burn the usurper",
"activity_date": "2020-08-22T09:53:47.000Z",
"description": "Defeat the forces at kings landing",
"activity_author": "Danny Stormborn",
"external_id": 123456,
"external_url": "https://fireandblood.io/order"
}
},
{
"action": "delete_activity",
"command_id": "1234567",
"data": { "id": 12345 }
},
{
"action": "edit_activity",
"command_id": "12345678",
"data": {
"id": 123456,
"contact_id": 123456,
"type": "order",
"name": "Defend the Wall",
"activity_date": "2020-08-25T09:53:47.000Z",
"description": "Repel white walkers attack",
"activity_author": "Danny Stormborn",
"external_id": 1234567,
"external_url": "https://fireandblood.com/defend"
}
},
{
"action": "add_note",
"command_id": "123456789",
"data": {
"contact_id": 1234,
"note": "Dont feed the dragon",
"user_id": 12345678
}
},
{
"action": "delete_note",
"command_id": "1234567890",
"data": { "id": 1234567890 }
},
{
"action": "edit_note",
"command_id": "1234567890A",
"data": {
"id": 123456789,
"note": "Seriously, dont",
"user_id": 1075,
"contact_id": 1234
}
}
]
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([
{
action: 'add_contact',
command_id: '123',
data: {
name: 'John Snow',
title: 'Ing.',
company: 'Night watch',
industry: 'it',
website: 'https://www.castleblack.com/',
address: 'Room 1',
city: 'New York',
zip: '18104',
state: 'NY',
country_id: 201,
ContactNumber: [{public_number: 421901123456}],
ContactEmail: [{email: 'snow@example.com'}],
ContactsTag: [{name: 'watch'}]
}
},
{action: 'delete_contact', command_id: '1234', data: {id: 1234}},
{
action: 'edit_contact',
command_id: '12345',
data: {
id: 123,
name: 'Daenerys Stormborn',
title: 'Ing.',
company: 'Targaryen inc.',
industry: 'it',
website: 'https://www.fireandblood.com/',
address: 'First st.',
zip: '18104',
state: 'NY',
country_id: 201,
ContactNumber: [{public_number: 421901123456}, {public_number: 421908123456}],
ContactEmail: [{email: 'danny@example.com'}, {email: 'targ@example.com'}],
ContactsTag: [{name: 'fire'}, {name: 'dragons'}]
}
},
{
action: 'add_activity',
command_id: '123456',
data: {
contact_id: 123,
type: 'order',
name: 'Burn the usurper',
activity_date: '2020-08-22T09:53:47.000Z',
description: 'Defeat the forces at kings landing',
activity_author: 'Danny Stormborn',
external_id: 123456,
external_url: 'https://fireandblood.io/order'
}
},
{action: 'delete_activity', command_id: '1234567', data: {id: 12345}},
{
action: 'edit_activity',
command_id: '12345678',
data: {
id: 123456,
contact_id: 123456,
type: 'order',
name: 'Defend the Wall',
activity_date: '2020-08-25T09:53:47.000Z',
description: 'Repel white walkers attack',
activity_author: 'Danny Stormborn',
external_id: 1234567,
external_url: 'https://fireandblood.com/defend'
}
},
{
action: 'add_note',
command_id: '123456789',
data: {contact_id: 1234, note: 'Dont feed the dragon', user_id: 12345678}
},
{action: 'delete_note', command_id: '1234567890', data: {id: 1234567890}},
{
action: 'edit_note',
command_id: '1234567890A',
data: {id: 123456789, note: 'Seriously, dont', user_id: 1075, contact_id: 1234}
}
])
};
fetch('https://my.cloudtalk.io/api/bulk/contacts.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/bulk/contacts.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([
[
'action' => 'add_contact',
'command_id' => '123',
'data' => [
'name' => 'John Snow',
'title' => 'Ing.',
'company' => 'Night watch',
'industry' => 'it',
'website' => 'https://www.castleblack.com/',
'address' => 'Room 1',
'city' => 'New York',
'zip' => '18104',
'state' => 'NY',
'country_id' => 201,
'ContactNumber' => [
[
'public_number' => 421901123456
]
],
'ContactEmail' => [
[
'email' => 'snow@example.com'
]
],
'ContactsTag' => [
[
'name' => 'watch'
]
]
]
],
[
'action' => 'delete_contact',
'command_id' => '1234',
'data' => [
'id' => 1234
]
],
[
'action' => 'edit_contact',
'command_id' => '12345',
'data' => [
'id' => 123,
'name' => 'Daenerys Stormborn',
'title' => 'Ing.',
'company' => 'Targaryen inc.',
'industry' => 'it',
'website' => 'https://www.fireandblood.com/',
'address' => 'First st.',
'zip' => '18104',
'state' => 'NY',
'country_id' => 201,
'ContactNumber' => [
[
'public_number' => 421901123456
],
[
'public_number' => 421908123456
]
],
'ContactEmail' => [
[
'email' => 'danny@example.com'
],
[
'email' => 'targ@example.com'
]
],
'ContactsTag' => [
[
'name' => 'fire'
],
[
'name' => 'dragons'
]
]
]
],
[
'action' => 'add_activity',
'command_id' => '123456',
'data' => [
'contact_id' => 123,
'type' => 'order',
'name' => 'Burn the usurper',
'activity_date' => '2020-08-22T09:53:47.000Z',
'description' => 'Defeat the forces at kings landing',
'activity_author' => 'Danny Stormborn',
'external_id' => 123456,
'external_url' => 'https://fireandblood.io/order'
]
],
[
'action' => 'delete_activity',
'command_id' => '1234567',
'data' => [
'id' => 12345
]
],
[
'action' => 'edit_activity',
'command_id' => '12345678',
'data' => [
'id' => 123456,
'contact_id' => 123456,
'type' => 'order',
'name' => 'Defend the Wall',
'activity_date' => '2020-08-25T09:53:47.000Z',
'description' => 'Repel white walkers attack',
'activity_author' => 'Danny Stormborn',
'external_id' => 1234567,
'external_url' => 'https://fireandblood.com/defend'
]
],
[
'action' => 'add_note',
'command_id' => '123456789',
'data' => [
'contact_id' => 1234,
'note' => 'Dont feed the dragon',
'user_id' => 12345678
]
],
[
'action' => 'delete_note',
'command_id' => '1234567890',
'data' => [
'id' => 1234567890
]
],
[
'action' => 'edit_note',
'command_id' => '1234567890A',
'data' => [
'id' => 123456789,
'note' => 'Seriously, dont',
'user_id' => 1075,
'contact_id' => 1234
]
]
]),
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/bulk/contacts.json"
payload := strings.NewReader("[\n {\n \"action\": \"add_contact\",\n \"command_id\": \"123\",\n \"data\": {\n \"name\": \"John Snow\",\n \"title\": \"Ing.\",\n \"company\": \"Night watch\",\n \"industry\": \"it\",\n \"website\": \"https://www.castleblack.com/\",\n \"address\": \"Room 1\",\n \"city\": \"New York\",\n \"zip\": \"18104\",\n \"state\": \"NY\",\n \"country_id\": 201,\n \"ContactNumber\": [\n {\n \"public_number\": 421901123456\n }\n ],\n \"ContactEmail\": [\n {\n \"email\": \"snow@example.com\"\n }\n ],\n \"ContactsTag\": [\n {\n \"name\": \"watch\"\n }\n ]\n }\n },\n {\n \"action\": \"delete_contact\",\n \"command_id\": \"1234\",\n \"data\": {\n \"id\": 1234\n }\n },\n {\n \"action\": \"edit_contact\",\n \"command_id\": \"12345\",\n \"data\": {\n \"id\": 123,\n \"name\": \"Daenerys Stormborn\",\n \"title\": \"Ing.\",\n \"company\": \"Targaryen inc.\",\n \"industry\": \"it\",\n \"website\": \"https://www.fireandblood.com/\",\n \"address\": \"First st.\",\n \"zip\": \"18104\",\n \"state\": \"NY\",\n \"country_id\": 201,\n \"ContactNumber\": [\n {\n \"public_number\": 421901123456\n },\n {\n \"public_number\": 421908123456\n }\n ],\n \"ContactEmail\": [\n {\n \"email\": \"danny@example.com\"\n },\n {\n \"email\": \"targ@example.com\"\n }\n ],\n \"ContactsTag\": [\n {\n \"name\": \"fire\"\n },\n {\n \"name\": \"dragons\"\n }\n ]\n }\n },\n {\n \"action\": \"add_activity\",\n \"command_id\": \"123456\",\n \"data\": {\n \"contact_id\": 123,\n \"type\": \"order\",\n \"name\": \"Burn the usurper\",\n \"activity_date\": \"2020-08-22T09:53:47.000Z\",\n \"description\": \"Defeat the forces at kings landing\",\n \"activity_author\": \"Danny Stormborn\",\n \"external_id\": 123456,\n \"external_url\": \"https://fireandblood.io/order\"\n }\n },\n {\n \"action\": \"delete_activity\",\n \"command_id\": \"1234567\",\n \"data\": {\n \"id\": 12345\n }\n },\n {\n \"action\": \"edit_activity\",\n \"command_id\": \"12345678\",\n \"data\": {\n \"id\": 123456,\n \"contact_id\": 123456,\n \"type\": \"order\",\n \"name\": \"Defend the Wall\",\n \"activity_date\": \"2020-08-25T09:53:47.000Z\",\n \"description\": \"Repel white walkers attack\",\n \"activity_author\": \"Danny Stormborn\",\n \"external_id\": 1234567,\n \"external_url\": \"https://fireandblood.com/defend\"\n }\n },\n {\n \"action\": \"add_note\",\n \"command_id\": \"123456789\",\n \"data\": {\n \"contact_id\": 1234,\n \"note\": \"Dont feed the dragon\",\n \"user_id\": 12345678\n }\n },\n {\n \"action\": \"delete_note\",\n \"command_id\": \"1234567890\",\n \"data\": {\n \"id\": 1234567890\n }\n },\n {\n \"action\": \"edit_note\",\n \"command_id\": \"1234567890A\",\n \"data\": {\n \"id\": 123456789,\n \"note\": \"Seriously, dont\",\n \"user_id\": 1075,\n \"contact_id\": 1234\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/bulk/contacts.json")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("[\n {\n \"action\": \"add_contact\",\n \"command_id\": \"123\",\n \"data\": {\n \"name\": \"John Snow\",\n \"title\": \"Ing.\",\n \"company\": \"Night watch\",\n \"industry\": \"it\",\n \"website\": \"https://www.castleblack.com/\",\n \"address\": \"Room 1\",\n \"city\": \"New York\",\n \"zip\": \"18104\",\n \"state\": \"NY\",\n \"country_id\": 201,\n \"ContactNumber\": [\n {\n \"public_number\": 421901123456\n }\n ],\n \"ContactEmail\": [\n {\n \"email\": \"snow@example.com\"\n }\n ],\n \"ContactsTag\": [\n {\n \"name\": \"watch\"\n }\n ]\n }\n },\n {\n \"action\": \"delete_contact\",\n \"command_id\": \"1234\",\n \"data\": {\n \"id\": 1234\n }\n },\n {\n \"action\": \"edit_contact\",\n \"command_id\": \"12345\",\n \"data\": {\n \"id\": 123,\n \"name\": \"Daenerys Stormborn\",\n \"title\": \"Ing.\",\n \"company\": \"Targaryen inc.\",\n \"industry\": \"it\",\n \"website\": \"https://www.fireandblood.com/\",\n \"address\": \"First st.\",\n \"zip\": \"18104\",\n \"state\": \"NY\",\n \"country_id\": 201,\n \"ContactNumber\": [\n {\n \"public_number\": 421901123456\n },\n {\n \"public_number\": 421908123456\n }\n ],\n \"ContactEmail\": [\n {\n \"email\": \"danny@example.com\"\n },\n {\n \"email\": \"targ@example.com\"\n }\n ],\n \"ContactsTag\": [\n {\n \"name\": \"fire\"\n },\n {\n \"name\": \"dragons\"\n }\n ]\n }\n },\n {\n \"action\": \"add_activity\",\n \"command_id\": \"123456\",\n \"data\": {\n \"contact_id\": 123,\n \"type\": \"order\",\n \"name\": \"Burn the usurper\",\n \"activity_date\": \"2020-08-22T09:53:47.000Z\",\n \"description\": \"Defeat the forces at kings landing\",\n \"activity_author\": \"Danny Stormborn\",\n \"external_id\": 123456,\n \"external_url\": \"https://fireandblood.io/order\"\n }\n },\n {\n \"action\": \"delete_activity\",\n \"command_id\": \"1234567\",\n \"data\": {\n \"id\": 12345\n }\n },\n {\n \"action\": \"edit_activity\",\n \"command_id\": \"12345678\",\n \"data\": {\n \"id\": 123456,\n \"contact_id\": 123456,\n \"type\": \"order\",\n \"name\": \"Defend the Wall\",\n \"activity_date\": \"2020-08-25T09:53:47.000Z\",\n \"description\": \"Repel white walkers attack\",\n \"activity_author\": \"Danny Stormborn\",\n \"external_id\": 1234567,\n \"external_url\": \"https://fireandblood.com/defend\"\n }\n },\n {\n \"action\": \"add_note\",\n \"command_id\": \"123456789\",\n \"data\": {\n \"contact_id\": 1234,\n \"note\": \"Dont feed the dragon\",\n \"user_id\": 12345678\n }\n },\n {\n \"action\": \"delete_note\",\n \"command_id\": \"1234567890\",\n \"data\": {\n \"id\": 1234567890\n }\n },\n {\n \"action\": \"edit_note\",\n \"command_id\": \"1234567890A\",\n \"data\": {\n \"id\": 123456789,\n \"note\": \"Seriously, dont\",\n \"user_id\": 1075,\n \"contact_id\": 1234\n }\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://my.cloudtalk.io/api/bulk/contacts.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 {\n \"action\": \"add_contact\",\n \"command_id\": \"123\",\n \"data\": {\n \"name\": \"John Snow\",\n \"title\": \"Ing.\",\n \"company\": \"Night watch\",\n \"industry\": \"it\",\n \"website\": \"https://www.castleblack.com/\",\n \"address\": \"Room 1\",\n \"city\": \"New York\",\n \"zip\": \"18104\",\n \"state\": \"NY\",\n \"country_id\": 201,\n \"ContactNumber\": [\n {\n \"public_number\": 421901123456\n }\n ],\n \"ContactEmail\": [\n {\n \"email\": \"snow@example.com\"\n }\n ],\n \"ContactsTag\": [\n {\n \"name\": \"watch\"\n }\n ]\n }\n },\n {\n \"action\": \"delete_contact\",\n \"command_id\": \"1234\",\n \"data\": {\n \"id\": 1234\n }\n },\n {\n \"action\": \"edit_contact\",\n \"command_id\": \"12345\",\n \"data\": {\n \"id\": 123,\n \"name\": \"Daenerys Stormborn\",\n \"title\": \"Ing.\",\n \"company\": \"Targaryen inc.\",\n \"industry\": \"it\",\n \"website\": \"https://www.fireandblood.com/\",\n \"address\": \"First st.\",\n \"zip\": \"18104\",\n \"state\": \"NY\",\n \"country_id\": 201,\n \"ContactNumber\": [\n {\n \"public_number\": 421901123456\n },\n {\n \"public_number\": 421908123456\n }\n ],\n \"ContactEmail\": [\n {\n \"email\": \"danny@example.com\"\n },\n {\n \"email\": \"targ@example.com\"\n }\n ],\n \"ContactsTag\": [\n {\n \"name\": \"fire\"\n },\n {\n \"name\": \"dragons\"\n }\n ]\n }\n },\n {\n \"action\": \"add_activity\",\n \"command_id\": \"123456\",\n \"data\": {\n \"contact_id\": 123,\n \"type\": \"order\",\n \"name\": \"Burn the usurper\",\n \"activity_date\": \"2020-08-22T09:53:47.000Z\",\n \"description\": \"Defeat the forces at kings landing\",\n \"activity_author\": \"Danny Stormborn\",\n \"external_id\": 123456,\n \"external_url\": \"https://fireandblood.io/order\"\n }\n },\n {\n \"action\": \"delete_activity\",\n \"command_id\": \"1234567\",\n \"data\": {\n \"id\": 12345\n }\n },\n {\n \"action\": \"edit_activity\",\n \"command_id\": \"12345678\",\n \"data\": {\n \"id\": 123456,\n \"contact_id\": 123456,\n \"type\": \"order\",\n \"name\": \"Defend the Wall\",\n \"activity_date\": \"2020-08-25T09:53:47.000Z\",\n \"description\": \"Repel white walkers attack\",\n \"activity_author\": \"Danny Stormborn\",\n \"external_id\": 1234567,\n \"external_url\": \"https://fireandblood.com/defend\"\n }\n },\n {\n \"action\": \"add_note\",\n \"command_id\": \"123456789\",\n \"data\": {\n \"contact_id\": 1234,\n \"note\": \"Dont feed the dragon\",\n \"user_id\": 12345678\n }\n },\n {\n \"action\": \"delete_note\",\n \"command_id\": \"1234567890\",\n \"data\": {\n \"id\": 1234567890\n }\n },\n {\n \"action\": \"edit_note\",\n \"command_id\": \"1234567890A\",\n \"data\": {\n \"id\": 123456789,\n \"note\": \"Seriously, dont\",\n \"user_id\": 1075,\n \"contact_id\": 1234\n }\n }\n]"
response = http.request(request)
puts response.read_body{
"responseData": {
"status": 200,
"data": [
{
"command_id": "123",
"status": 201,
"data": {
"id": "123"
}
},
{
"command_id": "1234",
"status": 200
},
{
"command_id": "12345",
"status": 200
},
{
"command_id": "123456",
"status": 201,
"data": {
"id": "123456"
}
},
{
"command_id": "1234567",
"status": 200
},
{
"command_id": "12345678",
"status": 200
},
{
"command_id": "12356789",
"status": 201,
"data": {
"id": "123456789"
}
},
{
"command_id": "1234567890",
"status": 200
},
{
"command_id": "123456789A",
"status": 200
}
]
}
}{
"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).
Body
10Action
add_contact, edit_contact, delete_contact, add_activity, edit_activity, delete_activity, add_note, edit_note, delete_note Unique action identifier
- add contact
- delete contact/note/activity
- edit contact
- add activity
- edit activity
- add note
- edit note
Show child attributes
Show child attributes
[
{
"action": "add_contact",
"command_id": "123",
"data": {
"name": "John Snow",
"title": "Ing.",
"company": "Night watch",
"industry": "it",
"website": "https://www.castleblack.com/",
"address": "Room 1",
"city": "New York",
"zip": "18104",
"state": "NY",
"country_id": 201,
"ContactNumber": [{ "public_number": 421901123456 }],
"ContactEmail": [{ "email": "snow@example.com" }],
"ContactsTag": [{ "name": "watch" }]
}
},
{
"action": "delete_contact",
"command_id": "1234",
"data": { "id": 1234 }
},
{
"action": "edit_contact",
"command_id": "12345",
"data": {
"id": 123,
"name": "Daenerys Stormborn",
"title": "Ing.",
"company": "Targaryen inc.",
"industry": "it",
"website": "https://www.fireandblood.com/",
"address": "First st.",
"zip": "18104",
"state": "NY",
"country_id": 201,
"ContactNumber": [
{ "public_number": 421901123456 },
{ "public_number": 421908123456 }
],
"ContactEmail": [
{ "email": "danny@example.com" },
{ "email": "targ@example.com" }
],
"ContactsTag": [{ "name": "fire" }, { "name": "dragons" }]
}
},
{
"action": "add_activity",
"command_id": "123456",
"data": {
"contact_id": 123,
"type": "order",
"name": "Burn the usurper",
"activity_date": "2020-08-22T09:53:47.000Z",
"description": "Defeat the forces at kings landing",
"activity_author": "Danny Stormborn",
"external_id": 123456,
"external_url": "https://fireandblood.io/order"
}
},
{
"action": "delete_activity",
"command_id": "1234567",
"data": { "id": 12345 }
},
{
"action": "edit_activity",
"command_id": "12345678",
"data": {
"id": 123456,
"contact_id": 123456,
"type": "order",
"name": "Defend the Wall",
"activity_date": "2020-08-25T09:53:47.000Z",
"description": "Repel white walkers attack",
"activity_author": "Danny Stormborn",
"external_id": 1234567,
"external_url": "https://fireandblood.com/defend"
}
},
{
"action": "add_note",
"command_id": "123456789",
"data": {
"contact_id": 1234,
"note": "Dont feed the dragon",
"user_id": 12345678
}
},
{
"action": "delete_note",
"command_id": "1234567890",
"data": { "id": 1234567890 }
},
{
"action": "edit_note",
"command_id": "1234567890A",
"data": {
"id": 123456789,
"note": "Seriously, dont",
"user_id": 1075,
"contact_id": 1234
}
}
]
Response
No error
Show child attributes
Show child attributes
Related topics
CloudTalk REST API: Call Center Automation PlatformCloudTalk REST API v1.7 — Complete Developer ReferenceCloudTalk API Rate Limits, Headers, and Throttling