Use these endpoints, parameters, and response formats to work with project tasks.
Overview
- Base URL:
/api/v1/tasks - Authorization: send the
Authorization: Bearer: <api_token>header with the token issued in your SerpHunt account. - Permissions: access is checked against the resource
project.tasks(viewfor reading,create/edit/dropfor changes). - Date format:
YYYY-MM-DD.
Successful response
{
"status": "ok",
"data": ...
}
Error response
{
"status": "error",
"message": "..."
}
1. List tasks
Lists project tasks with filters and pagination.
GET /api/v1/tasks
Parameters (query)
| Name | Type | Required | Description |
|---|---|---|---|
| projectId | number | yes | Project ID |
| id | number | no | Task ID |
| statusId | number | no | Task status ID |
| objectTypeId | number | no | Object type ID (project/section/page/keyword/link) |
| assignedToId | number | no | Assignee ID |
| objectId | number | no | ID of the object to which the task is linked |
| limit | number | no | Record limit, default 100 |
| offset | number | no | Default offset 0 |
Filters statusId / objectTypeId / assignedToId are numeric identifiers. The corresponding fields status / objectType / assignedTo in the response are returned as strings.
Response (data)
| Field | Type | Description |
|---|---|---|
| total | number | Total tasks matching the filter |
| tasks | array | Task array (see below) |
Task fields:
| Field | Type | Description |
|---|---|---|
| id | number | Task ID |
| name | string | Name |
| description | string | Description in Markdown, up to 5,000 characters |
| commentsCount | number | Number of comments on the task |
| deadline | string | Deadline (YYYY-MM-DD, or null) |
| outdated | boolean | Whether the task is overdue |
| deadlineWeek | number | Deadline week number |
| doneAt | string | Completion date (YYYY-MM-DD, or null) |
| assignedTo | string | Assignee name |
| createdBy | string | Name of the author |
| status | string | Localized status name |
| estimateTime | number | Estimated time |
| usedTime | number | The actual time spent |
| objectType | string | Name of object type |
| objectName | string | Object name (project, section, page, keyword, or link) |
| objectId | number | Object ID |
| objectURL | string | Object URL |
| createdAt | string | Creation date |
| updatedAt | string | Update date |
Example
curl "https://.../api/v1/tasks?projectId=1445&statusId=1&limit=50" \
-H "Authorization: Bearer: <token>"
Response
{
"status": "ok",
"data": {
"total": 1,
"tasks": [
{
"id": 15,
"name": "Update meta tags",
"description": null,
"commentsCount": 0,
"deadline": "2026-11-20",
"outdated": false,
"deadlineWeek": 47,
"doneAt": null,
"assignedTo": "Ivan Ivanov",
"createdBy": "Pavel Kopkov",
"status": "In progress",
"estimateTime": 2,
"usedTime": 0,
"objectType": "Page",
"objectName": "/catalog/",
"objectId": 231,
"objectURL": "https://example.ru/catalog/",
"createdAt": "2026-11-16",
"updatedAt": "2026-11-16"
}
]
}
}
2. Create a task
Creates a task. If you send the array objectIds, one task is created for each object.
POST /api/v1/tasks/create
Parameters (body, JSON)
| Name | Type | Required | Description |
|---|---|---|---|
| projectId | number | yes | Project ID |
| name | string | yes | Task name |
| status | number | yes | Status ID (see section /tasks/statuses) |
| description | string | no | Description in Markdown, up to 5,000 characters |
| objectType | number | no | Object type ID (see section /tasks/object-types) |
| objectIds | array | no | Object IDs, one task per object |
| assignedTo | number | no | Assignee ID (see section /tasks/assignees) |
| deadline | string | no | Deadline, YYYY-MM-DD |
| doneAt | string | no | Completion date, YYYY-MM-DD |
| estimateTime | number | no | Estimated time |
| usedTime | number | no | Actual time spent |
The task is created on behalf of the current user (field createdBy).
Response (data)
{
"created": true
}
Please note: id is omitted from the response. Find the new task using GET /tasks (e.g. by name and the creation date).
Example
curl -X POST "https://.../api/v1/tasks/create" \
-H "Authorization: Bearer: <token>" \
-H "Content-Type: application/json" \
-d '{"projectId": 1445, "name": "Update meta tags", "status": 1, "objectIds": [231], "deadline": "2026-11-20"}'
3. Update a task
PUT /api/v1/tasks/update
Parameters (body, JSON)
| Name | Type | Required | Description |
|---|---|---|---|
| projectId | number | yes | Project ID (the task must belong to this project) |
| taskId | number | yes | Task ID |
| name | string | no | Name |
| description | string | no | Description in Markdown, up to 5,000 characters |
| objectType | number | no | Identifier |
| objectId | number | no | Object ID |
| status | number | no | Status ID |
| assignedTo | number | no | Assignee ID |
| deadline | string | no | Deadline, YYYY-MM-DD |
| doneAt | string | no | Completion date, YYYY-MM-DD |
| estimateTime | number | no | Estimated time |
| usedTime | number | no | Actual time spent |
| saveAsCopy | boolean | no | Save a copy of the task (default false) |
If the task is missing or does not belong to the supplied projectId, the endpoint returns 404 (Task not found).
Response (data)
{
"updated": true
}
Field updated — boolean: true if the task was updated, or false if no fields changed.
4. Delete tasks
Soft-deletes one or more project tasks.
DELETE /api/v1/tasks/drop
Parameters (body, JSON)
| Name | Type | Required | Description |
|---|---|---|---|
| projectId | number | yes | Project ID |
| tasks | array | yes | Array of task IDs to delete |
If any of the tasks do not belong to the supplied projectId, the endpoint returns 400 and no tasks are removed.
Response (data)
{
"dropped": true
}
5. Task status reference
GET /api/v1/tasks/statuses
Parameters (query)
| Name | Type | Required | Description |
|---|---|---|---|
| projectId | number | yes | Project ID |
Response (data) — array of objects
| Field | Type | Description |
|---|---|---|
| id | number | Status ID |
| name | string | Title (localized) |
| code | string | Status code |
| sort | number | Sort order |
6. Object type reference
GET /api/v1/tasks/object-types
Parameters (query)
| Name | Type | Required | Description |
|---|---|---|---|
| projectId | number | yes | Project ID |
Response (data) — array of objects
| Field | Type | Description |
|---|---|---|
| id | number | Identifier |
| name | string | Title (localized) |
| code | string | Type code (project / section / page / keyword / link) |
The internal object type with id = 4 is omitted from the response.
7. Assignee reference
Project users available for assignment to tasks.
GET /api/v1/tasks/assignees
Parameters (query)
| Name | Type | Required | Description |
|---|---|---|---|
| projectId | number | yes | Project ID |
Response (data) — array of objects
| Field | Type | Description |
|---|---|---|
| id | number | User ID |
| name | string | Name |
| role | string | Role in the project |
8. Task comments
Lists task comments. Text is displayed as Markdown and supports up to 5,000 characters.
- Base URL:
/api/v1/task-comments - Permissions: reading requires
project.tasks.viewand creating requiresproject.tasks.edit. Only the author or a super administrator may edit or delete a comment (host-admin).
8.1. List of comments
GET /api/v1/task-comments
Parameters (query)
| Name | Type | Required | Description |
|---|---|---|---|
| projectId | number | yes | Project ID |
| taskId | number | yes | Task ID |
| limit | number | no | Record limit, default 1000 |
| offset | number | no | Default offset 0 |
Response (data)
{
"status": "ok",
"data": {
"comments": [
{
"id": 1,
"taskId": 5,
"authorId": 1,
"author": "Ivan Ivanov",
"text": "**Done**, please review",
"createdAt": "2026-11-22 11:46:19",
"updatedAt": "2026-11-22 11:46:19"
}
],
"total": 1
}
}
8.2. Create a comment
POST /api/v1/task-comments/create
Parameters (body, JSON)
| Name | Type | Required | Description |
|---|---|---|---|
| projectId | number | yes | Project ID |
| taskId | number | yes | Task ID |
| text | string | yes | Markdown comment text, up to 5,000 characters |
Response (data) Created comment, in the format shown in section 8.1.
8.3. Update a comment
PUT /api/v1/task-comments/update
Parameters (body, JSON)
| Name | Type | Required | Description |
|---|---|---|---|
| projectId | number | yes | Project ID |
| commentId | number | yes | ID of the comment |
| text | string | yes | New comment text in Markdown, up to 5,000 characters |
Response (data) Updated comment, in the format shown in section 8.1.
Only the author can edit a comment. A super administrator (host-admin) can edit any comment.
8.4. Delete comments
DELETE /api/v1/task-comments/drop
Parameters (body, JSON)
| Name | Type | Required | Description |
|---|---|---|---|
| projectId | number | yes | Project ID |
| comments | array | yes | Array of comment IDs |
Soft deletion sets deleted_at and removes the comment from the returned list. Only the author can delete it. A super administrator (host-admin) can delete any comment.
{
"status": "ok",
"data": {"dropped": true}
}