Append Datapoints to a Dataset

View as MarkdownOpen in Claude
Synchronously appends one or more JSONL records to an existing **V4 dataset**. Unlike the file-upload flow, this endpoint processes the whole payload within the request and returns the accepted/rejected counts directly — there is no async import job to poll. **Request body:** JSONL — one JSON object per line — sent with a JSONL content type (e.g. `application/x-ndjson`). Blank lines are skipped. CSV is not supported on this endpoint. Each record is validated against the dataset's current schema. Valid records are persisted as datapoints and sort after every existing datapoint. Records that are malformed or violate the schema are rejected individually and reported in `errors` — they do not fail the whole request. Re-appending an identical record is idempotent (counted as accepted, not written twice). **Limits and preconditions:** - At most 1000 records per request. Larger imports should use the file-upload flow. - The dataset must be V4 and have a schema defined. - Rejected with `409 Conflict` while a dataset import or a schema migration is in progress. If the dataset is attached to any batches with `auto_sync_enabled`, a sync is triggered automatically for the newly written datapoints.

Authentication

AuthorizationToken
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>`.

Path parameters

dataset_idstringRequiredformat: "uuid"
The unique identifier of the V4 dataset to append to

Request

This endpoint expects a string.

Response

Append processed. Returns per-request accepted/rejected counts. A 200 is returned even when some (or all) records were rejected — inspect rejected and errors.

acceptedinteger>=0

Number of records that passed validation (newly written or idempotent duplicates).

rejectedinteger>=0

Number of records rejected. Equal to the length of errors.

errorslist of objects

Record-level rejections. Empty when every record was accepted.

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error