Create a user
POST/api/users
Create a user in the Ownli System. This method requires the caller to pass the user attributes. If a user with the same email or cell phone exists return an error.
Request
Query Parameters
Return the user object if a user matching the email or phone number exists. Default behavior is to return an error.
Header Parameters
Partner Id
Client Id
Client Secret
- application/json
Body
required
User's First Name. (Required)
User's Last Name. (Required)
User's Email.
Cell Phone Number of the User. The phone number should be in the E.164 format +15556667777 (Required)
address
object
required
Address
Street Address
City
2 Letter State Code (eg. AL, CA, CO etc.
2 Letter Country Code. Must be US.
Zipcode
Responses
- 200
- 400
- 401
- 409
- 500
The created user object.
- application/json
- Schema
- Example (from schema)
Schema
Unique Id for the user
User's first name
User's last name
User's email address
User's cell phone number
address
object
Address
Street Address Line 1
Street Address Line 2
City
2 Letter State Code
2 Letter Country Code
Zip
Possible values: [None
, Accepted
, Declined
]
User's answer to terms of service for sharing data with Partner. (Only valid for certain partners)
A code generated for the user to share with Partner. (Only valid for certain partners)
Time at which user was registered on the system
Last updated timestamp
{
"id": "string",
"firstName": "string",
"lastName": "string",
"email": "string",
"phone": "string",
"address": {
"addressLine1": "string",
"addressLine2": "string",
"city": "string",
"state": "string",
"country": "string",
"zip": "string"
},
"tosAnswer": "None",
"partnerCode": "string",
"dateRegistered": "string",
"updated": "string"
}
Invalid parameters or invalid state code passed in address. Possible error codes
-
ERROR_INVALID_STATE_CODE
-
ERROR_INVALID_PARAMETERS
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}
Authorization error e.g. due to an invalid or missing API keys.
User exists with phone or email (If the parameter returnExistingUserIfExists is set to false). Possible error codes
-
ERROR_USER_ALREADY_EXISTS
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}
Internal error. Possible error codes
-
INTERNAL_SERVER_ERROR
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}