Create a new task
curl --request POST \
--url https://app.thareja.ai/api/v3/task/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"task_name": "Implement login feature",
"project_id": 123,
"description": "Write comprehensive documentation for all API endpoints",
"due_date": "2025-12-31T23:59:59Z",
"assignee": 1,
"priority": 1,
"sprintIds": [
1,
2
]
}
'import requests
url = "https://app.thareja.ai/api/v3/task/create"
payload = {
"task_name": "Implement login feature",
"project_id": 123,
"description": "Write comprehensive documentation for all API endpoints",
"due_date": "2025-12-31T23:59:59Z",
"assignee": 1,
"priority": 1,
"sprintIds": [1, 2]
}
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({
task_name: 'Implement login feature',
project_id: 123,
description: 'Write comprehensive documentation for all API endpoints',
due_date: '2025-12-31T23:59:59Z',
assignee: 1,
priority: 1,
sprintIds: [1, 2]
})
};
fetch('https://app.thareja.ai/api/v3/task/create', 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://app.thareja.ai/api/v3/task/create",
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([
'task_name' => 'Implement login feature',
'project_id' => 123,
'description' => 'Write comprehensive documentation for all API endpoints',
'due_date' => '2025-12-31T23:59:59Z',
'assignee' => 1,
'priority' => 1,
'sprintIds' => [
1,
2
]
]),
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://app.thareja.ai/api/v3/task/create"
payload := strings.NewReader("{\n \"task_name\": \"Implement login feature\",\n \"project_id\": 123,\n \"description\": \"Write comprehensive documentation for all API endpoints\",\n \"due_date\": \"2025-12-31T23:59:59Z\",\n \"assignee\": 1,\n \"priority\": 1,\n \"sprintIds\": [\n 1,\n 2\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://app.thareja.ai/api/v3/task/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"task_name\": \"Implement login feature\",\n \"project_id\": 123,\n \"description\": \"Write comprehensive documentation for all API endpoints\",\n \"due_date\": \"2025-12-31T23:59:59Z\",\n \"assignee\": 1,\n \"priority\": 1,\n \"sprintIds\": [\n 1,\n 2\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.thareja.ai/api/v3/task/create")
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 \"task_name\": \"Implement login feature\",\n \"project_id\": 123,\n \"description\": \"Write comprehensive documentation for all API endpoints\",\n \"due_date\": \"2025-12-31T23:59:59Z\",\n \"assignee\": 1,\n \"priority\": 1,\n \"sprintIds\": [\n 1,\n 2\n ]\n}"
response = http.request(request)
puts response.read_body{
"error": 400,
"message": "task_name and project_id are required"
}
{
"error": 400,
"message": "Project with ID 123 does not exist"
}
{
"error": 401,
"message": "Invalid or missing authentication token"
}
{
"error": 404,
"message": "Assignee user not found"
}
Tasks
Create Task
Creates a new task in the project
POST
/
api
/
v3
/
task
/
create
Create a new task
curl --request POST \
--url https://app.thareja.ai/api/v3/task/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"task_name": "Implement login feature",
"project_id": 123,
"description": "Write comprehensive documentation for all API endpoints",
"due_date": "2025-12-31T23:59:59Z",
"assignee": 1,
"priority": 1,
"sprintIds": [
1,
2
]
}
'import requests
url = "https://app.thareja.ai/api/v3/task/create"
payload = {
"task_name": "Implement login feature",
"project_id": 123,
"description": "Write comprehensive documentation for all API endpoints",
"due_date": "2025-12-31T23:59:59Z",
"assignee": 1,
"priority": 1,
"sprintIds": [1, 2]
}
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({
task_name: 'Implement login feature',
project_id: 123,
description: 'Write comprehensive documentation for all API endpoints',
due_date: '2025-12-31T23:59:59Z',
assignee: 1,
priority: 1,
sprintIds: [1, 2]
})
};
fetch('https://app.thareja.ai/api/v3/task/create', 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://app.thareja.ai/api/v3/task/create",
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([
'task_name' => 'Implement login feature',
'project_id' => 123,
'description' => 'Write comprehensive documentation for all API endpoints',
'due_date' => '2025-12-31T23:59:59Z',
'assignee' => 1,
'priority' => 1,
'sprintIds' => [
1,
2
]
]),
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://app.thareja.ai/api/v3/task/create"
payload := strings.NewReader("{\n \"task_name\": \"Implement login feature\",\n \"project_id\": 123,\n \"description\": \"Write comprehensive documentation for all API endpoints\",\n \"due_date\": \"2025-12-31T23:59:59Z\",\n \"assignee\": 1,\n \"priority\": 1,\n \"sprintIds\": [\n 1,\n 2\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://app.thareja.ai/api/v3/task/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"task_name\": \"Implement login feature\",\n \"project_id\": 123,\n \"description\": \"Write comprehensive documentation for all API endpoints\",\n \"due_date\": \"2025-12-31T23:59:59Z\",\n \"assignee\": 1,\n \"priority\": 1,\n \"sprintIds\": [\n 1,\n 2\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.thareja.ai/api/v3/task/create")
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 \"task_name\": \"Implement login feature\",\n \"project_id\": 123,\n \"description\": \"Write comprehensive documentation for all API endpoints\",\n \"due_date\": \"2025-12-31T23:59:59Z\",\n \"assignee\": 1,\n \"priority\": 1,\n \"sprintIds\": [\n 1,\n 2\n ]\n}"
response = http.request(request)
puts response.read_body{
"error": 400,
"message": "task_name and project_id are required"
}
{
"error": 400,
"message": "Project with ID 123 does not exist"
}
{
"error": 401,
"message": "Invalid or missing authentication token"
}
{
"error": 404,
"message": "Assignee user not found"
}
Overview
Create a new task within a project. Tasks can be assigned to team members, given priorities, and organized into sprints.Request Body
string
required
The name of the task.Example:
"Implement login feature"integer
required
The ID of the project this task belongs to.Example:
123string
Detailed description of the task.Example:
"Write comprehensive documentation for all API endpoints"string
The due date for the task in UTC (ISO 8601 format).Example:
"2025-12-31T23:59:59Z"integer
User ID of the person assigned to this task. If not provided, defaults to the logged-in user’s ID.Example:
1integer
default:"3"
Priority level of the task. You can get the priority list using the priority API.Default:
3 (Medium)Example: 1array
Array of sprint IDs if you want to create this task under specific sprints.Example:
[1, 2]Response
integer
The unique identifier for the newly created task.
string
The name of the task.
integer
The ID of the project this task belongs to.
string
Detailed description of the task.
string
The due date for the task in UTC.
integer
User ID of the person assigned to this task.
integer
Priority level of the task.
string
The timestamp when the task was created (ISO 8601 format).
Example Request
curl --request POST \
--url https://app.thareja.ai/api/v3/task/create \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"task_name": "Implement login feature",
"project_id": 123,
"description": "Write comprehensive documentation for all API endpoints",
"due_date": "2025-12-31T23:59:59Z",
"assignee": 1,
"priority": 1,
"sprintIds": [1, 2]
}'
Example Response
{
"id": 456,
"task_name": "Implement login feature",
"project_id": 123,
"description": "Write comprehensive documentation for all API endpoints",
"due_date": "2025-12-31T23:59:59Z",
"assignee": 1,
"priority": 1,
"sprint_ids": [1, 2],
"created_at": "2025-11-28T10:30:00Z"
}
Error Responses
{
"error": 400,
"message": "task_name and project_id are required"
}
{
"error": 400,
"message": "Project with ID 123 does not exist"
}
{
"error": 401,
"message": "Invalid or missing authentication token"
}
{
"error": 404,
"message": "Assignee user not found"
}
Notes
- Required fields:
task_nameandproject_idmust be provided - Default assignee: If no assignee is specified, the task will be assigned to the logged-in user
- Default priority: If no priority is specified, it defaults to 3 (Medium)
- Sprint assignment: Tasks can be assigned to multiple sprints simultaneously
- Priority levels: Use the priority API endpoint to get the complete list of available priority levels
- Date format: All dates should be in ISO 8601 format (UTC timezone)
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The name of the task
Example:
"Implement login feature"
The ID of the project this task belongs to
Example:
123
Detailed description of the task
Example:
"Write comprehensive documentation for all API endpoints"
The due date for the task in UTC
Example:
"2025-12-31T23:59:59Z"
User ID of the person assigned to this task. Defaults to the logged-in user's ID if not provided.
Example:
1
Priority level of the task. You can get priority list using priority API. If not set, it will default to 3 (Medium)
Example:
1
Array of sprint IDs if you want to create this task under specific sprints
Example:
[1, 2]
Response
New task response