Create Custom Component
curl --request POST \
--url https://api.bland.ai/v1/widget/custom_components \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"widget_id": "<string>",
"pathway_id": "<string>",
"pathway_node": "<string>",
"width": "<string>",
"height": "<string>",
"variables": [
"<string>"
],
"iframe_url": "<string>"
}
'import requests
url = "https://api.bland.ai/v1/widget/custom_components"
payload = {
"widget_id": "<string>",
"pathway_id": "<string>",
"pathway_node": "<string>",
"width": "<string>",
"height": "<string>",
"variables": ["<string>"],
"iframe_url": "<string>"
}
headers = {
"authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
widget_id: '<string>',
pathway_id: '<string>',
pathway_node: '<string>',
width: '<string>',
height: '<string>',
variables: ['<string>'],
iframe_url: '<string>'
})
};
fetch('https://api.bland.ai/v1/widget/custom_components', 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/widget/custom_components",
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([
'widget_id' => '<string>',
'pathway_id' => '<string>',
'pathway_node' => '<string>',
'width' => '<string>',
'height' => '<string>',
'variables' => [
'<string>'
],
'iframe_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <authorization>"
],
]);
$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/widget/custom_components"
payload := strings.NewReader("{\n \"widget_id\": \"<string>\",\n \"pathway_id\": \"<string>\",\n \"pathway_node\": \"<string>\",\n \"width\": \"<string>\",\n \"height\": \"<string>\",\n \"variables\": [\n \"<string>\"\n ],\n \"iframe_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
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/widget/custom_components")
.header("authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"widget_id\": \"<string>\",\n \"pathway_id\": \"<string>\",\n \"pathway_node\": \"<string>\",\n \"width\": \"<string>\",\n \"height\": \"<string>\",\n \"variables\": [\n \"<string>\"\n ],\n \"iframe_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/widget/custom_components")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"widget_id\": \"<string>\",\n \"pathway_id\": \"<string>\",\n \"pathway_node\": \"<string>\",\n \"width\": \"<string>\",\n \"height\": \"<string>\",\n \"variables\": [\n \"<string>\"\n ],\n \"iframe_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"created_at": "2025-10-02T21:45:27.633Z",
"updated_at": "2025-10-02T21:45:27.633Z",
"id": "70b56282-8db5-4e26-aad9-098c099fb1db",
"org_id": "99a0d526-6910-4f31-92b8-72834d0827fb",
"widget_id": "7d1a8c0d-5346-4f96-9f5c-d888e273eaf0",
"pathway_id": "05f4b269-e79a-4825-b4cd-7778f782bfad",
"pathway_node": "1",
"width": "100%",
"height": "300px",
"variables": [
"firstName"
],
"iframe_url": "https://widget-custom-components.vercel.app"
}
],
"errors": null
}
Widgets
Create Custom Component
Create a new custom component.
POST
/
v1
/
widget
/
custom_components
Create Custom Component
curl --request POST \
--url https://api.bland.ai/v1/widget/custom_components \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"widget_id": "<string>",
"pathway_id": "<string>",
"pathway_node": "<string>",
"width": "<string>",
"height": "<string>",
"variables": [
"<string>"
],
"iframe_url": "<string>"
}
'import requests
url = "https://api.bland.ai/v1/widget/custom_components"
payload = {
"widget_id": "<string>",
"pathway_id": "<string>",
"pathway_node": "<string>",
"width": "<string>",
"height": "<string>",
"variables": ["<string>"],
"iframe_url": "<string>"
}
headers = {
"authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
widget_id: '<string>',
pathway_id: '<string>',
pathway_node: '<string>',
width: '<string>',
height: '<string>',
variables: ['<string>'],
iframe_url: '<string>'
})
};
fetch('https://api.bland.ai/v1/widget/custom_components', 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/widget/custom_components",
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([
'widget_id' => '<string>',
'pathway_id' => '<string>',
'pathway_node' => '<string>',
'width' => '<string>',
'height' => '<string>',
'variables' => [
'<string>'
],
'iframe_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <authorization>"
],
]);
$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/widget/custom_components"
payload := strings.NewReader("{\n \"widget_id\": \"<string>\",\n \"pathway_id\": \"<string>\",\n \"pathway_node\": \"<string>\",\n \"width\": \"<string>\",\n \"height\": \"<string>\",\n \"variables\": [\n \"<string>\"\n ],\n \"iframe_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
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/widget/custom_components")
.header("authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"widget_id\": \"<string>\",\n \"pathway_id\": \"<string>\",\n \"pathway_node\": \"<string>\",\n \"width\": \"<string>\",\n \"height\": \"<string>\",\n \"variables\": [\n \"<string>\"\n ],\n \"iframe_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/widget/custom_components")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"widget_id\": \"<string>\",\n \"pathway_id\": \"<string>\",\n \"pathway_node\": \"<string>\",\n \"width\": \"<string>\",\n \"height\": \"<string>\",\n \"variables\": [\n \"<string>\"\n ],\n \"iframe_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"created_at": "2025-10-02T21:45:27.633Z",
"updated_at": "2025-10-02T21:45:27.633Z",
"id": "70b56282-8db5-4e26-aad9-098c099fb1db",
"org_id": "99a0d526-6910-4f31-92b8-72834d0827fb",
"widget_id": "7d1a8c0d-5346-4f96-9f5c-d888e273eaf0",
"pathway_id": "05f4b269-e79a-4825-b4cd-7778f782bfad",
"pathway_node": "1",
"width": "100%",
"height": "300px",
"variables": [
"firstName"
],
"iframe_url": "https://widget-custom-components.vercel.app"
}
],
"errors": null
}
Headers
Your API key for authentication.
Body
Widget identifier UUID to associate with the custom component.
Pathway UUID to associate with the custom component.
Pathway node ID to display the custom component on.
Widget width dimension (e.g., “100%”, “500px”).
Widget height dimension (e.g., “300px”, “100%”).
Array of available agent variable names to pass into the custom component iframe URL as query params.
URL for the iframe source.
Response
HTTP status code (200 for success).
id(string): Custom component UUIDorg_id(string): Organization UUIDwidget_id(string): Widget identifier UUIDpathway_id(string): Associated pathway UUIDpathway_node(string): Pathway node ID to display the custom component onwidth(string): Widget width dimensionheight(string): Widget height dimensionvariables(string[]): Array of variable names to pass into the custom component iframe URL as query paramsiframe_url(string): URL for the iframe sourcecreated_at(string): ISO timestampupdated_at(string): ISO timestamp
Always null on successful response.
{
"data": [
{
"created_at": "2025-10-02T21:45:27.633Z",
"updated_at": "2025-10-02T21:45:27.633Z",
"id": "70b56282-8db5-4e26-aad9-098c099fb1db",
"org_id": "99a0d526-6910-4f31-92b8-72834d0827fb",
"widget_id": "7d1a8c0d-5346-4f96-9f5c-d888e273eaf0",
"pathway_id": "05f4b269-e79a-4825-b4cd-7778f782bfad",
"pathway_node": "1",
"width": "100%",
"height": "300px",
"variables": [
"firstName"
],
"iframe_url": "https://widget-custom-components.vercel.app"
}
],
"errors": null
}
Docs for agents: llms.txt
Was this page helpful?
⌘I