---
title: "Delete a team member"
url: https://docs.corefinity.com/api/reference/organisation/delete-team-user
type: endpoint
last_updated: 2026-11-13
feature: team
related:
  - https://docs.corefinity.com/guides/organisation/people/users-and-invitations.md
  - https://docs.corefinity.com/mcp/tools/corestack_team_member_remove.md
---
# Delete a team member

Deletes the member's account. For somebody who has not accepted yet, this cancels the invitation and its link
stops working. The company's last owner and its only user cannot be removed. You need to be an owner or hold
the `deleteUsers` permission.

```http
DELETE /api/user/{id}/delete
```

- Scope: `write`
- Rate limit: 60 a minute
- Try it in the console: off. It deletes data that cannot be brought back. Copy the request and run it yourself when you are sure.

## Path parameters

- `id` (integer, required): The id of a user. Digits only; anything else answers `404`.

## Request

### curl

```bash
curl -X DELETE https://manage.corefinity.com/api/user/2042/delete \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
```

### PHP

```php
use Illuminate\Support\Facades\Http;

$response = Http::withToken(env('COREFINITY_TOKEN'))
    ->acceptJson()
    ->delete('https://manage.corefinity.com/api/user/2042/delete');

$data = $response->json();
```

### Node

```javascript
const res = await fetch('https://manage.corefinity.com/api/user/2042/delete', {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
    Accept: 'application/json',
  },
});

// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);
```

### Python

```python
import os
import requests

res = requests.delete(
    "https://manage.corefinity.com/api/user/2042/delete",
    headers={
        "Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
        "Accept": "application/json",
    },
)

data = res.json() if res.content else None
```

## Responses

### 200 The member who was removed.

```json
{
  "data": {
    "company_id": "1204",
    "email": "tom.harbour@harbourandfinch.example.com",
    "id": "2042",
    "mobile": null,
    "name": "Tom Harbour",
    "role": [
      {
        "name": "Member (Full Access)",
        "permissions": [
          "viewWebsites",
          "viewDeployments",
          "viewTickets",
          "createTickets"
        ],
        "slug": "client-member-full"
      }
    ]
  },
  "message": "User has been deleted successfully",
  "status": "success"
}
```

### 401 No token, or a token that is not valid.

```json
{
  "message": "Unauthenticated."
}
```

### 403 The token lacks the `write` scope (`scope_required`), you may not delete users (`forbidden`), the account is not yours to change (`privileged_target`), the member is the company's last owner (`last_owner`) or its only user (`only_user`).

```json
{
  "code": "forbidden",
  "message": "You are not allowed to delete users.",
  "reason": "forbidden",
  "status": "error"
}
```

### 404 The id does not exist, or it is something you cannot see. Both answer the same body.

```json
{
  "message": "Not found."
}
```

### 429 Too many requests (`rate_limited`). Wait for the number of seconds in `Retry-After`, which `retry_after_seconds` repeats.

```json
{
  "code": "rate_limited",
  "message": "Too many requests. Try again in 60 seconds.",
  "reason": "rate_limited",
  "retry_after_seconds": 60
}
```

## If it is refused

| Status | Reason | What to do |
|---|---|---|
| 401 |  | Send a valid token as `Authorization: Bearer <token>`. |
| 403 | `forbidden` | The person is not allowed to do this. |
| 403 | `last_owner` | The organisation must keep at least one owner. Make someone else an owner first. |
| 403 | `only_user` | This is the only user in the organisation. Add another user first. |
| 403 | `privileged_target` | That person's account can be changed only by Corefinity. Contact support. |
| 403 | `scope_required` | Use a token with the scope named in `scope`. |
| 404 |  | Check the id. You see only what your account can reach. |
| 429 | `rate_limited` | Wait for the seconds in `Retry-After`. |

## The same task elsewhere

- Guide: [Users and invitations](https://docs.corefinity.com/guides/organisation/people/users-and-invitations.md)
- MCP tool: [`corestack_team_member_remove`](https://docs.corefinity.com/mcp/tools/corestack_team_member_remove.md)
