---
title: Enqueue a job
description: "POST`/projects/{projectId}/jobs` ## Code Samples ```curl curl --request POST \\ --url 'https://api.taskflow.example.com/v2/projects/{projectId}/jobs' \\ --header 'Authorization: Bearer YOUR_TOKEN' \\ --header 'Content-Type: application/json' \\ --data '{ \"kind\": \"string\", \"source_url\": \"https://example.com\" }' const response = await fetch('https://api.taskflow.example.com/v2/projects/{projectId}/jobs', { method: 'POST', headers: { 'Authorization': 'Bearer…"
url: "https://cbotai.shahrear.msf.bd/docs/enqueue-a-job/"
updated: "2026-08-20"
category: hyper active / jobs
---

# Enqueue a job

POST`/projects/{projectId}/jobs`

## Code Samples

```curl

                curl --request POST \
  --url 'https://api.taskflow.example.com/v2/projects/{projectId}/jobs' \
  --header 'Authorization: Bearer YOUR_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "kind": "string",
    "source_url": "https://example.com"
}'

                const response = await fetch('https://api.taskflow.example.com/v2/projects/{projectId}/jobs', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "kind": "string",
    "source_url": "https://example.com"
})
});

const data = await response.json();
console.log(data);

                import requests

headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
}

payload = {
    "kind": "string",
    "source_url": "https://example.com"
}

response = requests.post("https://api.taskflow.example.com/v2/projects/{projectId}/jobs", headers=headers, json=payload)

print(response.json())

                <?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://api.taskflow.example.com/v2/projects/{projectId}/jobs',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => [
  'Authorization: Bearer YOUR_TOKEN',
  'Content-Type: application/json'
  ],
  CURLOPT_POSTFIELDS => '{
    "kind": "string",
    "source_url": "https://example.com"
}',
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;

                using System.Net.Http;
using System.Text;

var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.taskflow.example.com/v2/projects/{projectId}/jobs");
request.Headers.Add("Authorization", "Bearer YOUR_TOKEN");
request.Content = new StringContent(@"{
    ""kind"": ""string"",
    ""source_url"": ""https://example.com""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);

                import java.net.URI;
import java.net.http.*;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.taskflow.example.com/v2/projects/{projectId}/jobs"))
    .header("Authorization", "Bearer YOUR_TOKEN")
    .header("Content-Type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("""
{
    "kind": "string",
    "source_url": "https://example.com"
}
"""))
    .build();

HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

## Response

```json

                {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "kind": "import",
    "status": "queued",
    "progress": 1,
    "error": {
        "code": "string",
        "message": "string"
    }
}
```

## Request Body

Content type: `application/json` — **required**

```json

                {
    "kind": "string",
    "source_url": "https://example.com"
}
```

## Responses

### 202 — Accepted

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string (uuid) | Optional |  |
| `kind` | string | Optional | Allowed: import, export |
| `status` | string | Optional | Allowed: queued, running, done, failed |
| `progress` | number | Optional |  |
| `error` | one of | Optional |  |

```json

                {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "kind": "import",
    "status": "queued",
    "progress": 1,
    "error": {
        "code": "string",
        "message": "string"
    }
}
```
