User API

Create a User

POST https://www.cotter.app/api/v0/user/create

Create a User during registration

Headers

NameTypeDescription

API_KEY_ID

string

Your API_KEY_ID

Content-Type

string

application/json

Request Body

NameTypeDescription

identifier

string

An identifier for the user, like email, phone number, or username

{
  "ID": "abcdefgh-bc20-4ccb-afdf-7fe16c061b30", // [Deprecated] Cotter User ID
  "client_user_id": "abcdefgh-bc20-4ccb-afdf-7fe16c061b30", // [Deprecated]
  "created_at": "2020-08-01T05:55:57.480314022Z",
  "default_method": null,
  "deleted_at": "0001-01-01T00:00:00Z",
  "enrolled": [],
  "identifier": "hello@gmail.com",
  "identifiers": null,
  "issuer": "<YOUR API KEY ID>i",
  "updated_at": "2020-08-01T05:55:57.480314368Z"
}

Example Curl Request:

curl -XPOST \
-H 'API_KEY_ID: <your API KEY ID>' \
-H "Content-Type: application/json" \
-d '{"identifier": "hello@gmail.com"}' \
'https://www.cotter.app/api/v0/user/create'

Get User

GET https://www.cotter.app/api/v0/user?identifier=<identifier>

Get a User object using your user's identifier.

Query Parameters

NameTypeDescription

identifier

string

The identifier for the user, like the email, phone, or username that was used to create the user.

Headers

NameTypeDescription

API_KEY_ID

string

Your API_KEY_ID

{
  "ID": "abcdefgh-bc20-4ccb-afdf-7fe16c061b30", // [Deprecated] Cotter User ID
  "client_user_id": "abcdefgh-bc20-4ccb-afdf-7fe16c061b30", // [Deprecated]
  "created_at": "2020-08-01T05:55:57.480314022Z",
  "default_method": "TRUSTED_DEVICE",
  "deleted_at": "0001-01-01T00:00:00Z",
  "enrolled": ["TRUSTED_DEVICE"],
  "identifier": "hello@gmail.com",
  "identifiers": null,
  "issuer": "<YOUR API KEY ID>i",
  "updated_at": "2020-08-01T05:55:57.480314368Z"
}

Get All Users

GET https://www.cotter.app/api/v0/user/list?page=0

Get a list of Users that is registered under your API Key. This endpoint is paginated, each page returns 50 records, ordered by created_at descendant (newest user shows up first)

Query Parameters

NameTypeDescription

page

number

The page number that you want to access. Page numbers start from 0. Each page retrieves 50 records, ordered by created_at descendant.

Headers

NameTypeDescription

API_SECRET_KEY

string

Your API_SECRET_KEY

API_KEY_ID

string

Your API_KEY_ID

[
  {
    "ID": "jklmnopqr-abcd-abcd-abcd-1168d4b38d0d", // [Deprecated] Cotter User ID
    "created_at": "0001-01-01T00:00:00Z",
    "updated_at": "0001-01-01T00:00:00Z",
    "deleted_at": "0001-01-01T00:00:00Z",
    "issuer": "abcdefgh-abcd-abcd-abcd-f901315ad31b",
    "client_user_id": "jklmnopqr-abcd-abcd-abcd-1168d4b38d0d",
    "enrolled": [],
    "default_method": null,
    "identifier": "team1@cotter.app",
    "identifiers": null
  },
  {
    "ID": "stuvxyza-abcd-abcd-abcd-6eb4c013e610", // [Deprecated] Cotter User ID
    "created_at": "0001-01-01T00:00:00Z",
    "updated_at": "0001-01-01T00:00:00Z",
    "deleted_at": "0001-01-01T00:00:00Z",
    "issuer": "abcdefgh-abcd-abcd-abcd-f901315ad31b",
    "client_user_id": "stuvxyza-abcd-abcd-abcd-6eb4c013e610",
    "enrolled": [],
    "default_method": null,
    "identifier": "team2@cotter.app",
    "identifiers": null
  },
  {
    "ID": "abcdefgh-abcd-abcd-abcd-22bc178867ef", // [Deprecated] Cotter User ID
    "created_at": "0001-01-01T00:00:00Z",
    "updated_at": "2020-07-21T02:42:16.318885Z",
    "deleted_at": "0001-01-01T00:00:00Z",
    "issuer": "abcdefgh-abcd-abcd-abcd-f901315ad31b",
    "client_user_id": "bdabcdefgh-abcd-abcd-abcd-22bc178867ef",
    "enrolled": [
      "WEBAUTHN"
    ],
    "default_method": "WEBAUTHN",
    "identifier": "team@cotter.app",
    "identifiers": null
  }
]

Last updated