Request
Supply either a rows array or a raw csv string. Imports up to 500 rows are synchronous; larger payloads are queued and tracked via job_id.
Authorization: Bearer wbk_your_api_key_here
Content-Type: application/json
Strongly recommended. Returns the original result (including job_id) within 24 hours when replayed.
Body Parameters
Array of company objects with the same fields accepted by POST /v1/companies.
Raw CSV string. Provide either rows or csv.
Applies only to CSV imports.
CSV-only. Maps CSV header names to company fields (e.g. { "Company": "name", "Website": "domain" }).
When true, rows with matching domain are updated; when false, they are skipped.
Optional array of tag strings applied to every imported company.
Response
Rows that were not imported
Array of { row_number, code, message } for any failed rows
Responses include X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and X-Request-ID.
curl -X POST \
https://data.leadlex.com/functions/v1/api-gateway/v1/import/companies \
-H "Authorization: Bearer wbk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"rows": [
{ "name": "Acme Corp", "domain": "acme.com", "industry": "Legal Services" }
]
}'
Example Response
{
"data": {
"job_id": "imp_co_01HY1",
"status": "completed",
"created_count": 1,
"updated_count": 0,
"skipped_count": 0,
"errors": []
}
}
Errors
| Status | Code | Description |
|---|
| 400 | validation_error | Neither rows nor csv provided |
| 401 | invalid_key | Invalid or expired API key |
| 403 | insufficient_permissions | Missing write:companies permission |
| 413 | payload_too_large | Payload exceeds 20 MB |
| 429 | rate_limited | Rate limit exceeded |