Create a user
Creates a user without a password: let the user set one with the password reset flow. Without a status, the
user is inactive. You can't give a user more permissions than you have.
apiKeyAuthorizationBasic <token>HTTP Basic authentication with an API key or the id of a user token as the username and an empty password.
merchant_id*stringThe ID of the merchant, or self for the merchant of the credentials.
application/json- body
email*stringThe email address, used to log in. Can't be changed once set.
status?string"inactive""pending""active"legal_name?stringphone_numbers?array<string>locale?string|nulltimezone?string|nullroles?array<>The IDs of the roles of the user. Users can't change their own roles.
field_permissions?Field permissions per resource and field, see
Permissions. projects is the only resource.
The new user.
application/json- response
id?stringuuidcreated?stringdate-timemodified?|date-timeemail*stringThe email address, used to log in. Can't be changed once set.
status?string"inactive""pending""active"legal_name?stringphone_numbers?array<string>locale?string|nulltimezone?string|nullmfa?The MFA methods of the user.
roles?array<>The IDs of the roles of the user. Users can't change their own roles.
permissions?Deprecated, use roles.
field_permissions?Field permissions per resource and field, see
Permissions. projects is the only resource.
last_login?|date-timecurl -X POST 'https://api.example.com/v1/merchants/self/users/' \ --user "$API_KEY:" \ -H 'Content-Type: application/json' \ -d '{ "email": "ops@example.com", "legal_name": "Alex Example", "roles": [ "3367941d-75a2-4193-a8ab-add781d5f7f4" ], "status": "active"}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "created": "2019-08-24T14:15:22Z", "modified": "2019-08-24T14:15:22Z", "email": "string", "status": "inactive", "legal_name": "string", "phone_numbers": [ "string" ], "locale": "string", "timezone": "string", "mfa": {}, "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 } } }, "last_login": "2019-08-24T14:15:22Z"}