Log into the account

Returns an access token and the refresh token.

POST/v3/accounts/login

Parameters

NameTypeInDescription
originstringheader
user-Agentstringheader

Request Body Schema

PropertyTypeDescriptionConstraints
accountId*stringUnique identifier of the account.min: 0, max: 36
accountAliasstringUnique account alias.min: 0, max: 256
email*stringEmail address of the user.min: 1, max: 256, format: email
password*stringPassword of the user.min: 8, max: 256
twoFactorCodestringTwo factor code generated by Authenticator app.min: 6, max: 6
twoFactorRecoveryCodestringTwo factor recovery code.min: 1, max: 256

Request Example

{
  "accountId": "string",
  "accountAlias": "string",
  "email": "user@example.com",
  "password": "stringst",
  "twoFactorCode": "string",
  "twoFactorRecoveryCode": "string"
}
Triggers webhook: account.logged-in
POST <your-webhook-url>
{
  "event": "account.logged-in",
  "data": {
    "id": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "name": "string",
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "role": "string",
    "twoFactorEnabled": true,
    "googleSsoEnabled": true,
    "lastLoginAt": "2019-08-24T14:15:22Z",
    "company": "string",
    "allowCustomerPortalAccess": true,
    "roles": [
      "string"
    ],
    "lastSeenAt": "2019-08-24T14:15:22Z",
    "organizationId": "string",
    "organization": {
      "id": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z",
      "name": "string",
      "email": "string",
      "description": "string",
      "allowedUsers": 0,
      "address": {
        "addressLine1": "string",
        "addressLine2": "string",
        "city": "string",
        "state": "string",
        "country": "string",
        "postalCode": "string"
      },
      "resellerId": "string",
      "reseller": {
        "id": "string",
        "createdAt": "2019-08-24T14:15:22Z",
        "updatedAt": "2019-08-24T14:15:22Z",
        "name": "string",
        "email": "string",
        "description": "string",
        "allowedUsers": 0,
        "allowedOrganizations": 0
      }
    },
    "resellerId": "string",
    "reseller": {
      "id": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z",
      "name": "string",
      "email": "string",
      "description": "string",
      "allowedUsers": 0,
      "allowedOrganizations": 0
    },
    "metadata": [
      {
        "id": "string",
        "createdAt": "2019-08-24T14:15:22Z",
        "updatedAt": "2019-08-24T14:15:22Z",
        "key": "string",
        "value": "string",
        "viewPermissions": [
          "activation"
        ],
        "visible": true
      }
    ],
    "tags": [
      "string"
    ],
    "emailPreference": {
      "metrics": true
    }
  },
  "triggeredAt": "string"
}

Responses

200 OK
{
  "accessToken": "string",
  "refreshToken": "string"
}