Skip to content
MothershipDevelopers

API referenceUsers

Suspend a user

Suspends a user in your organization, as removing them from the People page does. They lose access to your organization right away, their status becomes inactive, and their past shipments and history stay. Suspending a user who is already inactive changes nothing. You can't suspend yourself, and an account Mothership suspended can't be changed. Only your organization's owners and managers can suspend users. Requires the organization:user.suspend permission.

POST/users/{userId}/suspend
Environment
https://sandbox.api.mothership.com/beta
curl --request POST \
  --url 'https://sandbox.api.mothership.com/beta/users/userId/suspend' \
  --header "Authorization: Bearer $MOTHERSHIP_API_TOKEN" \
  --header 'Accept: application/json'
Reads your token from $MOTHERSHIP_API_TOKEN
Response
{
: {
: "3f1c2a9e-5b7d-4e8a-9c61-2d4f8b0e7a15",
: "logistics@example.com",
: "Dana",
: "Reyes",
: "owner",
: "active"
}
}

Hover a key to see what it means. Click it to jump to the field.

Authorization: Bearer <token>

Your sandbox API token. See Authentication.

  • userIdstringRequired

    ID of the user, from List users

    • dataobjectRequired
      • idstringRequired

        ID of the user

      • emailstringRequired

        Email address the user signs in with

      • firstNamestringRequired
      • lastNamestringRequired
      • rolestringRequired

        The highest role the user holds in the organization. owner can't be granted through the API.

        ownermanageraccountantshipperviewer
        nullable
      • statusstringRequired

        active users can sign in. Suspending a user through this API sets inactive. suspended means Mothership suspended the account, and it can't be changed through the API.

        activeinactivesuspended