Skip to main content
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
  ]
}
'
{
  "error": 400,
  "message": "task_name and project_id are required"
}

Overview

Create a new task within a project. Tasks can be assigned to team members, given priorities, and organized into sprints.

Request Body

task_name
string
required
The name of the task.Example: "Implement login feature"
project_id
integer
required
The ID of the project this task belongs to.Example: 123
description
string
Detailed description of the task.Example: "Write comprehensive documentation for all API endpoints"
due_date
string
The due date for the task in UTC (ISO 8601 format).Example: "2025-12-31T23:59:59Z"
assignee
integer
User ID of the person assigned to this task. If not provided, defaults to the logged-in user’s ID.Example: 1
priority
integer
default:"3"
Priority level of the task. You can get the priority list using the priority API.Default: 3 (Medium)Example: 1
sprintIds
array
Array of sprint IDs if you want to create this task under specific sprints.Example: [1, 2]

Response

id
integer
The unique identifier for the newly created task.
task_name
string
The name of the task.
project_id
integer
The ID of the project this task belongs to.
description
string
Detailed description of the task.
due_date
string
The due date for the task in UTC.
assignee
integer
User ID of the person assigned to this task.
priority
integer
Priority level of the task.
created_at
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"
}

Notes

  • Required fields: task_name and project_id must 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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
task_name
string
required

The name of the task

Example:

"Implement login feature"

project_id
integer<int64>
required

The ID of the project this task belongs to

Example:

123

description
string

Detailed description of the task

Example:

"Write comprehensive documentation for all API endpoints"

due_date
string<date-time>

The due date for the task in UTC

Example:

"2025-12-31T23:59:59Z"

assignee
integer<int64>

User ID of the person assigned to this task. Defaults to the logged-in user's ID if not provided.

Example:

1

priority
integer<int64>
default:3

Priority level of the task. You can get priority list using priority API. If not set, it will default to 3 (Medium)

Example:

1

sprintIds
integer<int64>[]

Array of sprint IDs if you want to create this task under specific sprints

Example:
[1, 2]

Response

New task response