Add a user to given department.

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

Path parameters

  • person_id string(uuid) Required
application/x-www-form-urlencoded

Body Required

  • department_id string(uuid) Required

Responses

  • 201 application/json

    User added to given department

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

    Invalid department ID

  • 404

    Person or department not found

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/x-www-form-urlencoded" \
 --data 'department_id=a24a6ea4-ce75-4665-a070-57453082c25'
Response examples (201)
{
  "id": "string",
  "department_id": "string"
}