curl --request POST \
--url https://api.lithoblocks.com/v1/queues \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"execution_config": {},
"destination": {
"channel_id": "<string>"
},
"description": "<string>",
"credit_cost": 1,
"is_active": true
}
'import requests
url = "https://api.lithoblocks.com/v1/queues"
payload = {
"name": "<string>",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"execution_config": {},
"destination": { "channel_id": "<string>" },
"description": "<string>",
"credit_cost": 1,
"is_active": True
}
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({
name: '<string>',
template_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
execution_config: {},
destination: {channel_id: '<string>'},
description: '<string>',
credit_cost: 1,
is_active: true
})
};
fetch('https://api.lithoblocks.com/v1/queues', 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.lithoblocks.com/v1/queues",
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([
'name' => '<string>',
'template_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'execution_config' => [
],
'destination' => [
'channel_id' => '<string>'
],
'description' => '<string>',
'credit_cost' => 1,
'is_active' => true
]),
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.lithoblocks.com/v1/queues"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"execution_config\": {},\n \"destination\": {\n \"channel_id\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"credit_cost\": 1,\n \"is_active\": true\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.lithoblocks.com/v1/queues")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"execution_config\": {},\n \"destination\": {\n \"channel_id\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"credit_cost\": 1,\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lithoblocks.com/v1/queues")
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 \"name\": \"<string>\",\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"execution_config\": {},\n \"destination\": {\n \"channel_id\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"credit_cost\": 1,\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"template_id": "<string>",
"template_version_id": "<string>",
"execution_mode": "fixed_interval",
"execution_config": {},
"destination": {
"channel_id": "<string>"
},
"aggregation_config": {
"item_mapping": {},
"aggregate_mapping": {},
"items_key": "<string>"
},
"credit_cost": 123,
"is_active": true,
"created_at": "<string>",
"updated_at": "<string>",
"pending_event_count": 123,
"active_batch": {
"id": "<string>",
"status": "collecting",
"event_count": 123,
"window_start": "<string>",
"window_end": "<string>",
"created_at": "<string>",
"processed_at": "<string>",
"error_message": "<string>"
}
}{
"error": "<string>",
"code": "unauthenticated",
"request_id": "<string>",
"message": "<string>",
"details": "<string>",
"error_details": "<string>",
"success": false,
"valid": false,
"required_scopes": [
"<string>"
],
"user_scopes": [
"<string>"
]
}{
"error": "<string>",
"code": "unauthenticated",
"request_id": "<string>",
"message": "<string>",
"details": "<string>",
"error_details": "<string>",
"success": false,
"valid": false,
"required_scopes": [
"<string>"
],
"user_scopes": [
"<string>"
]
}{
"error": "<string>",
"code": "unauthenticated",
"request_id": "<string>",
"message": "<string>",
"details": "<string>",
"error_details": "<string>",
"success": false,
"valid": false,
"required_scopes": [
"<string>"
],
"user_scopes": [
"<string>"
]
}{
"error": "<string>",
"code": "unauthenticated",
"request_id": "<string>",
"message": "<string>",
"details": "<string>",
"error_details": "<string>",
"success": false,
"valid": false,
"required_scopes": [
"<string>"
],
"user_scopes": [
"<string>"
]
}{
"success": false,
"error": {
"issues": [
{
"code": "<string>",
"path": [
"<string>"
],
"message": "<string>"
}
],
"name": "<string>"
},
"message": "<string>",
"code": "validation_failed",
"request_id": "<string>"
}{
"error": "<string>",
"code": "unauthenticated",
"request_id": "<string>",
"message": "<string>",
"details": "<string>",
"error_details": "<string>",
"success": false,
"valid": false,
"required_scopes": [
"<string>"
],
"user_scopes": [
"<string>"
]
}Create a queue
A batching policy: events pushed to it are collected into batches and sent as one message per batch, aggregated by aggregation_config. The organization’s tier caps how many active queues it may have and which execution modes it may use; the database enforces both and the message says which.
curl --request POST \
--url https://api.lithoblocks.com/v1/queues \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"execution_config": {},
"destination": {
"channel_id": "<string>"
},
"description": "<string>",
"credit_cost": 1,
"is_active": true
}
'import requests
url = "https://api.lithoblocks.com/v1/queues"
payload = {
"name": "<string>",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"execution_config": {},
"destination": { "channel_id": "<string>" },
"description": "<string>",
"credit_cost": 1,
"is_active": True
}
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({
name: '<string>',
template_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
execution_config: {},
destination: {channel_id: '<string>'},
description: '<string>',
credit_cost: 1,
is_active: true
})
};
fetch('https://api.lithoblocks.com/v1/queues', 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.lithoblocks.com/v1/queues",
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([
'name' => '<string>',
'template_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'execution_config' => [
],
'destination' => [
'channel_id' => '<string>'
],
'description' => '<string>',
'credit_cost' => 1,
'is_active' => true
]),
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.lithoblocks.com/v1/queues"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"execution_config\": {},\n \"destination\": {\n \"channel_id\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"credit_cost\": 1,\n \"is_active\": true\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.lithoblocks.com/v1/queues")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"execution_config\": {},\n \"destination\": {\n \"channel_id\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"credit_cost\": 1,\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lithoblocks.com/v1/queues")
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 \"name\": \"<string>\",\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"execution_config\": {},\n \"destination\": {\n \"channel_id\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"credit_cost\": 1,\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"template_id": "<string>",
"template_version_id": "<string>",
"execution_mode": "fixed_interval",
"execution_config": {},
"destination": {
"channel_id": "<string>"
},
"aggregation_config": {
"item_mapping": {},
"aggregate_mapping": {},
"items_key": "<string>"
},
"credit_cost": 123,
"is_active": true,
"created_at": "<string>",
"updated_at": "<string>",
"pending_event_count": 123,
"active_batch": {
"id": "<string>",
"status": "collecting",
"event_count": 123,
"window_start": "<string>",
"window_end": "<string>",
"created_at": "<string>",
"processed_at": "<string>",
"error_message": "<string>"
}
}{
"error": "<string>",
"code": "unauthenticated",
"request_id": "<string>",
"message": "<string>",
"details": "<string>",
"error_details": "<string>",
"success": false,
"valid": false,
"required_scopes": [
"<string>"
],
"user_scopes": [
"<string>"
]
}{
"error": "<string>",
"code": "unauthenticated",
"request_id": "<string>",
"message": "<string>",
"details": "<string>",
"error_details": "<string>",
"success": false,
"valid": false,
"required_scopes": [
"<string>"
],
"user_scopes": [
"<string>"
]
}{
"error": "<string>",
"code": "unauthenticated",
"request_id": "<string>",
"message": "<string>",
"details": "<string>",
"error_details": "<string>",
"success": false,
"valid": false,
"required_scopes": [
"<string>"
],
"user_scopes": [
"<string>"
]
}{
"error": "<string>",
"code": "unauthenticated",
"request_id": "<string>",
"message": "<string>",
"details": "<string>",
"error_details": "<string>",
"success": false,
"valid": false,
"required_scopes": [
"<string>"
],
"user_scopes": [
"<string>"
]
}{
"success": false,
"error": {
"issues": [
{
"code": "<string>",
"path": [
"<string>"
],
"message": "<string>"
}
],
"name": "<string>"
},
"message": "<string>",
"code": "validation_failed",
"request_id": "<string>"
}{
"error": "<string>",
"code": "unauthenticated",
"request_id": "<string>",
"message": "<string>",
"details": "<string>",
"error_details": "<string>",
"success": false,
"valid": false,
"required_scopes": [
"<string>"
],
"user_scopes": [
"<string>"
]
}Authorizations
LithoBlocks API key obtained from your organization dashboard. The LithoBlocks MCP server also presents a Supabase-issued user session token here on the user's behalf; such a token acts as that user with the scopes their organization role allows.
Body
The queue
1 - 255fixed_interval, rolling_window, fixed_volume Canonical keys per execution_mode: fixed_interval → { interval_minutes }; rolling_window → { window_minutes }; fixed_volume → { event_threshold, max_wait_minutes }
Show child attributes
Show child attributes
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
2000How the batch's events become one template data; omitted, the template receives { items: [event, …] }
Show child attributes
Show child attributes
1 <= x <= 100Response
Created
fixed_interval, rolling_window, fixed_volume Canonical keys per execution_mode: fixed_interval → { interval_minutes }; rolling_window → { window_minutes }; fixed_volume → { event_threshold, max_wait_minutes }
Show child attributes
Show child attributes
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Events waiting in the open batch
Show child attributes
Show child attributes

