Apply a companies CSV import
POST /v2/companies/import/apply
Parameters
Header parameters
apps/rest-api/src/shared/idempotency.ts for the full contract. Missing → 400 BadRequest; same key + different body → 409 Conflict.Request body
Content-Type: application/json
"fill_empty", "overwrite""create", "update"Example
{
"view_id": "00000000-0000-0000-0000-000000000000",
"mode": "fill_empty",
"defer_unresolved_company_links": false,
"rows": [
{
"row_index": 0,
"fields": {
"name": "string",
"description": "string"
},
"action": "create"
}
]
}
Responses
200 — Successful response
Content-Type: application/json
"created", "updated", "unchanged", "skipped_archived", "failed"Example
{
"data": {
"results": [
{
"row_index": 0,
"status": "created"
}
]
}
}
400 — Request body failed validation.
Content-Type: application/json
401 — Missing or invalid API key.
Content-Type: application/json
403 — Valid key, insufficient permission.
Content-Type: application/json
404 — Resource does not exist.
Content-Type: application/json
409 — Request conflicts with the current state of the resource.
Content-Type: application/json
429 — Rate limit exceeded.
Content-Type: application/json
500 — Unexpected server error.
Content-Type: application/json
Code samples
curl https://api.prod.getdex.com/v2/companies/import/apply \
--request POST \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header "Idempotency-Key: $(uuidgen 2>/dev/null || python3 -c 'import uuid;print(uuid.uuid4())')" \
--header 'Content-Type: application/json' \
--data '{
"view_id": "00000000-0000-0000-0000-000000000000",
"mode": "fill_empty",
"defer_unresolved_company_links": false,
"rows": [
{
"row_index": 0,
"fields": {
"name": "string",
"description": "string"
},
"action": "create"
}
]
}'
fetch('https://api.prod.getdex.com/v2/companies/import/apply', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Idempotency-Key': crypto.randomUUID(),
'Content-Type': 'application/json'
},
body: JSON.stringify({
view_id: '00000000-0000-0000-0000-000000000000',
mode: 'fill_empty',
defer_unresolved_company_links: false,
rows: [
{
row_index: 0,
fields: {
name: 'string',
description: 'string'
},
action: 'create'
}
]
})
})
import uuid
requests.post(
"https://api.prod.getdex.com/v2/companies/import/apply",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Idempotency-Key": str(uuid.uuid4()),
"Content-Type": "application/json"
},
json={
"view_id": "00000000-0000-0000-0000-000000000000",
"mode": "fill_empty",
"defer_unresolved_company_links": False,
"rows": [
{
"row_index": 0,
"fields": {
"name": "string",
"description": "string"
},
"action": "create"
}
]
}
)
Plan a companies CSV import
Classify up to 500 CSV rows against the workspace's companies without writing anything. Each row carries raw trimmed cells (`fields`, with blank cells omitted), an optional `id`, `owner_email`, `tags`
Get company stats
The caller's per-company stats for every active company (`archived=false`, default) or every archived one (`archived=true`): `contacts_count`, `connections_count`, `last_interaction_at` (the caller's

