Contacts
Bulk Transfer Contacts
Transfer multiple contacts to different account or assignee
POST
/
api
/
v1
/
contacts
/
bulk_transfer
Bulk Transfer Contacts
curl --request POST \
--url https://api.evoai.app/api/v1/contacts/bulk_transfer \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"contact_ids": [
1,
2,
3
],
"assignee_id": "111e2222-e33b-44d5-a666-777888999000"
}
'import requests
url = "https://api.evoai.app/api/v1/contacts/bulk_transfer"
payload = {
"contact_ids": [1, 2, 3],
"assignee_id": "111e2222-e33b-44d5-a666-777888999000"
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({contact_ids: [1, 2, 3], assignee_id: '111e2222-e33b-44d5-a666-777888999000'})
};
fetch('https://api.evoai.app/api/v1/contacts/bulk_transfer', 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.evoai.app/api/v1/contacts/bulk_transfer",
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([
'contact_ids' => [
1,
2,
3
],
'assignee_id' => '111e2222-e33b-44d5-a666-777888999000'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api_access_token: <api-key>"
],
]);
$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.evoai.app/api/v1/contacts/bulk_transfer"
payload := strings.NewReader("{\n \"contact_ids\": [\n 1,\n 2,\n 3\n ],\n \"assignee_id\": \"111e2222-e33b-44d5-a666-777888999000\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api_access_token", "<api-key>")
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.evoai.app/api/v1/contacts/bulk_transfer")
.header("api_access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contact_ids\": [\n 1,\n 2,\n 3\n ],\n \"assignee_id\": \"111e2222-e33b-44d5-a666-777888999000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evoai.app/api/v1/contacts/bulk_transfer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_access_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contact_ids\": [\n 1,\n 2,\n 3\n ],\n \"assignee_id\": \"111e2222-e33b-44d5-a666-777888999000\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": null,
"meta": {
"timestamp": "2024-01-15T10:30:00Z"
},
"message": "Contacts transferred successfully"
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/contacts/bulk_transfer",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "INVALID_TOKEN",
"message": "Invalid token"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/contacts/bulk_transfer",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "You do not have permission to access this resource"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/contacts/bulk_transfer",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "One or more contacts not found"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/contacts/bulk_transfer",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"details": {
"contact_ids": "Contact IDs array is required",
"assignee_id": "Assignee ID must be a valid UUID"
}
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/contacts/bulk_transfer",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/contacts/bulk_transfer",
"method": "POST"
}
}Authorizations
Body
application/json
⌘I
Bulk Transfer Contacts
curl --request POST \
--url https://api.evoai.app/api/v1/contacts/bulk_transfer \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"contact_ids": [
1,
2,
3
],
"assignee_id": "111e2222-e33b-44d5-a666-777888999000"
}
'import requests
url = "https://api.evoai.app/api/v1/contacts/bulk_transfer"
payload = {
"contact_ids": [1, 2, 3],
"assignee_id": "111e2222-e33b-44d5-a666-777888999000"
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({contact_ids: [1, 2, 3], assignee_id: '111e2222-e33b-44d5-a666-777888999000'})
};
fetch('https://api.evoai.app/api/v1/contacts/bulk_transfer', 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.evoai.app/api/v1/contacts/bulk_transfer",
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([
'contact_ids' => [
1,
2,
3
],
'assignee_id' => '111e2222-e33b-44d5-a666-777888999000'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api_access_token: <api-key>"
],
]);
$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.evoai.app/api/v1/contacts/bulk_transfer"
payload := strings.NewReader("{\n \"contact_ids\": [\n 1,\n 2,\n 3\n ],\n \"assignee_id\": \"111e2222-e33b-44d5-a666-777888999000\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api_access_token", "<api-key>")
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.evoai.app/api/v1/contacts/bulk_transfer")
.header("api_access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contact_ids\": [\n 1,\n 2,\n 3\n ],\n \"assignee_id\": \"111e2222-e33b-44d5-a666-777888999000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evoai.app/api/v1/contacts/bulk_transfer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_access_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contact_ids\": [\n 1,\n 2,\n 3\n ],\n \"assignee_id\": \"111e2222-e33b-44d5-a666-777888999000\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": null,
"meta": {
"timestamp": "2024-01-15T10:30:00Z"
},
"message": "Contacts transferred successfully"
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/contacts/bulk_transfer",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "INVALID_TOKEN",
"message": "Invalid token"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/contacts/bulk_transfer",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "You do not have permission to access this resource"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/contacts/bulk_transfer",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "One or more contacts not found"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/contacts/bulk_transfer",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"details": {
"contact_ids": "Contact IDs array is required",
"assignee_id": "Assignee ID must be a valid UUID"
}
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/contacts/bulk_transfer",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/contacts/bulk_transfer",
"method": "POST"
}
}