Sign Up

Users

Get authenticated user

GET
/users/me

Authorization

headerAuthorizationBearer <token>

API Key access

Response Body

User details

application/json
  1. response
id*string

User ID

name*string

User name

email*string

User email

emailVerified*boolean

Whether the user email address has been verified

pylonEmailHash?string

HMAC of the user email for Pylon support-widget identity verification

privacyPoliciesAccepted?boolean

Whether the user has accepted the current privacy policies. Populated on the /users/me endpoint.

publicKeys*array<>

User public keys

createdAt*string

Creation timestamp

Formatdate-time
curl -X GET 'http://localhost:3000/users/me'
{  "emailVerified": true,  "createdAt": "2000-01-23T04:56:07.000+00:00",  "publicKeys": [    {      "name": "name",      "key": "key"    },    {      "name": "name",      "key": "key"    }  ],  "pylonEmailHash": "pylonEmailHash",  "name": "name",  "id": "id",  "email": "email",  "privacyPoliciesAccepted": true}

Record a completed login

POST
/users/me/logins

Called by the dashboard once per completed sign-in. The email access gate evaluates the user and reports the login to analytics; a refused user receives 403 with code EMAIL_ACCESS_DENIED.

Authorization

headerAuthorizationBearer <token>

API Key access

Response Body

Login recorded

curl -X POST 'http://localhost:3000/users/me/logins'
Empty
POST
/users/privacy-policies/accept

Authorization

headerAuthorizationBearer <token>

API Key access

Response Body

Privacy policies accepted

curl -X POST 'http://localhost:3000/users/privacy-policies/accept'
Empty

Get account providers

GET
/users/account-providers

Social sign-in providers (Google, GitHub, ...) enabled for this environment, each flagged with whether the authenticated user has an identity linked through it.

Authorization

headerAuthorizationBearer <token>

API Key access

Response Body

Account providers

application/json
  1. response
[index: integer]?
curl -X GET 'http://localhost:3000/users/account-providers'
[  {    "provider": "provider",    "displayName": "displayName",    "linked": true  }]
Deprecated
POST
/users/linked-accounts

Withdrawn. This operation is no longer supported and always responds 410.

Authorization

headerAuthorizationBearer <token>

API Key access

Request Body

application/json
  1. body
provider*string

The authentication provider of the secondary account

userId*string

The user ID of the secondary account

Response Body

Account linking is no longer supported

curl -X POST 'http://localhost:3000/users/linked-accounts' \  -H 'Content-Type: application/json' \  -d '{  "provider": "provider",  "userId": "userId"}'
Empty
GET
/users/me/pending-sso-links

Authorization

headerAuthorizationBearer <token>

API Key access

Response Body

Pending SSO account links

application/json
  1. response
[index: integer]?
curl -X GET 'http://localhost:3000/users/me/pending-sso-links'
[  {    "organizationId": "organizationId",    "createdAt": "createdAt",    "idpName": "idpName",    "id": "id",    "providerEmail": "providerEmail",    "expiresAt": "expiresAt"  }]
POST
/users/me/pending-sso-links/{id}/confirm

Authorization

headerAuthorizationBearer <token>

API Key access

Path Parameters

id*string

Response Body

SSO identity linked

curl -X POST 'http://localhost:3000/users/me/pending-sso-links/string/confirm'
Empty
DELETE
/users/me/pending-sso-links/{id}

Authorization

headerAuthorizationBearer <token>

API Key access

Path Parameters

id*string

Response Body

Pending SSO link dismissed

curl -X DELETE 'http://localhost:3000/users/me/pending-sso-links/string'
Empty