Set the company of contacts
POST /v2/companies/{companyId}/set-contacts
Parameters
Path 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
where object POST /v2/contacts/filter takes (ContactFilters), every key and value as documented there. The server parses it in full: a key it does not declare, at any depth, is 400 validation_error with details.reasonunsupported_filter_keys, and an invalid value 400 validation_error with details.reasoninvalid_filters.Example
{
"contact_ids": [
"00000000-0000-0000-0000-000000000000"
],
"filters": {}
}
Responses
200 — Successful response
Content-Type: application/json
"archived", "not_found"Example
{
"data": {
"updated": [
"00000000-0000-0000-0000-000000000000"
],
"unchanged": [
"00000000-0000-0000-0000-000000000000"
],
"skipped": [
{
"id": "00000000-0000-0000-0000-000000000000",
"reason": "archived"
}
],
"contacts": [
{
"id": "00000000-0000-0000-0000-000000000000",
"company": "string",
"primary_company_id": "00000000-0000-0000-0000-000000000000"
}
]
}
}
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/00000000-0000-0000-0000-000000000000/set-contacts \
--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 '{
"contact_ids": [
"00000000-0000-0000-0000-000000000000"
],
"filters": {}
}'
fetch('https://api.prod.getdex.com/v2/companies/00000000-0000-0000-0000-000000000000/set-contacts', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Idempotency-Key': crypto.randomUUID(),
'Content-Type': 'application/json'
},
body: JSON.stringify({
contact_ids: ['00000000-0000-0000-0000-000000000000'],
filters: {}
})
})
import uuid
requests.post(
"https://api.prod.getdex.com/v2/companies/00000000-0000-0000-0000-000000000000/set-contacts",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Idempotency-Key": str(uuid.uuid4()),
"Content-Type": "application/json"
},
json={
"contact_ids": [
"00000000-0000-0000-0000-000000000000"
],
"filters": {}
}
)
Add contacts to a company
Add up to 100 contacts (`contact_ids`) to a company: each one without a current role there gets one (no title), and the others are skipped. Never ends other roles. Any contact outside the workspace is
Get a company org chart
Read a company's org chart: the members who are unarchived and still have a current role at the company, ordered by name, each with `is_champion` and `manager_contact_id`. The manager is the contact's

