Move accounts between workspaces
curl --request POST \
--url https://api.instantly.ai/api/v2/accounts/move \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"emails": [
"user@example.com"
],
"source_workspace_id": "019f985c-922e-789d-8749-05eea7c2a7c7",
"destination_workspace_id": "019f985c-922e-789d-8749-05efb469feda"
}
'import requests
url = "https://api.instantly.ai/api/v2/accounts/move"
payload = {
"emails": ["user@example.com"],
"source_workspace_id": "019f985c-922e-789d-8749-05eea7c2a7c7",
"destination_workspace_id": "019f985c-922e-789d-8749-05efb469feda"
}
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({
emails: ['user@example.com'],
source_workspace_id: '019f985c-922e-789d-8749-05eea7c2a7c7',
destination_workspace_id: '019f985c-922e-789d-8749-05efb469feda'
})
};
fetch('https://api.instantly.ai/api/v2/accounts/move', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.instantly.ai/api/v2/accounts/move")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"emails\": [\n \"user@example.com\"\n ],\n \"source_workspace_id\": \"019f985c-922e-789d-8749-05eea7c2a7c7\",\n \"destination_workspace_id\": \"019f985c-922e-789d-8749-05efb469feda\"\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.instantly.ai/api/v2/accounts/move",
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([
'emails' => [
'user@example.com'
],
'source_workspace_id' => '019f985c-922e-789d-8749-05eea7c2a7c7',
'destination_workspace_id' => '019f985c-922e-789d-8749-05efb469feda'
]),
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.instantly.ai/api/v2/accounts/move"
payload := strings.NewReader("{\n \"emails\": [\n \"user@example.com\"\n ],\n \"source_workspace_id\": \"019f985c-922e-789d-8749-05eea7c2a7c7\",\n \"destination_workspace_id\": \"019f985c-922e-789d-8749-05efb469feda\"\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))
}{
"status": "success"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Missing Authorization header"
}{
"statusCode": 402,
"error": "Payment Required",
"message": "Workspace does not have an active paid plan"
}{
"statusCode": 404,
"error": "Not Found",
"message": "Resource not found"
}{
"statusCode": 429,
"error": "Too Many Requests",
"message": "Rate limit exceeded"
}Account
Move accounts between workspaces
Move accounts between workspaces. IMPORTANT: this endpoint should be called ONLY with an ADMIN workspace API key (check the workspace group docs: https://developer.instantly.ai/workspace-group), and both the source and destination workspaces must have the same admin workspace.
POST
/
api
/
v2
/
accounts
/
move
Move accounts between workspaces
curl --request POST \
--url https://api.instantly.ai/api/v2/accounts/move \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"emails": [
"user@example.com"
],
"source_workspace_id": "019f985c-922e-789d-8749-05eea7c2a7c7",
"destination_workspace_id": "019f985c-922e-789d-8749-05efb469feda"
}
'import requests
url = "https://api.instantly.ai/api/v2/accounts/move"
payload = {
"emails": ["user@example.com"],
"source_workspace_id": "019f985c-922e-789d-8749-05eea7c2a7c7",
"destination_workspace_id": "019f985c-922e-789d-8749-05efb469feda"
}
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({
emails: ['user@example.com'],
source_workspace_id: '019f985c-922e-789d-8749-05eea7c2a7c7',
destination_workspace_id: '019f985c-922e-789d-8749-05efb469feda'
})
};
fetch('https://api.instantly.ai/api/v2/accounts/move', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.instantly.ai/api/v2/accounts/move")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"emails\": [\n \"user@example.com\"\n ],\n \"source_workspace_id\": \"019f985c-922e-789d-8749-05eea7c2a7c7\",\n \"destination_workspace_id\": \"019f985c-922e-789d-8749-05efb469feda\"\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.instantly.ai/api/v2/accounts/move",
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([
'emails' => [
'user@example.com'
],
'source_workspace_id' => '019f985c-922e-789d-8749-05eea7c2a7c7',
'destination_workspace_id' => '019f985c-922e-789d-8749-05efb469feda'
]),
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.instantly.ai/api/v2/accounts/move"
payload := strings.NewReader("{\n \"emails\": [\n \"user@example.com\"\n ],\n \"source_workspace_id\": \"019f985c-922e-789d-8749-05eea7c2a7c7\",\n \"destination_workspace_id\": \"019f985c-922e-789d-8749-05efb469feda\"\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))
}{
"status": "success"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Missing Authorization header"
}{
"statusCode": 402,
"error": "Payment Required",
"message": "Workspace does not have an active paid plan"
}{
"statusCode": 404,
"error": "Not Found",
"message": "Resource not found"
}{
"statusCode": 429,
"error": "Too Many Requests",
"message": "Rate limit exceeded"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Array of email addresses of the accounts to move
Minimum array length:
1Email address of the account to move
ID of the source workspace (the workspace that the accounts are currently in)
Example:
"019f985c-922e-789d-8749-05eea7c2a7c7"
ID of the destination workspace (the workspace that the accounts will be moved to)
Example:
"019f985c-922e-789d-8749-05efb469feda"
Response
Default Response
Available options:
success Example:
"success"
⌘I