Start Import Queue
curl --request POST \
--url https://api.bizzy.ai/v1/agents/import-queue \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"agentId": 123
}'import requests
url = "https://api.bizzy.ai/v1/agents/import-queue"
payload = { "agentId": 123 }
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({agentId: 123})
};
fetch('https://api.bizzy.ai/v1/agents/import-queue', 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.bizzy.ai/v1/agents/import-queue",
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([
'agentId' => 123
]),
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.bizzy.ai/v1/agents/import-queue"
payload := strings.NewReader("{\n \"agentId\": 123\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))
}HttpResponse<String> response = Unirest.post("https://api.bizzy.ai/v1/agents/import-queue")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agentId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bizzy.ai/v1/agents/import-queue")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agentId\": 123\n}"
response = http.request(request)
puts response.read_body{
"sessionId": 3456789,
"agentId": 1234567
}
{
"error": "Agent does not have an API input channel configured. Please configure an API input channel in platform before importing companies."
}
{
"error": "Agent import queue already processing."
}
Agent API
Start Import Queue
POST
/
v1
/
agents
/
import-queue
Start Import Queue
curl --request POST \
--url https://api.bizzy.ai/v1/agents/import-queue \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"agentId": 123
}'import requests
url = "https://api.bizzy.ai/v1/agents/import-queue"
payload = { "agentId": 123 }
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({agentId: 123})
};
fetch('https://api.bizzy.ai/v1/agents/import-queue', 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.bizzy.ai/v1/agents/import-queue",
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([
'agentId' => 123
]),
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.bizzy.ai/v1/agents/import-queue"
payload := strings.NewReader("{\n \"agentId\": 123\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))
}HttpResponse<String> response = Unirest.post("https://api.bizzy.ai/v1/agents/import-queue")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agentId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bizzy.ai/v1/agents/import-queue")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agentId\": 123\n}"
response = http.request(request)
puts response.read_body{
"sessionId": 3456789,
"agentId": 1234567
}
{
"error": "Agent does not have an API input channel configured. Please configure an API input channel in platform before importing companies."
}
{
"error": "Agent import queue already processing."
}
Create a new import queue session for a specific agent. This starts a batch import process that you can add companies to.
Request
Body
number
required
The ID of the agent to import companies into (from the agent overview endpoint)
Response
{
"sessionId": 3456789,
"agentId": 1234567
}
{
"error": "Agent does not have an API input channel configured. Please configure an API input channel in platform before importing companies."
}
{
"error": "Agent import queue already processing."
}
number
The unique identifier for the created import session. Use this ID to add companies and complete the session.
number
The ID of the agent this session belongs to
Prerequisites
Before starting an import queue, ensure:- The agent has an API input channel configured in the Bizzy platform
- No other import queue is currently processing for this agent
Next Steps
After creating a session:- Use the returned
sessionIdto add companies to the queue - When all companies are added, complete the session to trigger processing
Important: Completing a new import session will replace all companies from previous API imports. If you need to retain existing companies, include them in your new import session. See Complete Import Queue for details.
Was this page helpful?