VEXO /Documentation

Export API

The Export API allows you to programmatically retrieve events from your applications for external analysis, data warehousing, or custom reporting.

Authentication

Before accessing the Export API, you need to obtain an authentication token by logging in.

Login Endpoint

curl --location --request POST 'https://api.vexo.co/users/implicit/login' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "your-email@example.com",
    "password": "your-password"
}'

Response:

{
    "success": true,
    "code": 200,
    "message": null,
    "data": {
        "id": "5d10a838-1678-4110-a402-6eb0af88e41d",
        "name": "Your Name",
        "email": "your-email@example.com",
        "token": "{AUTH_TOKEN}"
    }
}

Use the token from the response in the Authorization header for all API requests.

Export Events

Get Events

Retrieve events for a specific application with optional filtering by date range and pagination.

Endpoint: GET /external/apps/{appId}/events

Headers:

  • Authorization: {token} - Required authentication token from login

Parameters:

  • appId (path, required) - UUID of the application
  • from (query, optional) - Start timestamp (Unix timestamp in milliseconds)
  • to (query, optional) - End timestamp (Unix timestamp in milliseconds)
  • itemsPerPage (query, optional) - Number of items per page (default: 10000, max: 10000)
  • page (query, optional) - Page number (default: 1)

Example Request:

curl --location --request GET 'https://api.vexo.co/external/apps/:appId/events?from=1640995200000&to=1641081600000&itemsPerPage=100&page=1' \
--header 'Authorization: {AUTH_TOKEN}'

Response Structure:

{
    "success": true,
    "code": 200,
    "message": null,
    "data": {
        "totalItems": 1,
        "page": 1,
        "itemsPerPage": 10000,
        "items": [
            {
                "id": "event-id",
                "name": "screen_view",
                "route": "/home",
                "sessionId": "session-id",
                "deviceId": "device-id",
                "type": "screen",
                "appVersion": "1.0.0",
                "clientCreationDate": 1640995200000,
                "serverReceivedDate": 1640995201000,
                "clientCreationHumanReadableDate": "2021-12-31 12:00:00",
                "serverReceivedHumanReadableDate": "2021-12-31 12:00:01",
                "country": "US",
                "city": "New York",
                "deviceSystemName": "iOS",
                "deviceSystemVersion": "15.0",
                "deviceModel": "iPhone13,2",
                "metadata": {
                    "custom_property": "value",
                    "user_id": "123",
                    "additional_data": "example"
                }
            }
        ]
    }
}

Event Object Structure

Each event object contains the following fields:

FieldTypeDescriptionRequired
idstringUnique event identifierYes
namestringEvent name (e.g., "screen_view", "button_click")No
routestringScreen route or pathNo
sessionIdstringSession identifierYes
deviceIdstringDevice identifierYes
typestringEvent type (e.g., "screen", "custom")Yes
appVersionstringApplication versionYes
clientCreationDatenumberUnix timestamp when event was created on client (milliseconds)Yes
serverReceivedDatenumberUnix timestamp when event was received by server (milliseconds)Yes
clientCreationHumanReadableDatestringHuman-readable client creation dateYes
serverReceivedHumanReadableDatestringHuman-readable server received dateYes
countrystringUser's countryYes
citystringUser's cityNo
deviceSystemNamestringOperating system (e.g., "iOS", "Android")No
deviceSystemVersionstringOperating system versionNo
deviceModelstringDevice modelNo
metadataobjectCustom event data and propertiesNo

Usage Examples

Basic Event Export

# Export all events for an app
curl --location --request GET 'https://api.vexo.co/external/apps/your-app-id/events' \
--header 'Authorization: {AUTH_TOKEN}'

Date Range Export

# Export events from the last 24 hours
curl --location --request GET 'https://api.vexo.co/external/apps/your-app-id/events?from=1640908800000&to=1640995200000' \
--header 'Authorization: {AUTH_TOKEN}'

Paginated Export

# Export events with pagination
curl --location --request GET 'https://api.vexo.co/external/apps/your-app-id/events?itemsPerPage=500&page=2' \
--header 'Authorization: {AUTH_TOKEN}'

Rate Limits

  • Maximum 5 requests per application per minute
  • Maximum 10,000 events per request (default is max)
  • Authentication tokens work the same as normal login behavior

Error Responses

Status CodeDescription
401Invalid or expired authentication token
403Access denied to the specified application
404Application not found
429Rate limit exceeded
500Internal server error
Previous
Webhooks
Next
Tracking Information