Skip to content

Delete Staff Member

Deactivates a staff member.

Endpoint

DELETE /v2/staff/{staff_id}

Path Parameters

Parameter Type Required Description
staff_id string Yes The staff member's id.

Query Parameters

Parameter Type Required Description
onboarding boolean No Treat the path id as an onboarding_user_id rather than an operational id. Required to address a staff member that has not been published yet; also forces the onboarding path on PATCH/DELETE.

Request

curl --location '{base_url}/v2/staff/7106' \
  --request DELETE \
  --header 'Authorization: Bearer JWT_TOKEN'

Response

Success Response

Code: 204 No Content

No response body.

Error Response

Code: 400 Bad Request

{
  "code": "bad_request",
  "message": "Validation failed",
  "errors": [
    {
      "field": "patient_id",
      "message": "must be a string"
    }
  ]
}

Every error has the same shape — a machine-readable code, a message, and an errors[] array that's empty when there's nothing field-specific to report. The HTTP status is authoritative.

Status code Meaning
400 Bad Request bad_request The request body or parameters failed validation. errors[] names the offending fields.
401 Unauthorized unauthorized The access token is missing, malformed or expired.
403 Forbidden forbidden The request references a resource outside the token's organisation or clinic scope.
404 Not Found not_found No such resource, or it's outside your scope.
409 Conflict conflict The record conflicts with existing state — see the endpoint's notes.
412 Precondition Failed precondition_failed If-Match is stale. Re-read the resource and retry.
423 Locked locked The organisation has a publish in progress. Retry once it finishes.
428 Precondition Required precondition_required If-Match is required on this write.
429 Too Many Requests rate_limited Rate limit exceeded. Back off and retry.
500 Internal Server Error internal_error Unexpected server error.
502 Bad Gateway upstream_error Upstream service failed or timed out.

Notes

  • For an onboarding-managed staff member this revokes access (access_revoked: true) instead of deleting the record — reversible with PATCH {"access_revoked": false}.