Contents
Schedule shifts
A request to move a task's dates, with a reason. The request is made for the person assigned to the task and waits for a decision; the history stays after the decision.
| Status | Meaning |
|---|---|
pending | Waiting for the project manager. |
approved | Approved: the task now has the new dates, and the reason is kept in the task's history. |
rejected | Rejected, with a note. The task's dates do not change. |
Who decides. The project manager of the task's project. A company admin can decide any shift, and is the only one who can decide a shift without a project or whose project has no manager.
Only tasks can be shifted (shiftable_type: task).
Base URL, authentication and conventions of this API are on the Operations API page.
/schedule-shiftsList schedule shifts
The latest 200 shifts, newest first (not paginated). Permission tasks.view.
Each shift adds can_decide (the caller can approve or reject it now), task (title and priority of
the shifted task) and user_name (the person whose task moves).
Query parameters
statusstringOne ofpendingapprovedrejectedExample:pendinguser_idintegerOnly shifts of this person.
project_idintegerOnly shifts of this project.
mine_to_decideinteger1= onlypendingshifts the caller can decide: of the projects they manage, or all of them for a company admin. Use1or0(trueis refused with422).One of01Example:0
Headers
X-Nucleo-CompanystringThe company's public id (or numeric id). Needed when the token does not name a company and the person belongs to more than one.
Responses
200The shifts.application/json
dataarray of ScheduleShift & objectAttributes of each item
idintegeruser_idintegerThe person assigned to the task.
project_idinteger | nullshiftable_typestringOne oftaskshiftable_idintegerThe task id.
from_starts_onstring (date) | nullfrom_ends_onstring (date)to_starts_onstring (date) | nullto_ends_onstring (date)reasonstringcaused_by_allocation_idinteger | nullOlder shifts only.
statusstringOne ofpendingapprovedrejectedrequested_byinteger | nullUser id of who asked.
decided_byinteger | nulldecided_atstring (date-time) | nulldecision_notestring | nullcreated_atstring (date-time)updated_atstring (date-time)projectobject | nullChild attributes
idintegernamestringproject_manager_idinteger | null
can_decidebooleanThe shift is
pendingand the caller can decide it.taskobject | nullThe shifted task;
nullif it no longer exists.Child attributes
idintegertitlestringprioritystringlowwhen not set.One oflowmediumhigh
user_namestring | nullName of the person whose task moves.
401Missing, expired or refused token.application/json
messagestringrequired
403The person lacks the permission, or cannot enter the company.application/json
messagestringrequired
422Invalid fields.application/json
messagestringrequirederrorsobjectMessages per field.
curl -X GET 'https://api-brain.nucleoplatform.com/api/v1/schedule-shifts?status=pending&mine_to_decide=0' \
-H "Authorization: Bearer $NUCLEO_ACCESS_TOKEN" \
-H 'Accept: application/json'const res = await fetch("https://api-brain.nucleoplatform.com/api/v1/schedule-shifts?status=pending&mine_to_decide=0", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.NUCLEO_ACCESS_TOKEN}`,
Accept: "application/json",
},
});
const data = await res.json();
console.log(res.status, data);<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$response = $client->request('GET', 'https://api-brain.nucleoplatform.com/api/v1/schedule-shifts?status=pending&mine_to_decide=0', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('NUCLEO_ACCESS_TOKEN'),
'Accept' => 'application/json',
],
'http_errors' => false,
]);
echo $response->getStatusCode(), PHP_EOL;
echo $response->getBody();{
"data": [
{
"id": 87,
"user_id": 15,
"project_id": 230,
"shiftable_type": "task",
"shiftable_id": 5120,
"from_starts_on": "2026-11-23",
"from_ends_on": "2026-11-25",
"to_starts_on": "2026-11-26",
"to_ends_on": "2026-11-30",
"reason": "Waiting for the client's copy.",
"caused_by_allocation_id": null,
"status": "pending",
"requested_by": 15,
"decided_by": null,
"decided_at": null,
"decision_note": null,
"created_at": "2026-11-20T09:12:44.000000Z",
"updated_at": "2026-11-20T09:12:44.000000Z",
"project": {
"id": 230,
"name": "Acme — new website",
"project_manager_id": 12
},
"can_decide": true,
"task": {
"id": 5120,
"title": "Homepage layout",
"priority": "high"
},
"user_name": "Giulia Rossi"
}
]
}{
"message": "Unauthenticated."
}{
"message": "string"
}{
"message": "The color field format is invalid.",
"errors": {
"color": [
"The color field format is invalid."
]
}
}/schedule-shiftsRequest a schedule shift
Asks to move a task's dates. The shift is created pending for the person assigned to the task and the
task's project; the current dates are kept in from_starts_on and from_ends_on. Permission
tasks.manage.
A task without a start date keeps none: only its due date moves and to_starts_on is ignored. Without
to_starts_on, the start stays the same.
Headers
X-Nucleo-CompanystringThe company's public id (or numeric id). Needed when the token does not name a company and the person belongs to more than one.
Request bodyapplication/json
shiftable_typestringrequiredOne oftaskshiftable_idintegerrequiredThe task id.
to_starts_onstring (date) | nullNew start date (
YYYY-MM-DD).to_ends_onstring (date)requiredNew due date (
YYYY-MM-DD), not beforeto_starts_on.reasonstringrequiredmin length 3max length 2000
Responses
201The shift,
pending. Only the stored fields are returned: noproject,can_decide,taskoruser_name. application/jsondataScheduleShiftChild attributes
idintegeruser_idintegerThe person assigned to the task.
project_idinteger | nullshiftable_typestringOne oftaskshiftable_idintegerThe task id.
from_starts_onstring (date) | nullfrom_ends_onstring (date)to_starts_onstring (date) | nullto_ends_onstring (date)reasonstringcaused_by_allocation_idinteger | nullOlder shifts only.
statusstringOne ofpendingapprovedrejectedrequested_byinteger | nullUser id of who asked.
decided_byinteger | nulldecided_atstring (date-time) | nulldecision_notestring | nullcreated_atstring (date-time)updated_atstring (date-time)
401Missing, expired or refused token.application/json
messagestringrequired
403The person lacks the permission, or cannot enter the company.application/json
messagestringrequired
404
Item not found.— no task with this id.application/jsonmessagestringrequired
409
A shift for this item is already waiting for approval.application/jsonmessagestringrequired
422Invalid fields, or
The item has no person assigned., orThe new end is before the start: pass the new start too.(the task's current start is afterto_ends_on). application/jsonmessagestringrequirederrorsobjectMessages per field.
curl -X POST https://api-brain.nucleoplatform.com/api/v1/schedule-shifts \
-H "Authorization: Bearer $NUCLEO_ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"shiftable_type": "task",
"shiftable_id": 5120,
"to_starts_on": "2026-11-26",
"to_ends_on": "2026-11-30",
"reason": "Waiting for the client'\''s copy."
}'const res = await fetch("https://api-brain.nucleoplatform.com/api/v1/schedule-shifts", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.NUCLEO_ACCESS_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"shiftable_type": "task",
"shiftable_id": 5120,
"to_starts_on": "2026-11-26",
"to_ends_on": "2026-11-30",
"reason": "Waiting for the client's copy."
}),
});
const data = await res.json();
console.log(res.status, data);<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$response = $client->request('POST', 'https://api-brain.nucleoplatform.com/api/v1/schedule-shifts', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('NUCLEO_ACCESS_TOKEN'),
],
'json' => [
'shiftable_type' => 'task',
'shiftable_id' => 5120,
'to_starts_on' => '2026-11-26',
'to_ends_on' => '2026-11-30',
'reason' => 'Waiting for the client\'s copy.',
],
'http_errors' => false,
]);
echo $response->getStatusCode(), PHP_EOL;
echo $response->getBody();{
"data": {
"id": 1,
"user_id": 1,
"project_id": 1,
"shiftable_type": "task",
"shiftable_id": 1,
"from_starts_on": "2026-10-01",
"from_ends_on": "2026-10-01",
"to_starts_on": "2026-10-01",
"to_ends_on": "2026-10-01",
"reason": "string",
"caused_by_allocation_id": 1,
"status": "pending",
"requested_by": 1,
"decided_by": 1,
"decided_at": "2026-10-01T09:30:00Z",
"decision_note": "string",
"created_at": "2026-10-01T09:30:00Z",
"updated_at": "2026-10-01T09:30:00Z"
}
}{
"message": "Unauthenticated."
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}{
"message": "The color field format is invalid.",
"errors": {
"color": [
"The color field format is invalid."
]
}
}/schedule-shifts/{shift}/approveApprove a schedule shift
Only the project manager of the shift's project or a company admin. The task gets the new dates, and the reason (with the note, if any) is added to the task's schedule history.
Path parameters
shiftintegerrequiredThe shift
id.
Headers
X-Nucleo-CompanystringThe company's public id (or numeric id). Needed when the token does not name a company and the person belongs to more than one.
Request bodyapplication/json
notestring | nullmax length 2000
Responses
200The shift after the decision, with
project(id,name).application/jsondataScheduleShift & objectChild attributes
idintegeruser_idintegerThe person assigned to the task.
project_idinteger | nullshiftable_typestringOne oftaskshiftable_idintegerThe task id.
from_starts_onstring (date) | nullfrom_ends_onstring (date)to_starts_onstring (date) | nullto_ends_onstring (date)reasonstringcaused_by_allocation_idinteger | nullOlder shifts only.
statusstringOne ofpendingapprovedrejectedrequested_byinteger | nullUser id of who asked.
decided_byinteger | nulldecided_atstring (date-time) | nulldecision_notestring | nullcreated_atstring (date-time)updated_atstring (date-time)projectobject | nullChild attributes
idintegernamestring
401Missing, expired or refused token.application/json
messagestringrequired
403
Only the project manager can decide on this shift.application/jsonmessagestringrequired
404Not found in this company.application/json
messagestringrequired
409Not applied:
This shift has already been decided.,The item no longer exists.orThe item dates changed after the shift was proposed: propose it again.application/jsonmessagestringrequired
422Invalid fields.application/json
messagestringrequirederrorsobjectMessages per field.
curl -X POST 'https://api-brain.nucleoplatform.com/api/v1/schedule-shifts/{shift}/approve' \
-H "Authorization: Bearer $NUCLEO_ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"note": "string"
}'const res = await fetch("https://api-brain.nucleoplatform.com/api/v1/schedule-shifts/{shift}/approve", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.NUCLEO_ACCESS_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"note": "string"
}),
});
const data = await res.json();
console.log(res.status, data);<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$response = $client->request('POST', 'https://api-brain.nucleoplatform.com/api/v1/schedule-shifts/{shift}/approve', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('NUCLEO_ACCESS_TOKEN'),
],
'json' => [
'note' => 'string',
],
'http_errors' => false,
]);
echo $response->getStatusCode(), PHP_EOL;
echo $response->getBody();{
"data": {
"id": 1,
"user_id": 1,
"project_id": 1,
"shiftable_type": "task",
"shiftable_id": 1,
"from_starts_on": "2026-10-01",
"from_ends_on": "2026-10-01",
"to_starts_on": "2026-10-01",
"to_ends_on": "2026-10-01",
"reason": "string",
"caused_by_allocation_id": 1,
"status": "pending",
"requested_by": 1,
"decided_by": 1,
"decided_at": "2026-10-01T09:30:00Z",
"decision_note": "string",
"created_at": "2026-10-01T09:30:00Z",
"updated_at": "2026-10-01T09:30:00Z",
"project": {
"id": 1,
"name": "string"
}
}
}{
"message": "Unauthenticated."
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}{
"message": "The color field format is invalid.",
"errors": {
"color": [
"The color field format is invalid."
]
}
}/schedule-shifts/{shift}/rejectReject a schedule shift
Only the project manager of the shift's project or a company admin. A note is required.
Path parameters
shiftintegerrequiredThe shift
id.
Headers
X-Nucleo-CompanystringThe company's public id (or numeric id). Needed when the token does not name a company and the person belongs to more than one.
Request bodyapplication/json
notestringrequiredmax length 2000
Responses
200The shift after the decision, with
project(id,name).application/jsondataScheduleShift & objectChild attributes
idintegeruser_idintegerThe person assigned to the task.
project_idinteger | nullshiftable_typestringOne oftaskshiftable_idintegerThe task id.
from_starts_onstring (date) | nullfrom_ends_onstring (date)to_starts_onstring (date) | nullto_ends_onstring (date)reasonstringcaused_by_allocation_idinteger | nullOlder shifts only.
statusstringOne ofpendingapprovedrejectedrequested_byinteger | nullUser id of who asked.
decided_byinteger | nulldecided_atstring (date-time) | nulldecision_notestring | nullcreated_atstring (date-time)updated_atstring (date-time)projectobject | nullChild attributes
idintegernamestring
401Missing, expired or refused token.application/json
messagestringrequired
403
Only the project manager can decide on this shift.application/jsonmessagestringrequired
404Not found in this company.application/json
messagestringrequired
409
This shift has already been decided.application/jsonmessagestringrequired
422
noteis missing or too long.application/jsonmessagestringrequirederrorsobjectMessages per field.
curl -X POST 'https://api-brain.nucleoplatform.com/api/v1/schedule-shifts/{shift}/reject' \
-H "Authorization: Bearer $NUCLEO_ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"note": "The launch date cannot move."
}'const res = await fetch("https://api-brain.nucleoplatform.com/api/v1/schedule-shifts/{shift}/reject", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.NUCLEO_ACCESS_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"note": "The launch date cannot move."
}),
});
const data = await res.json();
console.log(res.status, data);<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$response = $client->request('POST', 'https://api-brain.nucleoplatform.com/api/v1/schedule-shifts/{shift}/reject', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('NUCLEO_ACCESS_TOKEN'),
],
'json' => [
'note' => 'The launch date cannot move.',
],
'http_errors' => false,
]);
echo $response->getStatusCode(), PHP_EOL;
echo $response->getBody();{
"data": {
"id": 1,
"user_id": 1,
"project_id": 1,
"shiftable_type": "task",
"shiftable_id": 1,
"from_starts_on": "2026-10-01",
"from_ends_on": "2026-10-01",
"to_starts_on": "2026-10-01",
"to_ends_on": "2026-10-01",
"reason": "string",
"caused_by_allocation_id": 1,
"status": "pending",
"requested_by": 1,
"decided_by": 1,
"decided_at": "2026-10-01T09:30:00Z",
"decision_note": "string",
"created_at": "2026-10-01T09:30:00Z",
"updated_at": "2026-10-01T09:30:00Z",
"project": {
"id": 1,
"name": "string"
}
}
}{
"message": "Unauthenticated."
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}{
"message": "The color field format is invalid.",
"errors": {
"color": [
"The color field format is invalid."
]
}
}