Add person to department

POST /actions/persons/{person_id}/departments/add

Add a user to given department.

Path parameters

  • person_id string(uuid) Required

    Person unique identifier

application/json

Body Required

  • department_id string(uuid) Required

    Department unique identifier

Responses

  • 201 application/json

    User added to given department

    Hide response attributes Show response attributes object
    • id string(uuid)

      Person unique identifier

    • department_id string(uuid)

      Department unique identifier

  • 400

    Invalid department ID

POST /actions/persons/{person_id}/departments/add
curl \
 --request POST 'http://api.example.com/actions/persons/a24a6ea4-ce75-4665-a070-57453082c25/departments/add' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"department_id":"b35b7fb5-df86-5776-b181-68564193d36"}'
Request examples
{
  "department_id": "b35b7fb5-df86-5776-b181-68564193d36"
}
Response examples (201)
{
  "id": "a24a6ea4-ce75-4665-a070-57453082c25",
  "department_id": "b35b7fb5-df86-5776-b181-68564193d36"
}