Tasks
Business+Manage tasks and to-dos.
Required scopes:
tasks
Feature flag:
tasks
Endpoints
GET
/api/v1/tasks
List all tasks
GET
/api/v1/tasks/{id}
Retrieve a single task
POST
/api/v1/tasks
Create a new task
PUT/PATCH
/api/v1/tasks/{id}
Update a task
DELETE
/api/v1/tasks/{id}
Delete a task
Query Parameters
| Parameter | Description |
|---|---|
search
|
Search term to filter results |
status
|
Filter by task status |
priority
|
Filter by task priority |
assigned_to
|
Filter by assigned administrator ID |
entity_type
|
Filter by linked entity type |
entity_id
|
Filter by linked entity ID |
overdue
|
Only show overdue tasks (1) |
sort
|
Sort field (title, due_date, priority, status, created_at) |
order
|
Sort direction (ASC or DESC, default: DESC) |
include
|
Include related data (entity) |
Request Schema
| Parameter | Type | Required | Description |
|---|---|---|---|
title
|
string | Yes | Task title |
description
|
string | No | Task description |
status
|
string | No | Status (pending, in_progress, completed, cancelled) |
priority
|
string | No | Priority (urgent, high, normal, low) |
due_date
|
string | No | Due date (ISO 8601 format) |
assigned_to
|
integer | No | ID of assigned administrator |
entity_type
|
string | No | Linked entity type (event, contact, application, etc.) |
entity_id
|
integer | No | ID of the linked entity |
Response Schema
| Field | Type |
|---|---|
id
|
integer |
entity_type
|
string|null |
entity_id
|
integer|null |
assigned_to
|
integer|null |
assigned_to_name
|
string|null |
created_by
|
integer |
created_by_name
|
string|null |
title
|
string |
description
|
string|null |
due_date
|
string|null |
priority
|
string |
status
|
string |
completed_at
|
string|null |
completed_by
|
integer|null |
created_at
|
string |
updated_at
|
string |
Code Examples
curl -X GET "https://your-tenant.plandocket.com/api/v1/tasks" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
<?php
$apiKey = 'YOUR_API_KEY';
$baseUrl = 'https://your-tenant.plandocket.com';
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => $baseUrl . '/api/v1/tasks',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
]);
$response = curl_exec($ch);
$data = json_decode($response, true);
curl_close($ch);
print_r($data);
const apiKey = 'YOUR_API_KEY';
const baseUrl = 'https://your-tenant.plandocket.com';
const response = await fetch(`${baseUrl}/api/v1/tasks`, {
method: 'GET',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);
import requests
api_key = 'YOUR_API_KEY'
base_url = 'https://your-tenant.plandocket.com'
headers = {
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json',
}
response = requests.get(f'{base_url}/api/v1/tasks', headers=headers)
data = response.json()
print(data)
Sample Response
200 OK
{
"data": {
"task_id": 1,
"created_at": 1704067200,
"updated_at": 1704067200
},
"meta": {
"request_id": "req_abc123"
}
}