{
"id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"type": "job.completed",
"data": {
"job": {
"id": "<string>",
"namespace": "<string>",
"spend_usd": 1,
"progress": {
"documents_done": 1
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"judgment": "<string>",
"estimate": {
"documents": 1,
"tokens": 1,
"row_units": 1,
"judgment_units": 1,
"cost_usd": 1,
"duration_s": 1,
"downstream": [
{
"judgment": "<string>",
"judgments_per_month": 1,
"cost_usd": 1,
"level": 2,
"via": "<string>",
"omitted": [
"<string>"
],
"lower_bound": true
}
]
},
"estimated_completion_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"attribute": "<string>",
"group": "<string>",
"proposal": {
"options": [
{
"value": "<string>",
"description": "<string>"
}
],
"proposed": [
{
"value": "<string>",
"description": "<string>",
"absorbs": 1,
"sample_ids": [
"<string>"
]
}
],
"sampled": 100,
"escape_documents": 1,
"unlabelled": 1
},
"simulation": {
"population": 1,
"sampled": 1,
"thresholds": {},
"noise": {},
"without_stored_answer": 1,
"examples": [
"<string>"
],
"excluded": {
"failed": 1,
"out_of_scope": 1
},
"fanout": {
"documents": 1,
"tokens": 1,
"row_units": 1,
"judgment_units": 1,
"cost_usd": 1,
"duration_s": 1,
"downstream": [
{
"judgment": "<string>",
"judgments_per_month": 1,
"cost_usd": 1,
"level": 2,
"via": "<string>",
"omitted": [
"<string>"
],
"lower_bound": true
}
]
},
"larger_sample": 123
},
"version": 2,
"report": {
"documents": 1,
"current": {
"mean": 123,
"histogram": [
{
"lower": 123,
"upper": 123,
"count": 1
}
]
},
"candidate": {
"mean": 123,
"histogram": [
{
"lower": 123,
"upper": 123,
"count": 1
}
]
},
"threshold_flips": {},
"recompute": {
"documents": 1,
"tokens": 1,
"row_units": 1,
"judgment_units": 1,
"cost_usd": 1,
"duration_s": 1,
"downstream": [
{
"judgment": "<string>",
"judgments_per_month": 1,
"cost_usd": 1,
"level": 2,
"via": "<string>",
"omitted": [
"<string>"
],
"lower_bound": true
}
]
},
"downstream": [
{
"judgment": "<string>",
"judgments_per_month": 1,
"cost_usd": 1,
"level": 2,
"via": "<string>",
"omitted": [
"<string>"
],
"lower_bound": true
}
],
"calibration_replay": {
"outcomes": 1,
"tokens": 1,
"row_units": 1,
"judgment_units": 1,
"cost_usd": 1
}
},
"backfill_job_id": "<string>",
"result": {
"status": 399,
"body": {
"name": "<string>",
"version": 2,
"active": true,
"warnings": [
"<string>"
],
"definition": {
"name": "<string>",
"question": "<string>",
"type": "bool",
"criteria": "<string>",
"context": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2
},
"horizon": "0s",
"thresholds": {},
"parts": [
{
"name": "<string>",
"question": "<string>"
}
],
"features": [
"<string>"
]
},
"job_id": "<string>",
"job_ids": [
"<string>"
]
}
},
"warnings": [
{
"message": "<string>",
"paths": [
"<string>"
],
"thresholds": [
"<string>"
],
"escape_share": 0.5,
"since": "2023-11-07T05:31:56Z"
}
]
},
"url": "<string>"
},
"test": true
}Webhooks
job.completed
A job finished done.
WEBHOOK
job.completed
{
"id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"type": "job.completed",
"data": {
"job": {
"id": "<string>",
"namespace": "<string>",
"spend_usd": 1,
"progress": {
"documents_done": 1
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"judgment": "<string>",
"estimate": {
"documents": 1,
"tokens": 1,
"row_units": 1,
"judgment_units": 1,
"cost_usd": 1,
"duration_s": 1,
"downstream": [
{
"judgment": "<string>",
"judgments_per_month": 1,
"cost_usd": 1,
"level": 2,
"via": "<string>",
"omitted": [
"<string>"
],
"lower_bound": true
}
]
},
"estimated_completion_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"attribute": "<string>",
"group": "<string>",
"proposal": {
"options": [
{
"value": "<string>",
"description": "<string>"
}
],
"proposed": [
{
"value": "<string>",
"description": "<string>",
"absorbs": 1,
"sample_ids": [
"<string>"
]
}
],
"sampled": 100,
"escape_documents": 1,
"unlabelled": 1
},
"simulation": {
"population": 1,
"sampled": 1,
"thresholds": {},
"noise": {},
"without_stored_answer": 1,
"examples": [
"<string>"
],
"excluded": {
"failed": 1,
"out_of_scope": 1
},
"fanout": {
"documents": 1,
"tokens": 1,
"row_units": 1,
"judgment_units": 1,
"cost_usd": 1,
"duration_s": 1,
"downstream": [
{
"judgment": "<string>",
"judgments_per_month": 1,
"cost_usd": 1,
"level": 2,
"via": "<string>",
"omitted": [
"<string>"
],
"lower_bound": true
}
]
},
"larger_sample": 123
},
"version": 2,
"report": {
"documents": 1,
"current": {
"mean": 123,
"histogram": [
{
"lower": 123,
"upper": 123,
"count": 1
}
]
},
"candidate": {
"mean": 123,
"histogram": [
{
"lower": 123,
"upper": 123,
"count": 1
}
]
},
"threshold_flips": {},
"recompute": {
"documents": 1,
"tokens": 1,
"row_units": 1,
"judgment_units": 1,
"cost_usd": 1,
"duration_s": 1,
"downstream": [
{
"judgment": "<string>",
"judgments_per_month": 1,
"cost_usd": 1,
"level": 2,
"via": "<string>",
"omitted": [
"<string>"
],
"lower_bound": true
}
]
},
"downstream": [
{
"judgment": "<string>",
"judgments_per_month": 1,
"cost_usd": 1,
"level": 2,
"via": "<string>",
"omitted": [
"<string>"
],
"lower_bound": true
}
],
"calibration_replay": {
"outcomes": 1,
"tokens": 1,
"row_units": 1,
"judgment_units": 1,
"cost_usd": 1
}
},
"backfill_job_id": "<string>",
"result": {
"status": 399,
"body": {
"name": "<string>",
"version": 2,
"active": true,
"warnings": [
"<string>"
],
"definition": {
"name": "<string>",
"question": "<string>",
"type": "bool",
"criteria": "<string>",
"context": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2
},
"horizon": "0s",
"thresholds": {},
"parts": [
{
"name": "<string>",
"question": "<string>"
}
],
"features": [
"<string>"
]
},
"job_id": "<string>",
"job_ids": [
"<string>"
]
}
},
"warnings": [
{
"message": "<string>",
"paths": [
"<string>"
],
"thresholds": [
"<string>"
],
"escape_share": 0.5,
"since": "2023-11-07T05:31:56Z"
}
]
},
"url": "<string>"
},
"test": true
}Authorizations
An organization API key. Keys carry a role (read_write or
read_only) and may be restricted to a namespace prefix such as
acme/*, or to one namespace such as acme/prod/tenant_1. A prefix
matches on a / boundary: acme/prod/tenant_1* covers
acme/prod/tenant_1 and everything under acme/prod/tenant_1/,
never acme/prod/tenant_12.
Headers
Space-separated signatures, each v1, and the base64 HMAC-SHA256 of
{webhook-id}.{webhook-timestamp}.{body}, keyed by the endpoint's
secret: the part after whsec_, base64-decoded. While a rotated
secret is still valid there is one signature per secret; accept the
request if any of them matches.
Body
application/json
Response
2XX
Received. Anything else, or no answer within 15 seconds, is retried.