Delete a user
const url = 'https://app.mondochat.io/v1/server/users/example';const options = { method: 'DELETE', headers: {'Mondochat-App-Id': '<Mondochat-App-Id>', Authorization: 'Bearer <token>'}};
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.mondochat.io/v1/server/users/example \ --header 'Authorization: Bearer <token>' \ --header 'Mondochat-App-Id: <Mondochat-App-Id>'Marks the user deleted and ends their sessions at once. Their messages, photos, IP records and profile fields are then removed within 24 hours, and the user.deleted webhook follows. Their peers see a deleted user and only their own messages. Server route: send the server secret as a bearer token with Mondochat-App-Id.
Errors: 404 not_found for an unknown or already deleted user.
Guide: Users.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”Successful Response
Example generated
exampleProblem
An RFC 9457 problem: the body of every error answer.
object
The stable error code to branch on, such as policy_denied.
What went wrong this time, when there is more to say.
For validation, one entry per invalid field.
One invalid field.
object
The path to the field.
What is wrong with it.
The path of the request.
For policy_denied and limit_reached, the rule or limit that refused the request; for forbidden, a short cause such as you_blocked; for banned, temporary when the ban expires.
The HTTP status code.
A short summary of the problem.
A URL that names the problem, https://app.mondochat.io/problems/<code>.
Example
{ "code": "policy_denied", "detail": null, "instance": "/v1/conversations/0199d6a0-2000-7000-8000-000000000001", "reason": "pins", "status": 403, "title": "Policy denied", "type": "https://app.mondochat.io/problems/policy_denied"}