Skip to content

Delete Staff

Soft-delete a staff member by marking their account (and doctor profile, if applicable) as deleted.

Endpoint

DELETE /v1/user/deleteStaff/{userId}

Path Parameters

Parameter Type Required Description
userId integer Yes User ID of the staff member to delete

Request

curl --location --request DELETE '{base_url}/v1/user/deleteStaff/10234' \
  --header 'Authorization: Bearer JWT_TOKEN'

Response

Success Response

Code: 200 OK

{
  "code": 2000,
  "data": "User has been marked deleted successfully",
  "message": "Success"
}

For staff with the DOCTOR role:

{
  "code": 2000,
  "data": "Doctor has been marked deleted successfully",
  "message": "Success"
}

Response Fields

Field Type Description
data string Confirmation message

Error Response

Code: 400 Bad Request

{
  "code": 4000,
  "message": "Permission Denied",
  "data": null
}

Notes

  • This is a soft delete — the record is not removed from the database; its status is set to DELETED.
  • If the user has the DOCTOR role, the associated doctor profile is also marked as deleted.
  • Requires ORGANISATION_MANAGEMENT read-write permission, or the caller must be deleting their own account.