Skip to main content
POST
/
user
/
download
/
csv
Download User Data
curl --request POST \
  --url https://api.royalti.io/user/download/csv \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "userIds": [
    "1659b4bf-99a9-4d56-af27-de399435c4ee",
    "09de2d9b-a9eb-4b98-a15a-3b7f59f6161f",
    "34902c71-f733-4cce-a541-06e2cced0807"
  ]
}
'
{}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

/user/download/csv Description:
The /user/download/csv endpoint allows users to download their data in CSV format.
Method:
POST
Request Payload:
ParameterTypeDescription
userIdsarrayAn array of user IDs to download data for.

Code Examples

const response = await fetch('https://api.royalti.io/user/download/csv', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "userIds": [
      {}
    ]
  })
});

const data = await response.json();
console.log(data);

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Body

application/json
userIds
string[]

An array of user IDs to download data for. If not provided, downloads all users.

Response

Success

The response is of type object.