Get Widget by ID
curl --request GET \
--url https://api.bland.ai/v1/widget/{id} \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v1/widget/{id}"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v1/widget/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.bland.ai/v1/widget/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.bland.ai/v1/widget/{id}")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/widget/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"status": 200,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"pathway_id": "a0f0d4ed-f5f5-4f16-b3f9-22166594d7a7",
"agent_id": "46f37229-7d12-44be-b343-6e68274cfbea",
"allowed_domains": ["example.com", "subdomain.example.com"],
"messages_per_minute": 10,
"config": {
"theme": "light",
"position": "bottom-right",
"greeting": "Hello! How can I help you today?"
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T12:45:00Z"
},
"errors": null
}
Widgets
Get Widget by ID
Retrieves a specific widget by ID.
GET
/
v1
/
widget
/
{id}
Get Widget by ID
curl --request GET \
--url https://api.bland.ai/v1/widget/{id} \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v1/widget/{id}"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v1/widget/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.bland.ai/v1/widget/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.bland.ai/v1/widget/{id}")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/widget/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"status": 200,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"pathway_id": "a0f0d4ed-f5f5-4f16-b3f9-22166594d7a7",
"agent_id": "46f37229-7d12-44be-b343-6e68274cfbea",
"allowed_domains": ["example.com", "subdomain.example.com"],
"messages_per_minute": 10,
"config": {
"theme": "light",
"position": "bottom-right",
"greeting": "Hello! How can I help you today?"
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T12:45:00Z"
},
"errors": null
}
Headers
string
required
Your API key for authentication.
Path Parameters
string
required
UUID of the widget to retrieve.
Response
number
HTTP status code (200 for success).
object
The widget object containing:
id(string): Widget UUIDpathway_id(string | null): Associated pathway UUIDagent_id(string | null): Associated agent UUID or nullagent_prompt(string | null): Agent prompt used instead of pathwayallowed_domains(string[]): Array of allowed domainsmessages_per_minute(number): Rate limit for messagesconfig(object): Widget configuration objectcreated_at(string): ISO timestampupdated_at(string): ISO timestamp
null
Always null on successful response.
{
"status": 200,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"pathway_id": "a0f0d4ed-f5f5-4f16-b3f9-22166594d7a7",
"agent_id": "46f37229-7d12-44be-b343-6e68274cfbea",
"allowed_domains": ["example.com", "subdomain.example.com"],
"messages_per_minute": 10,
"config": {
"theme": "light",
"position": "bottom-right",
"greeting": "Hello! How can I help you today?"
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T12:45:00Z"
},
"errors": null
}
Docs for agents: llms.txt
Was this page helpful?
⌘I