Skip to content

Deactivate a user

DELETE
/v1/admin/merchants/{merchant_id}/users/{user_id}/

Sets the status of the user to inactive.

Authorization

apiKey
headerAuthorizationBasic <token>

HTTP Basic authentication with an admin API key as the username and an empty password.

Path Parameters

merchant_id*string

The ID of the merchant.

Formatuuid
user_id*string

The ID of the user.

Formatuuid

Response Body

The user, with status inactive.

application/json
  1. response
id?string
Formatuuid
merchant_id?string
Formatuuid
created?string
Formatdate-time
modified?|
Formatdate-time
email*string

The username. Unique on the platform.

Formatemail
status?string
Value in"pending""active""inactive"
legal_name?string
salutation?string
Value in"mr""mrs""na"
phone_numbers?array<string>
locale?string|null
timezone?string|null
roles?array<>

The role IDs of the user. Users can't change their own roles.

permissions?

Don't use; give the user roles instead.

field_permissions?

Field-level read and write restrictions per resource: { resource: { field: { read, write } } }.

mfa?

The multi-factor authentication methods the user enrolled in.

last_login?string
Formatdate-time
curl -X DELETE 'https://api.example.com/v1/admin/merchants/497f6eca-6276-4993-bfeb-53cbbbba6f08/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/' \  --user "$API_KEY:"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea",  "created": "2019-08-24T14:15:22Z",  "modified": "2019-08-24T14:15:22Z",  "email": "alex@example.com",  "status": "pending",  "legal_name": "Alex Example",  "salutation": "mr",  "phone_numbers": [    "string"  ],  "locale": "en_GB",  "timezone": "string",  "roles": [    "3e67ee41-e431-4abb-a52b-02eab88ad745"  ],  "permissions": {    "property1": {      "GET": true,      "POST": true,      "PUT": true,      "DELETE": true,      "*": true    },    "property2": {      "GET": true,      "POST": true,      "PUT": true,      "DELETE": true,      "*": true    }  },  "field_permissions": {    "property1": {      "property1": {        "read": true,        "write": true      },      "property2": {        "read": true,        "write": true      }    },    "property2": {      "property1": {        "read": true,        "write": true      },      "property2": {        "read": true,        "write": true      }    }  },  "mfa": {},  "last_login": "2019-08-24T14:15:22Z"}