DELETE /users/{id}
Delete a user
| Scope | users:delete |
| Role permission | Account Owner role only — any other role is 403 permission_denied, whatever the scopes |
| Cost | Free — removing the user's lines stops billing for them |
PERMANENT. The user is deleted together with their lines, extensions and voicemail boxes — always; there is no "keep the features" option over the API. Telebroad is notified so the removed lines are taken off billing. There is no recovery — not through this API, not in the portal.
- Account Owner only. For an API key, the key's run-as user must
be on the Account Owner role; for an OAuth token, the user who
approved the app. Holding
users:deleteis not enough on its own. - Not yourself. The user the credential acts as (the key's run-as
user, or the approving user) cannot be deleted —
403. - Not the service login. The account's built-in service login
cannot be deleted —
403.
users:delete does not need users:write, and users:write does not
include deleting. Ask for users:read too if you list users before
deleting one.
Returns 204 with an empty body.
Path parameters
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
id | integer | yes | 481920 | The user's id — id from GET /users. |
Responses
204
Deleted. No body.
Errors
| Status | Meaning |
|---|---|
400 | invalid_request — a missing or malformed field, an unknown enum value, or an unknown field in the body. Nothing was charged. |
401 | unauthenticated — no credential, or one that is invalid, revoked or expired. The WWW-Authenticate header names the scope the endpoint wanted. |
403 | Two different failures share this status; the type field tells them apart — insufficient_scope (the credential lacks the scope) or permission_denied (the scope is fine, but the user's role lacks the permission). |
404 | not_found — no such object, or it is not this account's. The two are deliberately indistinguishable. |
500 | internal_error — something failed on our side, not with your request. Safe to retry. |
See Errors for the full catalog and what to do about each.
Example
curl -X DELETE 'https://api.account.telebroad.com/api/public/v1/users/481920' \
-H "Authorization: Bearer $TB_KEY"