End a company role
POST /v2/company-roles/{roleId}/end
Parameters
Path parameters
Request body
Content-Type: application/json
Example
{
"end_year": 0,
"end_month": 0
}
Responses
200 — Successful response
Content-Type: application/json
"current", "past", "unknown""manual", "add_people", "csv_import", "auto_link", "copy", "mcp", "extension", "migration", "text_conversion", "merge"Example
{
"data": {
"roles": [
{
"id": "00000000-0000-0000-0000-000000000000",
"contact_id": "00000000-0000-0000-0000-000000000000",
"company_id": "00000000-0000-0000-0000-000000000000",
"user_id": "string",
"workspace_id": "00000000-0000-0000-0000-000000000000",
"title": "string",
"status": "current",
"is_primary": false,
"start_year": 0,
"start_month": 0,
"start_day": 0,
"end_year": 0,
"end_month": 0,
"end_day": 0,
"provenance": "manual",
"created_at": "2026-10-23T10:31:51.489Z",
"updated_at": "2026-10-23T10:31:51.489Z",
"company": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"logo_url": "string",
"archived_at": "2026-10-23T10:31:51.489Z"
}
}
],
"contact": {
"id": "00000000-0000-0000-0000-000000000000",
"company": "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/company-roles/00000000-0000-0000-0000-000000000000/end \
--request POST \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"end_year": 0,
"end_month": 0
}'
fetch('https://api.prod.getdex.com/v2/company-roles/00000000-0000-0000-0000-000000000000/end', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
end_year: 0,
end_month: 0
})
})
requests.post(
"https://api.prod.getdex.com/v2/company-roles/00000000-0000-0000-0000-000000000000/end",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"end_year": 0,
"end_month": 0
}
)
Remove a company role
Delete a role that was never true. To record that someone left, end the role instead. Another current role becomes primary when this one was. 404 `record_not_found` when the role is not in the workspa
Reopen a company role
Mark a role current again and clear its end date. An archived company or contact is 409 `company_archived` / `contact_archived`. 404 `record_not_found` when the role is not in the workspace. Viewers a

