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.

StatusMeaning
pendingWaiting for the project manager.
approvedApproved: the task now has the new dates, and the reason is kept in the task's history.
rejectedRejected, 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.

get/schedule-shifts

List 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).

GET https://api-brain.nucleoplatform.com/api/v1/schedule-shifts
Authentication: Bearer token

Query parameters

  • statusstring
    One ofpendingapprovedrejected
    Example: pending
  • user_idinteger

    Only shifts of this person.

  • project_idinteger

    Only shifts of this project.

  • mine_to_decideinteger

    1 = only pending shifts the caller can decide: of the projects they manage, or all of them for a company admin. Use 1 or 0 (true is refused with 422).

    One of01
    Example: 0

Headers

  • X-Nucleo-Companystring

    The 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.
    • dataarray of ScheduleShift & object
      Attributes of each item
      • idinteger
      • user_idinteger

        The person assigned to the task.

      • project_idinteger | null
      • shiftable_typestring
        One oftask
      • shiftable_idinteger

        The task id.

      • from_starts_onstring (date) | null
      • from_ends_onstring (date)
      • to_starts_onstring (date) | null
      • to_ends_onstring (date)
      • reasonstring
      • caused_by_allocation_idinteger | null

        Older shifts only.

      • statusstring
        One ofpendingapprovedrejected
      • requested_byinteger | null

        User id of who asked.

      • decided_byinteger | null
      • decided_atstring (date-time) | null
      • decision_notestring | null
      • created_atstring (date-time)
      • updated_atstring (date-time)
      • projectobject | null
        Child attributes
        • idinteger
        • namestring
        • project_manager_idinteger | null
      • can_decideboolean

        The shift is pending and the caller can decide it.

      • taskobject | null

        The shifted task; null if it no longer exists.

        Child attributes
        • idinteger
        • titlestring
        • prioritystring

          low when not set.

          One oflowmediumhigh
      • user_namestring | null

        Name of the person whose task moves.

  • 401Missing, expired or refused token.
    • messagestringrequired
  • 403The person lacks the permission, or cannot enter the company.
    • messagestringrequired
  • 422Invalid fields.
    • messagestringrequired
    • errorsobject

      Messages per field.

Request
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'
Response
{
  "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"
    }
  ]
}
post/schedule-shifts

Request 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.

POST https://api-brain.nucleoplatform.com/api/v1/schedule-shifts
Authentication: Bearer token

Headers

  • X-Nucleo-Companystring

    The 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_typestringrequired
    One oftask
  • shiftable_idintegerrequired

    The task id.

  • to_starts_onstring (date) | null

    New start date (YYYY-MM-DD).

  • to_ends_onstring (date)required

    New due date (YYYY-MM-DD), not before to_starts_on.

  • reasonstringrequired
    min length 3max length 2000

Responses

  • 201The shift, pending. Only the stored fields are returned: no project, can_decide, task or user_name.
    • dataScheduleShift
      Child attributes
      • idinteger
      • user_idinteger

        The person assigned to the task.

      • project_idinteger | null
      • shiftable_typestring
        One oftask
      • shiftable_idinteger

        The task id.

      • from_starts_onstring (date) | null
      • from_ends_onstring (date)
      • to_starts_onstring (date) | null
      • to_ends_onstring (date)
      • reasonstring
      • caused_by_allocation_idinteger | null

        Older shifts only.

      • statusstring
        One ofpendingapprovedrejected
      • requested_byinteger | null

        User id of who asked.

      • decided_byinteger | null
      • decided_atstring (date-time) | null
      • decision_notestring | null
      • created_atstring (date-time)
      • updated_atstring (date-time)
  • 401Missing, expired or refused token.
    • messagestringrequired
  • 403The person lacks the permission, or cannot enter the company.
    • messagestringrequired
  • 404Item not found. — no task with this id.
    • messagestringrequired
  • 409A shift for this item is already waiting for approval.
    • messagestringrequired
  • 422Invalid fields, or The item has no person assigned., or The new end is before the start: pass the new start too. (the task's current start is after to_ends_on).
    • messagestringrequired
    • errorsobject

      Messages per field.

Request
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."
}'
Response
{
  "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"
  }
}
post/schedule-shifts/{shift}/approve

Approve 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.

POST https://api-brain.nucleoplatform.com/api/v1/schedule-shifts/{shift}/approve
Authentication: Bearer token

Path parameters

  • shiftintegerrequired

    The shift id.

Headers

  • X-Nucleo-Companystring

    The 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 | null
    max length 2000

Responses

  • 200The shift after the decision, with project (id, name).
    • dataScheduleShift & object
      Child attributes
      • idinteger
      • user_idinteger

        The person assigned to the task.

      • project_idinteger | null
      • shiftable_typestring
        One oftask
      • shiftable_idinteger

        The task id.

      • from_starts_onstring (date) | null
      • from_ends_onstring (date)
      • to_starts_onstring (date) | null
      • to_ends_onstring (date)
      • reasonstring
      • caused_by_allocation_idinteger | null

        Older shifts only.

      • statusstring
        One ofpendingapprovedrejected
      • requested_byinteger | null

        User id of who asked.

      • decided_byinteger | null
      • decided_atstring (date-time) | null
      • decision_notestring | null
      • created_atstring (date-time)
      • updated_atstring (date-time)
      • projectobject | null
        Child attributes
        • idinteger
        • namestring
  • 401Missing, expired or refused token.
    • messagestringrequired
  • 403Only the project manager can decide on this shift.
    • messagestringrequired
  • 404Not found in this company.
    • messagestringrequired
  • 409Not applied: This shift has already been decided., The item no longer exists. or The item dates changed after the shift was proposed: propose it again.
    • messagestringrequired
  • 422Invalid fields.
    • messagestringrequired
    • errorsobject

      Messages per field.

Request
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"
}'
Response
{
  "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"
    }
  }
}
post/schedule-shifts/{shift}/reject

Reject a schedule shift

Only the project manager of the shift's project or a company admin. A note is required.

POST https://api-brain.nucleoplatform.com/api/v1/schedule-shifts/{shift}/reject
Authentication: Bearer token

Path parameters

  • shiftintegerrequired

    The shift id.

Headers

  • X-Nucleo-Companystring

    The 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

  • notestringrequired
    max length 2000

Responses

  • 200The shift after the decision, with project (id, name).
    • dataScheduleShift & object
      Child attributes
      • idinteger
      • user_idinteger

        The person assigned to the task.

      • project_idinteger | null
      • shiftable_typestring
        One oftask
      • shiftable_idinteger

        The task id.

      • from_starts_onstring (date) | null
      • from_ends_onstring (date)
      • to_starts_onstring (date) | null
      • to_ends_onstring (date)
      • reasonstring
      • caused_by_allocation_idinteger | null

        Older shifts only.

      • statusstring
        One ofpendingapprovedrejected
      • requested_byinteger | null

        User id of who asked.

      • decided_byinteger | null
      • decided_atstring (date-time) | null
      • decision_notestring | null
      • created_atstring (date-time)
      • updated_atstring (date-time)
      • projectobject | null
        Child attributes
        • idinteger
        • namestring
  • 401Missing, expired or refused token.
    • messagestringrequired
  • 403Only the project manager can decide on this shift.
    • messagestringrequired
  • 404Not found in this company.
    • messagestringrequired
  • 409This shift has already been decided.
    • messagestringrequired
  • 422note is missing or too long.
    • messagestringrequired
    • errorsobject

      Messages per field.

Request
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."
}'
Response
{
  "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"
    }
  }
}