/account

These methods allow you to login, get tokens, register, and change passwords.

Login

POST https://pm415.com/api/account/login

Retrieves a valid token that can be set as Bearer in the authorization header. Alternatively, you can use an API key from your user profile.

Request Body

NameTypeDescription

object

{"email":"mattreider@tmail.com", "password":"reider1"}

{
    "token": "eyJ4gTkzXw-ayco9GYMxc1r9xDs...etc...",
    "success": true,
    "user": {
        "id": 4,
        "email": "mattreider@tmail.com",
        "firstName": "Matthew",
        "lastName": "Reider",
        "organizations": [
            {
                "id": 6,
                "name": "matt-org"
            }
        ]
    }
}

Forgot Password

POST https://pm415.com/api/account/forgotpassword

Sends a message to user with a password reminder.

Path Parameters

NameTypeDescription

object

{"email" : "mattreider@tmail.com"}

{
    "message": "A message was sent to the mattreider@tmail.com",
    "success": true,
    "userId": 4
}

Register (new org)

POST https://pm415.com/api/account/register

Register an account for a new organization.

Path Parameters

NameTypeDescription

object

{"email" : "mattreider@tmail.com", "password": "1111", "confirmation": "1111", "firstName": "Matt", "lastName": "Reider", "tosAccepted": "Y", "organization": "MyOrg"}

{
    "userId": 9,
    "success": true
}

Register (existing org)

POST https://pm415.com/api/account/register

Registers users to an existing org. Requires the invitation token that was sent to them by the user that registered the org and invited them.

Request Body

NameTypeDescription

object

{"email" : "mattreider@tmail.com", "password": "1111", "confirmation": "1111", "firstName": "Matt", "lastName": "Reider", "tosAccepted": "Y", "token": "934flsdf94rjsdnk92"}

{
    "userId": 9,
    "success": true
}

Verify account

GET https://pm415.com/api/account/verify?token=eyJiUf3556

Verifies user account using token from verification email.

Query Parameters

NameTypeDescription

token

string

Token that was sent in the verification email.

{
 "userId": 6,
 "success": true,
 "message": "User registration is completed, lets go login"
}

Change Password

POST https://pm415.com/api/account/changepassword

Changes password based on forgotten password action, which can only be initiated from a browser. Token must be valid for the request.

Path Parameters

NameTypeDescription

object

{"password" : "1111", "confirmation": "1111", "token" : "eyJhbGciOiJIUzIY45gBT7TkTbQ"}

{
"userId": 4,
"success": true,
"message": "New password saved"
}

Last updated