v4

OpenAPI 3.1.02026-07-31121440441.0 KB
aiTaskBuilder

Get Dataset Upload URL

Generates a presigned S3 URL for uploading a file to the dataset. Use the returned URL to PUT the file directly to S3.

V3 datasets (CSV/ZIP): returns upload_url and http_method. After the upload completes, poll GET /datasets/{dataset_id}/status for processing status.

V4 datasets (JSONL/CSV): additionally returns import_id. After the upload completes, poll GET /datasets/{dataset_id}/imports/{import_id} for per-upload status. Multiple upload URLs can be requested before any upload completes — each creates a distinct import job and S3 key.

Supported file types:

  • V3: .csv, .zip
  • V4: .csv, .jsonl
get/api/v1/data-collection/datasets/{dataset_id}/upload-url/{filename}

Path parameters

dataset_idstring required

The ID of the dataset to upload files to

filenamestring required

The name of the file to upload (e.g. data.jsonl)

Headers

Authorizationstring required

The Prolific API uses API token to authenticate requests. You can create an API token directly from your settings.

Your API token does not have an expiry date and carries full permission, so be sure to keep them secure.

If your token is leaked, delete it and create a new one directly in the app.

In your requests add Authorization header with the value Token <your token>.

Response

Presigned URL generated successfully

dataset_idstring uuid required

The ID of the dataset the upload URL was requested for.

upload_urlstring required

Presigned S3 URL. Make a PUT request to this URL with your file as the body.

http_method'PUT' required

HTTP method to use with the presigned URL.

content_typestring required

The Content-Type header value to use when making the S3 PUT request. Use this value exactly — e.g. application/x-ndjson for JSONL files.

expires_atstring date-time required

When the presigned URL expires (ISO 8601, UTC). The URL cannot be used after this time.

file_keystring

The S3 object key for the uploaded file. Provided for reference only.

import_idstring uuid

Import job ID. V4 datasets only. Use with GET /datasets/{dataset_id}/imports/{import_id} to poll for upload and processing status.