Use this to create a new user object.
Arguments | |
---|---|
email | The end-users email address. Mandatory if mobile is not supplied. |
mobile | The end-users mobile number, supplied in international format |
firstName | The end-users first name as an optional additional parameter |
lastName | The end-users last name as an optional additional parameter |
Returns
Returns the user object if the update succeeded. Returns an error if update parameters are invalid (e.g. supplying an empty email address).
POST /users
POST /users HTTP/1.1
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN
{
"email": "[email protected]",
"mobile": "+61410888666",
"firstName": "Joe",
"lastName": "Bloggs"
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"type": "user",
"id": "ea3a81",
"email": "[email protected]",
"mobile": "+61410888666",
"firstName": "Joe",
"lastName": "Bloggs",
"links": {
"self": "https://au-api.basiq.io/users/ea3a81"
}
}