User API

post
Create a User

https://www.cotter.app/api/v0/user/create
Create a user during registration
Request
Response
Request
Headers
API_KEY_ID
required
string
Your API_KEY_ID
API_SECRET_KEY
required
string
Your API_SECRET_KEY
Content-Type
optional
string
application/json
Body Parameters
client_user_id
required
string
Your user id in your backend
identifiers
optional
array
Array of emails/phone numbers associated with the user
Response
200: OK
The newly created User object in Cotter's server
{
"ID": "6d24ed5b-4a87-4e7f-81e6-37861f8048ce",
"created_at": "2020-04-06T19:16:27.555304-07:00",
"update_at": "2020-04-06T19:16:27.555304-07:00",
"default_method": null,
"deleted_at": null,
"enrolled": [],
"client_user_id": "xyzABC12345", // Your client user id
"identifiers": [ // Identifiers for this user
"+123456678910"
],
"issuer": "<your API-KEY-ID>" // Your api key id
}

Example Curl Request:

curl -XPOST \
-H 'API_KEY_ID: <your API KEY ID>' \
-H 'API_SECRET_KEY: <your API SECRET KEY>' \
-H "Content-Type: application/json" \
-d '{"client_user_id": "xyzABC12345", "identifiers": ["[email protected]", "+123456678910"]}' \
'https://www.cotter.app/api/v0/user/create'

get
Get User

https://www.cotter.app/api/v0/user/:your_user_id
Get a User object using your user id.
Request
Response
Request
Path Parameters
your_user_id
required
string
User ID that you specified as client_user_id. This should be the UserID in YOUR server
Headers
API_KEY_ID
required
string
Your API_KEY_ID
API_SECRET_KEY
required
string
Your API_SECRET_KEY
Response
200: OK
If your user has enrolled PIN and BIOMETRIC, you'll get the following response
{
"ID": "6d24ed5b-4a87-4e7f-81e6-37861f8048ce",
"created_at": "2020-04-06T19:16:27.555304-07:00",
"update_at": "2020-04-06T19:16:27.555304-07:00",
"default_method": null,
"deleted_at": null,
"client_user_id": "xyzABC12345", // Your client user id
"identifiers": [ // Identifiers for this user
"+123456678910"
],
"issuer": "<your API-KEY-ID>", // Your api key id
"enrolled": ["PIN", "BIOMETRIC"],
"default_method": "BIOMETRIC"
}