Misc · Todo · Items
List todo items
Lists root todos or the direct children of one todo
Permissions
Send an API key of the organization in the path, using the X-API-Key header.
Permission checks in detail
Required permissions
todoItem.read
Also checked, depending on the request and the records it touches
user.readapiKey.readcontact:member.readcontact:address.readcontact:customer.readcontact:sponsor.readcontact:contributor.readcontact:employee.readcontact:supplier.readcontact.read
Request
Path parameters
-
organizationIdidrequired
Body
Content-Type: application/json
-
parentItemIdidnullable -
topicIdsid[]at most 50 items
-
statusIdsid[]at most 100 items
-
contexts(object)[]at most 100 items
Variant 1: 2 properties
-
typestringrequired -
teamIdidrequired
Variant 2: 2 properties
-
typestringrequired -
eventIdidrequired
Variant 3: 2 properties
-
typestringrequired -
resourceIdidrequired
Variant 4: 2 properties
-
typestringrequired -
conversationIdidrequired
-
-
contextTypesstring[]at most 4 items
teameventresourceconversation -
withoutContextbooleandefault
false -
searchTermstring2–100 characters
-
userFilterstringnullableA stringified json object representing a property filter
-
searchAllLevelsbooleandefault
false -
groupByStatusbooleandefault
false -
offsetintegerat least 0 · default
0 -
cursorobjectnullable -
limitinteger1–20 · default
20 -
returnCountbooleandefault
false -
sortobjectdefault
{"column":"createdAt","order":"desc"}2 properties
-
columnstringrequiredcreatedAttitletopic.nametype.namestatus.labeldueDate -
orderstringrequiredascdesc
-
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
--request POST 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/misc/todo/items/list' \
--header 'X-API-Key: YOUR_API_KEY'const response = await fetch("https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/misc/todo/items/list", {
method: "POST",
headers: {
"X-API-Key": "YOUR_API_KEY"
},
redirect: 'error',
signal: AbortSignal.timeout(30_000),
});
if (!response.ok) throw new Error(`campai HTTP ${response.status}`);
const text = await response.text();
const result = text ? JSON.parse(text) : null;
console.log(JSON.stringify(result, null, 2));<?php
$context = stream_context_create(['http' => [
'method' => 'POST',
'header' => [
'X-API-Key: YOUR_API_KEY',
],
'timeout' => 30,
'follow_location' => 0,
'ignore_errors' => true,
]]);
$text = @file_get_contents('https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/misc/todo/items/list', false, $context);
preg_match('/^HTTP\/\S+ (\d{3})/', $http_response_header[0] ?? '', $match);
$status = (int) ($match[1] ?? 0);
if ($text === false || $status < 200 || $status >= 300) {
throw new RuntimeException("campai HTTP $status (0 means no response)");
}
$result = $text === '' ? null : json_decode($text, true, 512, JSON_THROW_ON_ERROR);
echo json_encode($result, JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR), PHP_EOL;
No request that worked has been recorded yet, so the body is not shown.
Response
200 Successful response
Content-Type: application/json
-
itemsobject[]31 properties
-
_idid -
createdAtstring · date-timenullable -
updatedAtstring · date-timenullable -
removedAtstring · date-timenullable -
createdByobjectnullable -
updatedByobjectnullable -
removedByobjectnullable -
__ignoreTriggersstringnullable -
organizationid -
parentItemidnullable -
childrenCountinteger0–100
-
childrenCompletedCountinteger0–100
-
commentsCountintegerat least 0
-
topicobject4 properties
-
_idid -
namestring1–80 characters
-
identifierstring1–4 characters
-
colorstring22 values
slategrayzincneutralstoneredorangeamberyellowlimegreenemeraldtealcyanskyblueindigovioletpurplefuchsiapinkrose
-
-
typeobject3 properties
-
_idid -
namestring1–80 characters
-
emojistringat most 16 characters
-
-
statusobject4 properties
-
_idid -
labelstring1–80 characters
-
colorstring22 values
slategrayzincneutralstoneredorangeamberyellowlimegreenemeraldtealcyanskyblueindigovioletpurplefuchsiapinkrose -
rolestringregularreviewcompleted
-
-
contextobjectnullableVariant 1: 3 properties
-
typestring -
teamIdidnullable -
namestring1–80 characters
Variant 2: 6 properties
-
typestring -
eventIdidnullable -
namestring1–80 characters
-
seriesIdstringnullableexactly 10 characters
-
fromstring · date-time -
tostring · date-time
Variant 3: 3 properties
-
typestring -
resourceIdidnullable -
namestring1–200 characters
Variant 4: 3 properties
-
typestring -
conversationIdidnullable -
namestring1–200 characters
-
-
projectobjectnullable3 properties
-
_idid -
namestring1–64 characters
-
colorstring22 values
slategrayzincneutralstoneredorangeamberyellowlimegreenemeraldtealcyanskyblueindigovioletpurplefuchsiapinkrose
-
-
sequenceNumberinteger -
titlestring1–140 characters
-
descriptionstring1–10000 characters
-
customFieldsobject of one of 7 types | object of one of 7 types | object (recursive)[] | (one of 7 types)[][]The answers of a form, by the ID of each field. A repeating group holds a list of its entries under its own ID.
-
attachmentCountinteger0–10
-
assigneesobject[]at most 100 items
4 properties
-
idstringexactly 10 characters
-
actorobject -
completedAtstring · date-timenullable -
timeSpentMinutesintegernullableat least 0
-
-
tagsstring[]at most 20 items · each 1–40 characters
-
dueDatestring · date-timenullable -
reviewerobjectnullable4 properties
-
namestring -
typestring -
userIdstring -
imageobjectnullable4 properties
-
resourcestringat least 1 characters
-
fileNamestringat most 128 characters
-
contentTypestringat most 75 characters
-
fileSizeBytesintegerat least 0
-
-
-
reviewsobject[]17 properties
-
_idid -
createdAtstring · date-timenullable -
updatedAtstring · date-timenullable -
removedAtstring · date-timenullable -
createdByobjectnullable -
updatedByobjectnullable -
removedByobjectnullable -
__ignoreTriggersstringnullable -
roundinteger -
reviewerobject4 properties
-
namestring -
typestring -
userIdstring -
imageobjectnullable4 properties
-
resourcestringat least 1 characters
-
fileNamestringat most 128 characters
-
contentTypestringat most 75 characters
-
fileSizeBytesintegerat least 0
-
-
-
requestedAtstring · date-time -
requestedByobject -
workCompletedAtstring · date-time -
decisionstringpendingacceptedrejectedwithdrawn -
decidedAtstring · date-timenullable -
decidedByobjectnullable -
notestringat most 4000 characters
-
-
statusBeforeReviewobjectnullable4 properties
-
_idid -
labelstring1–80 characters
-
colorstring22 values
slategrayzincneutralstoneredorangeamberyellowlimegreenemeraldtealcyanskyblueindigovioletpurplefuchsiapinkrose -
rolestringregularreviewcompleted
-
-
workCompletedAtstring · date-timenullable -
completedAtstring · date-timenullable
-
-
countintegerat least 0
-
nextCursorobjectnullable -
statusGroupsobject[]4 properties
-
statusIdid -
itemsobject[]31 properties
-
_idid -
createdAtstring · date-timenullable -
updatedAtstring · date-timenullable -
removedAtstring · date-timenullable -
createdByobjectnullable -
updatedByobjectnullable -
removedByobjectnullable -
__ignoreTriggersstringnullable -
organizationid -
parentItemidnullable -
childrenCountinteger0–100
-
childrenCompletedCountinteger0–100
-
commentsCountintegerat least 0
-
topicobject4 properties
-
_idid -
namestring1–80 characters
-
identifierstring1–4 characters
-
colorstring22 values
slategrayzincneutralstoneredorangeamberyellowlimegreenemeraldtealcyanskyblueindigovioletpurplefuchsiapinkrose
-
-
typeobject3 properties
-
_idid -
namestring1–80 characters
-
emojistringat most 16 characters
-
-
statusobject4 properties
-
_idid -
labelstring1–80 characters
-
colorstring22 values
slategrayzincneutralstoneredorangeamberyellowlimegreenemeraldtealcyanskyblueindigovioletpurplefuchsiapinkrose -
rolestringregularreviewcompleted
-
-
contextobjectnullableVariant 1: 3 properties
-
typestring -
teamIdidnullable -
namestring1–80 characters
Variant 2: 6 properties
-
typestring -
eventIdidnullable -
namestring1–80 characters
-
seriesIdstringnullableexactly 10 characters
-
fromstring · date-time -
tostring · date-time
Variant 3: 3 properties
-
typestring -
resourceIdidnullable -
namestring1–200 characters
Variant 4: 3 properties
-
typestring -
conversationIdidnullable -
namestring1–200 characters
-
-
projectobjectnullable3 properties
-
_idid -
namestring1–64 characters
-
colorstring22 values
slategrayzincneutralstoneredorangeamberyellowlimegreenemeraldtealcyanskyblueindigovioletpurplefuchsiapinkrose
-
-
sequenceNumberinteger -
titlestring1–140 characters
-
descriptionstring1–10000 characters
-
customFieldsobject of one of 7 types | object of one of 7 types | object (recursive)[] | (one of 7 types)[][]The answers of a form, by the ID of each field. A repeating group holds a list of its entries under its own ID.
-
attachmentCountinteger0–10
-
assigneesobject[]at most 100 items
4 properties
-
idstringexactly 10 characters
-
actorobject -
completedAtstring · date-timenullable -
timeSpentMinutesintegernullableat least 0
-
-
tagsstring[]at most 20 items · each 1–40 characters
-
dueDatestring · date-timenullable -
reviewerobjectnullable4 properties
-
namestring -
typestring -
userIdstring -
imageobjectnullable4 properties
-
resourcestringat least 1 characters
-
fileNamestringat most 128 characters
-
contentTypestringat most 75 characters
-
fileSizeBytesintegerat least 0
-
-
-
reviewsobject[]17 properties
-
_idid -
createdAtstring · date-timenullable -
updatedAtstring · date-timenullable -
removedAtstring · date-timenullable -
createdByobjectnullable -
updatedByobjectnullable -
removedByobjectnullable -
__ignoreTriggersstringnullable -
roundinteger -
reviewerobject4 properties
-
namestring -
typestring -
userIdstring -
imageobjectnullable4 properties
-
resourcestringat least 1 characters
-
fileNamestringat most 128 characters
-
contentTypestringat most 75 characters
-
fileSizeBytesintegerat least 0
-
-
-
requestedAtstring · date-time -
requestedByobject -
workCompletedAtstring · date-time -
decisionstringpendingacceptedrejectedwithdrawn -
decidedAtstring · date-timenullable -
decidedByobjectnullable -
notestringat most 4000 characters
-
-
statusBeforeReviewobjectnullable4 properties
-
_idid -
labelstring1–80 characters
-
colorstring22 values
slategrayzincneutralstoneredorangeamberyellowlimegreenemeraldtealcyanskyblueindigovioletpurplefuchsiapinkrose -
rolestringregularreviewcompleted
-
-
workCompletedAtstring · date-timenullable -
completedAtstring · date-timenullable
-
-
countintegerat least 0
-
nextCursorobjectnullable
-
{
"items": [
{
"_id": "000000000000000000000001",
"organization": "000000000000000000000001",
"parentItem": "000000000000000000000001",
"childrenCount": 0,
"childrenCompletedCount": 0,
"commentsCount": 0,
"topic": {
"_id": "000000000000000000000001",
"name": "string",
"identifier": "string",
"color": "slate"
},
"type": {
"_id": "000000000000000000000001",
"name": "string",
"emoji": "string"
},
"status": {
"_id": "000000000000000000000001",
"label": "string",
"color": "slate",
"role": "regular"
},
"context": {
"type": "team",
"teamId": "000000000000000000000001",
"name": "string"
},
"project": {
"_id": "000000000000000000000001",
"name": "string",
"color": "slate"
},
"sequenceNumber": 1,
"title": "string",
"description": "string",
"customFields": {
"key": "2026-10-22T12:00:00Z"
},
"attachmentCount": 0,
"assignees": [
{
"id": "string",
"actor": {
"name": "string",
"type": "user",
"userId": "string",
"image": {
"resource": "string"
}
},
"completedAt": "2026-06-15T22:30:00Z",
"timeSpentMinutes": 0
}
],
"tags": [
"string"
],
"dueDate": "2026-06-15T22:30:00Z",
"reviewer": {
"name": "string",
"type": "user",
"userId": "string",
"image": {
"resource": "string"
}
},
"reviews": [
{
"_id": "000000000000000000000001",
"round": 1,
"reviewer": {
"name": "string",
"type": "user",
"userId": "string",
"image": {
"resource": "string"
}
},
"requestedAt": "2026-06-15T22:30:00Z",
"requestedBy": {
"name": "string",
"type": "user",
"userId": "string",
"image": {
"resource": "string"
}
},
"workCompletedAt": "2026-06-15T22:30:00Z",
"decision": "pending",
"decidedAt": "2026-06-15T22:30:00Z",
"decidedBy": {
"name": "string",
"type": "user",
"userId": "string",
"image": {
"resource": "string"
}
},
"note": "string"
}
],
"statusBeforeReview": {
"_id": "000000000000000000000001",
"label": "string",
"color": "slate",
"role": "regular"
},
"workCompletedAt": "2026-06-15T22:30:00Z",
"completedAt": "2026-06-15T22:30:00Z"
}
],
"count": 0,
"nextCursor": {
"column": "title",
"value": "string",
"itemId": "000000000000000000000001"
},
"statusGroups": [
{
"statusId": "000000000000000000000001",
"items": [
{
"_id": "000000000000000000000001",
"organization": "000000000000000000000001",
"parentItem": "000000000000000000000001",
"childrenCount": 0,
"childrenCompletedCount": 0,
"commentsCount": 0,
"topic": {
"_id": "000000000000000000000001",
"name": "string",
"identifier": "string",
"color": "slate"
},
"type": {
"_id": "000000000000000000000001",
"name": "string",
"emoji": "string"
},
"status": {
"_id": "000000000000000000000001",
"label": "string",
"color": "slate",
"role": "regular"
},
"context": {
"type": "team",
"teamId": "000000000000000000000001",
"name": "string"
},
"project": {
"_id": "000000000000000000000001",
"name": "string",
"color": "slate"
},
"sequenceNumber": 1,
"title": "string",
"description": "string",
"customFields": {
"key": "2026-10-22T12:00:00Z"
},
"attachmentCount": 0,
"assignees": [
{
"id": "string",
"actor": {
"name": "string",
"type": "user",
"userId": "string",
"image": {
"resource": "string"
}
},
"completedAt": "2026-06-15T22:30:00Z",
"timeSpentMinutes": 0
}
],
"tags": [
"string"
],
"dueDate": "2026-06-15T22:30:00Z",
"reviewer": {
"name": "string",
"type": "user",
"userId": "string",
"image": {
"resource": "string"
}
},
"reviews": [
{
"_id": "000000000000000000000001",
"round": 1,
"reviewer": {
"name": "string",
"type": "user",
"userId": "string",
"image": {
"resource": "string"
}
},
"requestedAt": "2026-06-15T22:30:00Z",
"requestedBy": {
"name": "string",
"type": "user",
"userId": "string",
"image": {
"resource": "string"
}
},
"workCompletedAt": "2026-06-15T22:30:00Z",
"decision": "pending",
"decidedAt": "2026-06-15T22:30:00Z",
"decidedBy": {
"name": "string",
"type": "user",
"userId": "string",
"image": {
"resource": "string"
}
},
"note": "string"
}
],
"statusBeforeReview": {
"_id": "000000000000000000000001",
"label": "string",
"color": "slate",
"role": "regular"
},
"workCompletedAt": "2026-06-15T22:30:00Z",
"completedAt": "2026-06-15T22:30:00Z"
}
],
"count": 0,
"nextCursor": {
"column": "title",
"value": "string",
"itemId": "000000000000000000000001"
}
}
]
}
Errors
No errors of its own are known for this endpoint.
Errors nearly every request can meet are listed under Errors.