Skip to main content
POST
/
api
/
v1
/
task-queues
Create Task Queue
curl --request POST \
  --url https://control-plane.kubiya.ai/api/v1/task-queues \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "display_name": "<string>",
  "description": "<string>",
  "tags": [
    "<string>"
  ],
  "settings": {},
  "priority": 5,
  "policy_ids": [
    "<string>"
  ]
}
'
import requests

url = "https://control-plane.kubiya.ai/api/v1/task-queues"

payload = {
    "name": "<string>",
    "display_name": "<string>",
    "description": "<string>",
    "tags": ["<string>"],
    "settings": {},
    "priority": 5,
    "policy_ids": ["<string>"]
}
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>',
    display_name: '<string>',
    description: '<string>',
    tags: ['<string>'],
    settings: {},
    priority: 5,
    policy_ids: ['<string>']
  })
};

fetch('https://control-plane.kubiya.ai/api/v1/task-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://control-plane.kubiya.ai/api/v1/task-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>',
    'display_name' => '<string>',
    'description' => '<string>',
    'tags' => [
        '<string>'
    ],
    'settings' => [
        
    ],
    'priority' => 5,
    'policy_ids' => [
        '<string>'
    ]
  ]),
  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://control-plane.kubiya.ai/api/v1/task-queues"

	payload := strings.NewReader("{\n  \"name\": \"<string>\",\n  \"display_name\": \"<string>\",\n  \"description\": \"<string>\",\n  \"tags\": [\n    \"<string>\"\n  ],\n  \"settings\": {},\n  \"priority\": 5,\n  \"policy_ids\": [\n    \"<string>\"\n  ]\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://control-plane.kubiya.ai/api/v1/task-queues")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"<string>\",\n  \"display_name\": \"<string>\",\n  \"description\": \"<string>\",\n  \"tags\": [\n    \"<string>\"\n  ],\n  \"settings\": {},\n  \"priority\": 5,\n  \"policy_ids\": [\n    \"<string>\"\n  ]\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://control-plane.kubiya.ai/api/v1/task-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  \"display_name\": \"<string>\",\n  \"description\": \"<string>\",\n  \"tags\": [\n    \"<string>\"\n  ],\n  \"settings\": {},\n  \"priority\": 5,\n  \"policy_ids\": [\n    \"<string>\"\n  ]\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "organization_id": "<string>",
  "name": "<string>",
  "display_name": "<string>",
  "description": "<string>",
  "tags": [
    "<string>"
  ],
  "settings": {},
  "status": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>",
  "created_by": "<string>",
  "priority": 123,
  "policy_ids": [],
  "worker_token": "<string>",
  "provisioning_workflow_id": "<string>",
  "provisioned_at": "<string>",
  "error_message": "<string>",
  "temporal_namespace_id": "<string>",
  "active_workers": 0,
  "idle_workers": 0,
  "busy_workers": 0
}
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Enter your Kubiya API token (format: Bearer )

Body

application/json
name
string
required

Queue name (e.g., default, high-priority)

Required string length: 2 - 100
display_name
string | null

User-friendly display name

description
string | null

Queue description

tags
string[]

Tags for categorization

settings
Settings · object

Queue settings

priority
integer | null

Priority level (1-10)

Required range: 1 <= x <= 10
policy_ids
string[]

OPA policy IDs

Response

Successful Response

id
string
required
organization_id
string
required
name
string
required
display_name
string | null
required
description
string | null
required
tags
string[]
required
settings
Settings · object
required
status
string
required
created_at
string
required
updated_at
string
required
created_by
string | null
required
priority
integer | null
policy_ids
string[]
worker_token
string | null
provisioning_workflow_id
string | null
provisioned_at
string | null
error_message
string | null
temporal_namespace_id
string | null
active_workers
integer
default:0
idle_workers
integer
default:0
busy_workers
integer
default:0