Delete user

Delete user

Delete a user. This function is only available through a JWT token, and can only remove the current user.

DELETEhttps://studio.edgeimpulse.com/v1/api/users/{userId}
Path parameters
userId*integer

User ID

Body
passwordstring

User's current password. Required if the user has a password set.

totpTokenstring

TOTP Token. Required if a user has multi-factor authentication with a TOTP token enabled. If a user has MFA enabled, but no totpToken is submitted; then an error starting with "ERR_TOTP_TOKEN IS REQUIRED" is returned. Use this to then prompt for an MFA token and re-try this request.

Response

OK

Body
success*boolean

Whether the operation succeeded

errorstring

Optional error description (set if 'success' was false)

Request
const response = await fetch('https://studio.edgeimpulse.com/v1/api/users/{userId}', {
    method: 'DELETE',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "success": false,
  "error": "text"
}

Last updated