Skip to main content
POST
/
users
/
me
/
account-statements
/
generate
curl --request POST \ --url https://{host}/users/me/account-statements/generate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'x-user-id: <x-user-id>' \ --data ' { "start": "2024-01-01", "end": "2024-12-31" } '
{ "fileUri": "https://account-statements.r2.cloudflarestorage.com/64f0c51e7fb3fc001234a001/statement.pdf?X-Amz-..." }

Authorizations

Authorization
string
header
required

Auth0-issued access token that includes the scopes listed for the endpoint.

Headers

x-user-id
string
required

MongoDB ObjectId of the user for whom to generate the account statement

Pattern: ^[a-f0-9]{24}$

Body

application/json

Optional date range for the account statement. If omitted, includes all available activity.

start
string<date>

Start date for the statement period (inclusive). ISO 8601 date format (YYYY-MM-DD).

Example:

"2024-01-01"

end
string<date>

End date for the statement period (inclusive). ISO 8601 date format (YYYY-MM-DD).

Example:

"2024-12-31"

Response

Account statement generated successfully

fileUri
string<uri>
required

Pre-signed URL to download the generated PDF account statement. The URL is temporary and expires after a short period.

Example:

"https://account-statements.r2.cloudflarestorage.com/64f0c51e7fb3fc001234a001/statement.pdf?X-Amz-..."