Log In

Deactivate a User

post/public/v1/users/{user}/deactivate

Signs the user out everywhere and stops them signing in. They are removed as primary and service coordinator and unassigned from their future shifts, and the user.deactivated webhook is sent. employment_end_date defaults to today in the provider's timezone.

Refuses with a 409 when the user is already deactivated, or still holds public API keys, and with a 403 for the account owner.

  • Authorizationstringrequired

    Bearer authentication header of the form Bearer <token>, where <token> is your API key. See How to set up an API key.

  • userstringrequired

    The user UUID

Body

application/json
  • employment_end_datestring<date> | null
  • exit_detailsstring | nullmax length 65535

    Limited to 65535 bytes.

Response

200application/json

UserResource

  • dataobjectrequired
    ▶Show 6 child attributes
    • idstringrequired
      Example:u1s2e3r4-a5b6-47c8-9d0e-1f2a3b4c5d6e
    • first_namestringrequired
      Example:John
    • last_namestringrequired
      Example:Doe
    • emailstringrequired
      Example:john.doe@example.com
    • statusenum<string>required
      Available options:activedeactivatedinvitedrestricted
    • employment_titlestring | nullrequired
      Example:Service Manager
  • 401Unauthenticated
  • 403Authorization error
  • 404Not found
  • 409An error
  • 422Validation error