Skip to main content
POST
/
v1
/
import
/
companies
Import Companies
curl --request POST \
  --url https://api.example.com/v1/import/companies \
  --header 'Content-Type: application/json' \
  --data '
{
  "rows": [
    {}
  ],
  "csv": "<string>",
  "has_header": true,
  "mapping": {},
  "update_existing": true,
  "tags": [
    {}
  ]
}
'
{
  "data": {
    "job_id": "<string>",
    "status": "<string>",
    "created_count": 123,
    "updated_count": 123,
    "skipped_count": 123,
    "errors": [
      {}
    ]
  }
}

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.

Headers

Authorization: Bearer wbk_your_api_key_here
Content-Type: application/json
Idempotency-Key
string
Strongly recommended. Returns the original result (including job_id) within 24 hours when replayed.

Body Parameters

rows
array
Array of company objects with the same fields accepted by POST /v1/companies.
csv
string
Raw CSV string. Provide either rows or csv.
has_header
boolean
default:"true"
Applies only to CSV imports.
mapping
object
CSV-only. Maps CSV header names to company fields (e.g. { "Company": "name", "Website": "domain" }).
update_existing
boolean
default:"false"
When true, rows with matching domain are updated; when false, they are skipped.
tags
array
Optional array of tag strings applied to every imported company.

Response

data
object
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

StatusCodeDescription
400validation_errorNeither rows nor csv provided
401invalid_keyInvalid or expired API key
403insufficient_permissionsMissing write:companies permission
413payload_too_largePayload exceeds 20 MB
429rate_limitedRate limit exceeded