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

Base URL

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://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.

FieldTypeRequiredNotes
userintegerYesThe id of the user to remove.

Request payload

{
  "user": 12
}

Response body

The payload is inside data.

FieldTypeDescription
statusstringsuccess.
responsestringUser 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!"
}
StatusMeaning
200The user was removed.
401The token is missing, expired or invalid.
403The user isn't in your company, the user is you, or you're not allowed to manage them (see Authentication).
422user is missing or doesn't exist.
500The 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}'

Did this page help you?