Skip to main content
POST
Create an export job

Authorizations

Authorization
string
header
required

Bearer tokens created in the ABConvert admin under Settings → MCP & API Access. Scopes: read_experiments and write_experiments (write implies read; the default is read). See Authentication for which scope each request needs.

Headers

Idempotency-Key
string

Replaying a request with the same key returns the original response instead of creating a second resource. Reusing a key with a different body returns 409 idempotency_key_in_use, and a key outside 1-255 characters returns 400 invalid_idempotency_key rather than being ignored. See Idempotency.

Required string length: 1 - 255

Path Parameters

id
string
required

The test's numeric ID as a string, for example "3021".

Pattern: ^[0-9]+$
Example:

"3021"

Body

application/json

Beta. More filters may be added later. An unknown field at the top level is refused with 400 unknown_parameter rather than ignored; an unknown key inside date_range is refused with 422 invalid_date_range.

date_range
object
required

Both bounds are required and inclusive, and are calendar days in your store's timezone.

The window is narrowed to the days that can hold data: it starts no earlier than the day the test started, and ends no later than today. A window that can hold nothing at all returns 422 date_range_out_of_bounds.

sample_basis
enum<string>
default:assignment

Which visitors count. assignment includes every visitor put in a test group; exposure only those the test actually reached.

Available options:
assignment,
exposure

Response

The created job.

object
string
required
Allowed value: "export"
id
string
required

Treat as opaque. Never parse it.

Example:

"export_9f2c1a7b3d5e4f60a1b2c3d4e5f60718"

status
enum<string>
required
Available options:
pending,
processing,
completed,
failed
Example:

"completed"

experiment_id
string
Example:

"3021"

url
string<uri> | null

The signed download link, ready to fetch as given. Set while the job is completed and expires_at is still in the future; null before the job finishes, and null again once the link expires, while status stays completed. Branch on this field rather than on status.

The link is signed, so fetching it needs no bearer token. You can hand the whole URL to a browser or a download tool. Anyone who has the URL can download the file until expires_at.

Example:

"https://app.abconvert.io/v1/exports/export_9f2c1a7b3d5e4f60a1b2c3d4e5f60718/download?expires=1787000000&signature=3f8c1d0b6a94e27d5c1b8e40f7a2d9c6b3e15f8a0d47c92e6b1a3f5d8c07e246"

expires_at
string<date-time> | null
failure_reason
string | null

Why the job failed. Set only when status is failed.

created_at
string<date-time>