const url = 'https://app.monitorly.cloud/api/v1/me';const options = { method: 'DELETE', headers: { cookie: '__Host-monitorly_session=<__Host-monitorly_session>', 'Content-Type': 'application/json' }, body: '{"code":"example","confirmEmail":"example","password":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://app.monitorly.cloud/api/v1/me \ --header 'Content-Type: application/json' \ --cookie __Host-monitorly_session=<__Host-monitorly_session> \ --data '{ "code": "example", "confirmEmail": "example", "password": "example" }'Deletes the signed-in account and ends the session. Get what deleting needs says what blocks it and what proof it takes.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Six digits from the authenticator, when two-factor sign-in is on.
The account’s email, typed again (letter case and surrounding spaces do not matter).
The current password; may be left out after a provider re-authentication within the last 5 minutes.
Example generated
{ "code": "example", "confirmEmail": "example", "password": "example"}Responses
Section titled “Responses”Deleted.
Bad Request.
request.malformed: the body or a parameter is not of the expected shapeauth.credentials_conflict: the request carries both a session cookie and a token
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
Example generated
{ "detail": "example", "errors": [ { "code": "example", "params": { "additionalProperty": "example" }, "pointer": "example" } ], "status": 1, "title": "example", "type": "example"}Unauthorized.
auth.unauthenticated,auth.session_expired: no session, or it endedtoken.invalid: the token is malformed, unknown, revoked or expired, or its creator left the workspace
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
Example generated
{ "detail": "example", "errors": [ { "code": "example", "params": { "additionalProperty": "example" }, "pointer": "example" } ], "status": 1, "title": "example", "type": "example"}Forbidden.
auth.forbidden: your role is too low for thistoken.not_allowed: this operation needs a signed-in session; tokens cannot call itrequest.origin_mismatch,request.header_required: a changing request with a session comes from another site or lacksX-Monitorly-Request: 1account.reauth_required: account deletion without a password and without a provider re-authentication in the last 5 minutesaccount.password_required: account deletion with a provider re-authentication instead of the password, while the account has a password and a provider linked less than 24 hours ago
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
Example generated
{ "detail": "example", "errors": [ { "code": "example", "params": { "additionalProperty": "example" }, "pointer": "example" } ], "status": 1, "title": "example", "type": "example"}Conflict.
account.owns_shared_workspaces: account deletion while the person owns a workspace with other members: transfer it firstaccount.installation_owner: the account owns the installation and cannot be deleted
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
Example generated
{ "detail": "example", "errors": [ { "code": "example", "params": { "additionalProperty": "example" }, "pointer": "example" } ], "status": 1, "title": "example", "type": "example"}Payload Too Large.
request.too_large: the body is larger than 256 KiB
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
Example generated
{ "detail": "example", "errors": [ { "code": "example", "params": { "additionalProperty": "example" }, "pointer": "example" } ], "status": 1, "title": "example", "type": "example"}Unprocessable Entity.
field.required,field.too_long,field.invalid: a field breaks a rule;errorspoints at itaccount.email_mismatch: account deletion:confirmEmailis not the account’s email (/confirmEmail)auth.current_password_invalid: current password is wrong when changing the password (/currentPassword; counts as a failed sign-in attempt)
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
Example generated
{ "detail": "example", "errors": [ { "code": "example", "params": { "additionalProperty": "example" }, "pointer": "example" } ], "status": 1, "title": "example", "type": "example"}Too Many Requests.
session.rate_limited: more than 5 changes a second from your sessions
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
Example generated
{ "detail": "example", "errors": [ { "code": "example", "params": { "additionalProperty": "example" }, "pointer": "example" } ], "status": 1, "title": "example", "type": "example"}Headers
Section titled “Headers”Seconds to wait before trying again.