Skip to content

Export a user's data

POST
/v1/server/users/{external_id}/export
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.

external_id
required
External Id
string
/^[A-Za-z0-9._:@-]{1,128}$/
Idempotency-Key
Any of:
string
>= 1 characters <= 255 characters

Successful Response

Media typeapplication/json
Export

The export that was started.

object
export_id
required
Export Id

The export’s id; the user.exported webhook follows.

string format: uuid

Example

{
"export_id": "0199d6a0-4000-7000-8000-000000000001"
}

Problem

Media typeapplication/problem+json

An RFC 9457 problem: the body of every error answer.

object
code
required

The stable error code to branch on, such as policy_denied.

string
detail

What went wrong this time, when there is more to say.

string | null
errors

For validation, one entry per invalid field.

Array<object>

One invalid field.

object
loc

The path to the field.

array
msg

What is wrong with it.

string
instance

The path of the request.

string
reason

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.

string
status
required

The HTTP status code.

integer
title
required

A short summary of the problem.

string
type
required

A URL that names the problem, https://app.mondochat.io/problems/<code>.

string

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"
}