Remove a user
Overview
Remove a user's access.
Use this when someone leaves.
You'll need the user_id.
The user can no longer log in; their tokens stop working, including their API key, and they stop receiving scheduled email reports. The user's email address can be used again for a new user.
Prerequisites
- A bearer token. See Authentication.
- The user's id, from List users. Send it as
user.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
DELETE /api/v1/users/delete
Authentication
Partner or Account token
- The user must be in the same company as the user behind the token (your partner, or your account), and can't be you. Otherwise the API returns
403 Permission denied. - Only an Owner or Admin User can delete users. You can't delete the Owner, or a user who ranks above you (Owner, then Admin User, then User, Brand Assigned and Location Assigned, then Basic User). Otherwise
403.
Rate limit
This endpoint has no rate limit.
Request parameters
None.
Request body
The DELETE request carries a JSON body.
| Field | Type | Required | Notes |
|---|---|---|---|
user | integer | Yes | The id of the user to remove. |
Request payload
{
"user": 12
}Response body
The payload is inside data.
| Field | Type | Description |
|---|---|---|
status | string | success. |
response | string | User has been deleted successfully. |
Response payload
{
"data": {
"status": "success",
"response": "User has been deleted successfully."
}
}Examples
Success payload
See Response payload.
Error payload
403 Permission denied
The user isn't in your company, or the user is you.
{
"message": "Forbidden",
"status": "error",
"errors": "Permission denied."
}403 Not allowed to manage this user
You're not an Owner or Admin User, or the user is the Owner or ranks above you.
{
"message": "Forbidden",
"status": "error",
"errors": "You do not have permission to manage this user."
}422 user missing
{
"message": "The user field is required.",
"errors": {
"user": [
"The user field is required."
]
}
}422 User doesn't exist
{
"message": "The selected user is invalid.",
"errors": {
"user": [
"The selected user is invalid."
]
}
}500 Delete failed
Nothing was changed.
{
"message": "Internal Server Error",
"status": "error",
"errors": "An error occurred deleting this user!"
}| Status | Meaning |
|---|---|
200 | The user was removed. |
401 | The token is missing, expired or invalid. |
403 | The user isn't in your company, the user is you, or you're not allowed to manage them (see Authentication). |
422 | user is missing or doesn't exist. |
500 | The delete failed (nothing was changed), or an unexpected server error. |
Example request
curl --request DELETE \
--url "https://production-api.shoutaboutus.com/api/v1/users/delete" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"user": 12}'Updated 14 days ago
Did this page help you?
