Delete a role
Permanently delete a role and its pipeline data. Scope: roles:write.
/api/v1/roles/{id}
🔒 API keyPermanently deletes a role and its associated pipeline data. The delete runs the full cascade cleanup and writes a role-deletion audit log. Scope: roles:write. Visibility-gated (404 if not visible to the key), then requires employer-write authority in the role’s organization (admins bypass).
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The role id. |
Example request
curl -X DELETE https://app.talent-ray.com/api/v1/roles/role_eng_be \
-H "Authorization: Bearer tr_YOUR_KEY"
Response
204 No Content — the role and its pipeline data were deleted.
Status codes
| Status | Meaning |
|---|---|
204 | Deleted. |
401 | No valid API key. |
403 | insufficient_scope (missing roles:write) or forbidden (no write authority in the role’s org). |
404 | Not found, or not visible to the key. |
429 | Rate limit exceeded. |