Export a user's data
const url = 'https://app.mondochat.io/v1/server/users/example/export';const options = { method: 'POST', 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 POST \ --url https://app.mondochat.io/v1/server/users/example/export \ --header 'Authorization: Bearer <token>' \ --header 'Mondochat-App-Id: <Mondochat-App-Id>'Starts an export of the user’s profile, conversations, messages, purchases, reports and photos, and answers at once with an export id. When the zip is ready, the user.exported webhook carries a signed URL that works for 24 hours. Server route: send the server secret as a bearer token with Mondochat-App-Id; send an Idempotency-Key so a retry starts one export.
Errors: 404 not_found for an unknown or deleted user; 409 idempotency_conflict when the key was used with a different request.
Guide: Users.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Responses
Section titled “Responses”Successful Response
The export that was started.
object
The export’s id; the user.exported webhook follows.
Example
{ "export_id": "0199d6a0-4000-7000-8000-000000000001"}Problem
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"}