POST
/
api
/
v1
/
analytics
/
exports
Trigger an Export Job
curl --request POST \
  --url https://appex.userpilot.io/api/v1/analytics/exports \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "from": "<string>",
  "to": "<string>",
  "emails": [
    "<string>"
  ],
  "event_type": [
    "<string>"
  ],
  "user_id": [
    "<string>"
  ],
  "company_id": [
    "<string>"
  ],
  "segment_id": "<string>",
  "format": "avro",
  "exclusions": "<string>"
}'
{
  "environment_app_token": "NX-RE213S2",
  "environment_name": "production",
  "job_id": "123e4567-e89b-12d3-a456-426614174000",
  "links": "<string>",
  "start_time": "<string>"
}

Headers

Authorization
string
required

API authentication token in the format: Token {{API_KEY}}. Obtain your API key from the Userpilot Environment Settings.

Content-Type
string

The content type of the request body. Must be application/json.

Accept
string

The content type of the response body. Must be application/json.

Body

application/json
from
string
to
string
emails
string[]
event_type
string[]
user_id
string[]
company_id
string[]
segment_id
string
format
enum<string>
Available options:
avro,
csv,
ndjson,
parquet
exclusions
string

Response

Created - Export job successfully created

environment_app_token
string

The app token of the environment.

Example:

"NX-RE213S2"

environment_name
string

The name of the environment.

Example:

"production"

job_id
string

The ID of the export job.

Example:

"123e4567-e89b-12d3-a456-426614174000"

The links to the export job.

start_time
string

The start time of the export job.