curl --request POST \
--url https://api.instantly.ai/api/v2/leads/bulk-assign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"organization_user_ids": [
"01a082d0-842a-79bc-8ae5-42d0380285a8"
]
}
'import requests
url = "https://api.instantly.ai/api/v2/leads/bulk-assign"
payload = { "organization_user_ids": ["01a082d0-842a-79bc-8ae5-42d0380285a8"] }
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({organization_user_ids: ['01a082d0-842a-79bc-8ae5-42d0380285a8']})
};
fetch('https://api.instantly.ai/api/v2/leads/bulk-assign', 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/leads/bulk-assign")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"organization_user_ids\": [\n \"01a082d0-842a-79bc-8ae5-42d0380285a8\"\n ]\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.instantly.ai/api/v2/leads/bulk-assign",
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([
'organization_user_ids' => [
'01a082d0-842a-79bc-8ae5-42d0380285a8'
]
]),
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/leads/bulk-assign"
payload := strings.NewReader("{\n \"organization_user_ids\": [\n \"01a082d0-842a-79bc-8ae5-42d0380285a8\"\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))
}{
"status": "accepted",
"message": "Your request will be processed in a background job"
}{
"message": "Invalid ID on `organization_user_ids` field"
}{
"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"
}Bulk assign leads to organization users
Bulk assign leads to organization users
curl --request POST \
--url https://api.instantly.ai/api/v2/leads/bulk-assign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"organization_user_ids": [
"01a082d0-842a-79bc-8ae5-42d0380285a8"
]
}
'import requests
url = "https://api.instantly.ai/api/v2/leads/bulk-assign"
payload = { "organization_user_ids": ["01a082d0-842a-79bc-8ae5-42d0380285a8"] }
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({organization_user_ids: ['01a082d0-842a-79bc-8ae5-42d0380285a8']})
};
fetch('https://api.instantly.ai/api/v2/leads/bulk-assign', 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/leads/bulk-assign")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"organization_user_ids\": [\n \"01a082d0-842a-79bc-8ae5-42d0380285a8\"\n ]\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.instantly.ai/api/v2/leads/bulk-assign",
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([
'organization_user_ids' => [
'01a082d0-842a-79bc-8ae5-42d0380285a8'
]
]),
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/leads/bulk-assign"
payload := strings.NewReader("{\n \"organization_user_ids\": [\n \"01a082d0-842a-79bc-8ae5-42d0380285a8\"\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))
}{
"status": "accepted",
"message": "Your request will be processed in a background job"
}{
"message": "Invalid ID on `organization_user_ids` field"
}{
"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
1The search query to filter leads by.
"test"
The filter to apply to the leads.
FILTER_VAL_CONTACTED, FILTER_VAL_NOT_CONTACTED, FILTER_VAL_COMPLETED, FILTER_VAL_UNSUBSCRIBED, FILTER_VAL_ACTIVE, FILTER_LEAD_INTERESTED, FILTER_LEAD_NOT_INTERESTED, FILTER_LEAD_MEETING_BOOKED, FILTER_LEAD_MEETING_COMPLETED, FILTER_LEAD_CLOSED, FILTER_LEAD_OUT_OF_OFFICE, FILTER_LEAD_WRONG_PERSON, FILTER_LEAD_LOST, FILTER_LEAD_NO_SHOW, FILTER_LEAD_CUSTOM_LABEL_POSITIVE, FILTER_LEAD_CUSTOM_LABEL_NEGATIVE, FILTER_VAL_BOUNCED, FILTER_VAL_SKIPPED, FILTER_VAL_RISKY, FILTER_VAL_INVALID, FILTER_VAL_VALID, FILTER_VAL_IN_SUBSEQUENCE, FILTER_VAL_OPENED_NO_REPLY, FILTER_VAL_COMPLETED_NO_REPLY, FILTER_VAL_NO_OPENS, FILTER_VAL_REPLIED, FILTER_VAL_LINK_CLICKED "FILTER_LEAD_CLOSED"
The ID of the campaign to filter leads by.
"01a082d0-842a-79bc-8ae5-42cea891de7a"
The ID of the list to filter leads by.
"01a082d0-842a-79bc-8ae5-42cfa18e5f6f"
Whether the leads are in the campaign.
true
Whether the leads are in the list.
true
The ID of the smart view to filter leads by.
"01a082d0-842a-79bc-8ae5-42d1e9a2089e"
The IDs of the leads to filter by.
The limit of the number of leads to return.
x >= 010
Show child attributes
Show child attributes
Filter leads by their current owner (the user they are currently assigned to).
"01a082d0-842a-79bc-8ae5-42d39cce2894"
Whether this endpoint should list data based on the filters currently applied in the web app.
true