Create a user
Creates a user for the merchant. The email address is the username and must be unique on the platform. Give
the user roles with roles; a user with roles has no permissions of its own.
apiKeyAuthorizationBasic <token>HTTP Basic authentication with an admin API key as the username and an empty password.
merchant_id*stringThe ID of the merchant.
uuidapplication/json- body
email*stringThe username. Unique on the platform.
emailstatus?string"pending""active""inactive"legal_name?stringsalutation?string"mr""mrs""na"phone_numbers?array<string>locale?string|nulltimezone?string|nullroles?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 } } }.
The user is created.
application/json- response
id?stringuuidmerchant_id?stringuuidcreated?stringdate-timemodified?|date-timeemail*stringThe username. Unique on the platform.
emailstatus?string"pending""active""inactive"legal_name?stringsalutation?string"mr""mrs""na"phone_numbers?array<string>locale?string|nulltimezone?string|nullroles?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?stringdate-timecurl -X POST 'https://api.example.com/v1/admin/merchants/497f6eca-6276-4993-bfeb-53cbbbba6f08/users/' \ --user "$API_KEY:" \ -H 'Content-Type: application/json' \ -d '{ "legal_name": "Alex Example", "email": "alex@example.com", "locale": "en_GB", "roles": [ "3367941d-75a2-4193-a8ab-add781d5f7f4" ]}'{ "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"}