Skip to content

Update a user

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

Changing the email address checks that no other user has it.

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

Request Body

application/json
  1. body
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 } } }.

Response Body

The updated user.

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 PUT 'https://api.example.com/v1/admin/merchants/497f6eca-6276-4993-bfeb-53cbbbba6f08/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/' \  --user "$API_KEY:" \  -H 'Content-Type: application/json' \  -d '{  "email": "alex@example.com",  "status": "active",  "roles": [    "55f0cfa5-6102-4f87-918c-1025c1ffb913"  ]}'
{  "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"}