Create a New User
POST /accountmanagement/v1/accounts/account_id/users
Once a merchant account has been created, you can add users to it. Users have access to the functionality of the Paysafe Merchant Back Office for that merchant account, including running reports on transactions run through the account.
To create a user, you must initiate a POST request to the users endpoint.
This API request creates a user that is associated with the merchant account. Once you have created a user, you can associate that user with other merchant accounts when you create them.
You can add the same user to multiple merchant accounts, a single user to each merchant account, or multiple users to the same merchant account.
curl -X POST https://api.test.paysafe.com/accountmanagement/v1/accounts/89987201/users \
-u devcentre322:B-qa2-0-53625f86-302c021476f52bdc9deab7aea876bb28762e62f92fc6712d0214736abf501e9675e55940e83ef77f5c304edc7968 \
-H 'Content-Type: application/json' \
-d ' {
"userName": "luke_skywalker",
"password": "Easypass1",
"email": "johnsmith@email.com",
"recoveryQuestion": {
"questionId": "1",
"answer": "Geoffrey"
}
}'
Prior to trying the example above, you should:
- Replace the account number (89987201) in the URL with the Test account number you received.
- Replace the API key (after the -u) with the API key you have received
{
"userName": "luke_skywalker",
"password": "*********",
"email": "johnsmith@email.com",
"recoveryQuestion": {
"questionId": "1",
"question": "What is the name of your oldest sibling?",
"answer": "********"
},
"links": [
{
"rel": "account",
"href": "https://api.test.paysafe.com/accountmanagement/v1/accounts/89987201"
}
]
}
See our API Reference section for a list of all the JSON attributes and types available for the users endpoint.