Skip to main content
POST
/
{workspaceId}
/
projects
/
{projectName}
/
queues
createQueue
import { IntunedClient } from "@intuned/client";

const intunedClient = new IntunedClient({
  apiKey: "<YOUR_API_KEY_HERE>",
  workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});

async function run() {
  const result = await intunedClient.project.queues.create("my-project", {
    id: "my-sample-queue",
    name: "sample-queue",
    configuration: {
      runMode: "Default",
      retry: {
        maximumAttempts: 3,
      },
      rateLimits: [
        {
          limit: 3,
          duration: "1s",
        },
      ],
    },
    sink: {
      type: "webhook",
      url: "https://webhook.site/1b1b1b1b-1b1b-1b1b-1b1b-1b1b1b1b1b1b",
    },
    authSession: {
      id: "1a1a1a1a-1a1a-1a1a-1a1a-1a1a1a1a1a1a",
    },
    metadata: {
      "meta1": "value1",
      "meta2": "value2",
    },
  });

  // Handle the result
  console.log(result);
}

run();
{
  "id": "my-sample-queue"
}

Authorizations

x-api-key
string
header
required

API Key used to authenticate your requests. How to create one.

Path Parameters

workspaceId
string<uuid>
required

Your workspace ID. How to find it?

projectName
string
required

Your project name. It is the name you provide when creating a project.

Body

application/json

create queue request

configuration
object | null
required

The configuration of the queue. Configure retries, rate limits, execution schedules and waits between items.

id
string

The queue ID. Has to be a valid URL slug.

name
string

The queue name.

sink
object | null

Webhook sink configuration

authSession
object | null

Auth session configurations

metadata
object | null

Additional metadata to associate with the queue. It does not affect the behavior of the queue.

Response

Successfully created

id
string
I