Skip to main content
POST
/
tasks
/
{task_id}
/
collaborators
Assign collaborators to a task
curl --request POST \
  --url https://api.projectcor.com/v1/tasks/{task_id}/collaborators \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "collaborators": [
    123
  ],
  "reasignEstimate": false
}
'
[
  {
    "id": 123,
    "first_name": "<string>",
    "last_name": "<string>",
    "email": "jsmith@example.com",
    "picture": "<string>",
    "user_position_id": 123,
    "role_id": 123,
    "userPosition": {
      "id": 123,
      "name": "<string>"
    },
    "pivot": {
      "user_id": 123,
      "task_log_id": 123,
      "created_at": "<string>",
      "estimated_by_user": 123
    }
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

task_id
integer
required

The ID of the task

Body

application/json
collaborators
integer[]
required

Array of user IDs that should be assigned to the task. Pass an empty array [] to remove all collaborators.

reasignEstimate
boolean
default:false

If true, redistributes the estimated hours evenly among the new collaborators.

Response

Returns the updated array of collaborators

id
integer
first_name
string
last_name
string
email
string<email>
picture
string
user_position_id
integer | null
role_id
integer
userPosition
object
pivot
object