Skip to content

Remove staff from a project

Request

🔐 Required role: PROJ_C

📖 Data dictionary: Project

Remove staff from a project

Deactivates associations between staff members and a job:

  • staffJobAssignments: deactivates matching staff_job records
  • staffTaskAssignments: deactivates matching task_type_staff_job records

Returns the IDs of deactivated records, in the same shape as the assign endpoint's response. Items with no matching active record are silently skipped.

Security
(BearerAuth and CfAccessClientId and CfAccessClientSecret) or BearerAuth
Bodyapplication/jsonrequired
jobIdinteger, (int64)required

Jobid

staffJobAssignmentsArray of objects

Staffjobassignments

staffTaskAssignmentsArray of objects

Stafftaskassignments

curl -i -X POST \
  https://api.sandbox.aiwyn.app/api/v1/projects/remove_staff \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'CF-Access-Client-Id: YOUR_API_KEY_HERE' \
  -H 'CF-Access-Client-Secret: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "jobId": 5001,
    "staffJobAssignments": [
      {
        "staffId": 103
      },
      {
        "staffId": 104
      }
    ],
    "staffTaskAssignments": [
      {
        "staffId": 103,
        "taskTypeId": 10
      },
      {
        "staffId": 104,
        "taskTypeId": 11
      }
    ]
  }'

Responses

Staff removed successfully

Bodyapplication/json
staffJobIdsArray of integers, (int64)required

IDs of the staff_job records created, re-activated or deactivated

staffTaskIdsArray of integers, (int64)required

IDs of the task_type_staff_job records created, re-activated or deactivated

Response
{ "staffJobIds": [ 0 ], "staffTaskIds": [ 0 ] }