curl --request POST \
--url https://api.unif.dev/v1/jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "enrich",
"input": {
"currency": "USD",
"period": {
"preset": "last_30d"
},
"fields": [
"name",
"metrics.revenue",
"metrics.revenue_growth_rate"
],
"inputs_url": "https://files.example.com/shops.jsonl"
},
"webhook_id": "whk_01k3m9x7v2q8r4t6y0b1n5d7fa"
}
'{
"id": "job_01k3m9x7v2q8r4t6y0b1n5d7fa",
"object": "job",
"type": "search",
"status": "queued",
"progress": {
"total": 123,
"completed": 123,
"failed": 123
},
"result_count": 123,
"download_url": "<string>",
"error": {
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
},
"credits_charged": 123,
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "filters.revenue.gte must be a non-negative number.",
"param": "filters.revenue.gte",
"doc_url": "https://unif.dev/docs/platform/errors#parameter_invalid",
"request_id": "req_01k3m9x7v2q8r4t6y0b1n5d7fa"
}
}{
"error": {
"type": "billing_error",
"code": "insufficient_credits",
"message": "This request costs 25 credits and 4 remain in the current period.",
"doc_url": "https://unif.dev/docs/platform/credits",
"request_id": "req_01k3m9x7v2q8r4t6y0b1n5d7fa"
}
}Create a job
Runs a search, enrichment or export asynchronously. Use a job when the work exceeds the synchronous limits: more than 100 enrichment inputs, more than 1,000 search results, or any export.
The response returns immediately with status: queued. Poll
Get a job or subscribe to the job.completed webhook.
curl --request POST \
--url https://api.unif.dev/v1/jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "enrich",
"input": {
"currency": "USD",
"period": {
"preset": "last_30d"
},
"fields": [
"name",
"metrics.revenue",
"metrics.revenue_growth_rate"
],
"inputs_url": "https://files.example.com/shops.jsonl"
},
"webhook_id": "whk_01k3m9x7v2q8r4t6y0b1n5d7fa"
}
'{
"id": "job_01k3m9x7v2q8r4t6y0b1n5d7fa",
"object": "job",
"type": "search",
"status": "queued",
"progress": {
"total": 123,
"completed": 123,
"failed": 123
},
"result_count": 123,
"download_url": "<string>",
"error": {
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
},
"credits_charged": 123,
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "filters.revenue.gte must be a non-negative number.",
"param": "filters.revenue.gte",
"doc_url": "https://unif.dev/docs/platform/errors#parameter_invalid",
"request_id": "req_01k3m9x7v2q8r4t6y0b1n5d7fa"
}
}{
"error": {
"type": "billing_error",
"code": "insufficient_credits",
"message": "This request costs 25 credits and 4 remain in the current period.",
"doc_url": "https://unif.dev/docs/platform/credits",
"request_id": "req_01k3m9x7v2q8r4t6y0b1n5d7fa"
}
}Authorizations
Send your workspace API key as a bearer token:
Authorization: Bearer unif_sk_live_...
Keys are scoped to a single workspace. See Authentication.
Headers
A unique key, at most 255 characters. Retrying with the same key returns the original response instead of doing the work twice. Keys are retained for 24 hours.
Body
search, enrich, export The work to run. The shape depends on type:
search— a search request body, with nolimitorcursor.enrich— an enrich request body, orinputs_urlpointing at a JSONL file of inputs.export—entity,format(csvorjsonl) and asearchbody.
Notify this endpoint when the job settles. Omit to poll instead.
Response
The job was accepted.
"job_01k3m9x7v2q8r4t6y0b1n5d7fa"
"job"search, enrich, export queued, running, completed, failed, cancelled, partially_completed For export jobs, a signed URL valid for 24 hours.
Hide child attributes
Hide child attributes
invalid_request_error, authentication_error, permission_error, not_found_error, rate_limit_error, billing_error, coverage_error, api_error "parameter_invalid"
The offending field
Was this page helpful?