Plan a companies CSV import
POST /v2/companies/import/plan
Request body
Content-Type: application/json
Example
{
"rows": [
{
"row_index": 0,
"fields": {
"name": "string",
"description": "string"
}
}
]
}
Responses
200 — Successful response
Content-Type: application/json
"create", "update", "review", "skip_archived", "invalid"Example
{
"data": {
"results": [
{
"row_index": 0,
"action": "create",
"match_key": "string"
}
]
}
}
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/plan \
--request POST \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"rows": [
{
"row_index": 0,
"fields": {
"name": "string",
"description": "string"
}
}
]
}'
fetch('https://api.prod.getdex.com/v2/companies/import/plan', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
rows: [
{
row_index: 0,
fields: {
name: 'string',
description: 'string'
}
}
]
})
})
requests.post(
"https://api.prod.getdex.com/v2/companies/import/plan",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"rows": [
{
"row_index": 0,
"fields": {
"name": "string",
"description": "string"
}
}
]
}
)
Export companies as CSV
Download the workspace's companies as one CSV file, ordered by name, then id. The body takes exactly one of three shapes: `{ company_ids }` (1-50,000 ids; archived companies included, ids outside the
Apply a companies CSV import
Write up to 100 reviewed rows. Every row is planned again, never trusted from the plan, and written in its own transaction, so one bad row never stops the others: each result is `created`, `updated`,

