CorefinityCorefinityDocs
Open the Control PanelControl Panel
Team · 9 of 17

Delete a custom role

Deletes a custom role of your company. A role somebody still holds is refused: give those people another role first.

DELETE/api/roles/{id}/delete

Path parameters

idintegerRequired

The id of a custom role of your company, as GET /team/roles lists it. Digits only; anything else answers 404. At least 1.

Returns

200 The role was deleted.

Fields of the 200 answer
dataany

The result. Each endpoint says what it holds.

messagestringRequired
statusstringRequired

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403forbiddenThe person is not allowed to do this.
403scope_requiredUse a token with the scope named in scope.
404noneCheck the id. You see only what your account can reach.
409in_useIt is still in use, still being removed, or managed somewhere else. Read the message: wait for the removal, remove what uses it first, or remove it where the message says.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl -X DELETE https://manage.corefinity.com/api/roles/3107/delete \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "message": "Role deleted.",
  "status": "success"
}
Try it

Try it is off for this endpointIt deletes data that cannot be brought back. Copy the request and run it yourself when you are sure.

Was this helpful?
Open in ClaudeOpen in ChatGPT