Start Agent Onboarding
curl --request POST \
--url https://api.bland.ai/v1/agent/onboarding/start \
--header 'Content-Type: application/json' \
--data '
{
"client_name": "<string>"
}
'import requests
url = "https://api.bland.ai/v1/agent/onboarding/start"
payload = { "client_name": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({client_name: '<string>'})
};
fetch('https://api.bland.ai/v1/agent/onboarding/start', 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.bland.ai/v1/agent/onboarding/start",
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([
'client_name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.bland.ai/v1/agent/onboarding/start"
payload := strings.NewReader("{\n \"client_name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.bland.ai/v1/agent/onboarding/start")
.header("Content-Type", "application/json")
.body("{\n \"client_name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/agent/onboarding/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"device_code": "Xk9pQ2mZ...",
"user_code": "BQPL-7VXR",
"verification_url": "https://app.bland.ai/agent-setup",
"verification_url_complete": "https://app.bland.ai/agent-setup?code=BQPL-7VXR",
"expires_in": 900,
"interval": 5
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "FEATURE_DISABLED",
"message": "Agent onboarding is temporarily unavailable."
}
]
}
{
"data": null,
"errors": [
{
"error": "TOO_MANY_REQUESTS",
"message": "Too many requests. Try again later."
}
]
}
Agent Onboarding
Start Agent Onboarding
Start the device-authorization flow a bot uses to get its own Bland API key and phone number. No API key required.
POST
/
v1
/
agent
/
onboarding
/
start
Start Agent Onboarding
curl --request POST \
--url https://api.bland.ai/v1/agent/onboarding/start \
--header 'Content-Type: application/json' \
--data '
{
"client_name": "<string>"
}
'import requests
url = "https://api.bland.ai/v1/agent/onboarding/start"
payload = { "client_name": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({client_name: '<string>'})
};
fetch('https://api.bland.ai/v1/agent/onboarding/start', 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.bland.ai/v1/agent/onboarding/start",
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([
'client_name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.bland.ai/v1/agent/onboarding/start"
payload := strings.NewReader("{\n \"client_name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.bland.ai/v1/agent/onboarding/start")
.header("Content-Type", "application/json")
.body("{\n \"client_name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/agent/onboarding/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"device_code": "Xk9pQ2mZ...",
"user_code": "BQPL-7VXR",
"verification_url": "https://app.bland.ai/agent-setup",
"verification_url_complete": "https://app.bland.ai/agent-setup?code=BQPL-7VXR",
"expires_in": 900,
"interval": 5
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "FEATURE_DISABLED",
"message": "Agent onboarding is temporarily unavailable."
}
]
}
{
"data": null,
"errors": [
{
"error": "TOO_MANY_REQUESTS",
"message": "Too many requests. Try again later."
}
]
}
Overview
No authentication is required for this endpoint, it’s how a bot gets an API key in the first place. See Connect your AI agent for the full flow.Requests are rate-limited globally and per IP. A
429 includes a Retry-After header in seconds.Body Parameters
string
A name for the bot starting the flow, shown to the owner during signup so they know what’s asking. Max length
64. Allowed characters: letters, numbers, spaces, and ._/-.Response
object
Device and user codes for the flow.
string
Opaque code your bot polls with at
/v1/agent/onboarding/poll. Keep this private.string
Short code to show the owner. They enter this at
verification_url if it isn’t already pre-filled.string
The page where the owner completes signup, without the code embedded.
string
The same page with
user_code pre-filled. Prefer this when you can show a clickable link.number
Seconds until the codes expire (
900, 15 minutes).number
Minimum seconds to wait between calls to
/poll.null | array
null on success.{
"data": {
"device_code": "Xk9pQ2mZ...",
"user_code": "BQPL-7VXR",
"verification_url": "https://app.bland.ai/agent-setup",
"verification_url_complete": "https://app.bland.ai/agent-setup?code=BQPL-7VXR",
"expires_in": 900,
"interval": 5
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "FEATURE_DISABLED",
"message": "Agent onboarding is temporarily unavailable."
}
]
}
{
"data": null,
"errors": [
{
"error": "TOO_MANY_REQUESTS",
"message": "Too many requests. Try again later."
}
]
}
Docs for agents: llms.txt
Was this page helpful?