Skip to main content
POST
/
v1
/
datasets
/
{id}
/
items
Add an item to a dataset
curl --request POST \
  --url https://api.trulayer.ai/v1/datasets/{id}/items \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "trace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "span_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "feedback_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "label": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "trace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "span_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "feedback_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "label": "pass"
}

Documentation Index

Fetch the complete documentation index at: https://docs.trulayer.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

SDK API key (tl_...) or Clerk session JWT

Path Parameters

id
string<uuid>
required

Body

application/json
trace_id
string<uuid>
required
span_id
string<uuid> | null
feedback_id
string<uuid> | null
label
string | null

Response

Item added

id
string<uuid>
required
dataset_id
string<uuid>
required
tenant_id
string<uuid>
required
trace_id
string<uuid>
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
span_id
string<uuid> | null
feedback_id
string<uuid> | null
label
enum<string> | null

Review label for the item. null (or omitted) means the item has not been labeled yet. The frontend toggles this value via PATCH /v1/datasets/{id}/items/{itemId}.

Available options:
pass,
fail,
unlabeled,
null