API Reference

Authentication

Authenticate user with email and password

POST/auth/login

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://api.skylinedigital.io/auth/login" \  -H "Content-Type: application/json" \  -d '{    "email": "string",    "password": "string"  }'
{
  "access_token": "string",
  "refresh_token": "string",
  "requires_2fa_setup": true
}

Generate 2FA secret + QR Code

POST/auth/2fa/generate

Authorization

Access Token
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

curl -X POST "https://api.skylinedigital.io/auth/2fa/generate"
{
  "secret": "string",
  "otpauthUrl": "string",
  "qrCodeDataUrl": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}
{
  "secret": "string",
  "otpauthUrl": "string",
  "qrCodeDataUrl": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}

Verify 2FA code and enable

POST/auth/2fa/verify

Authorization

Access Token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://api.skylinedigital.io/auth/2fa/verify" \  -H "Content-Type: application/json" \  -d '{    "code": "string"  }'
Empty

Disable 2FA

POST/auth/2fa/disable

Authorization

Access Token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://api.skylinedigital.io/auth/2fa/disable" \  -H "Content-Type: application/json" \  -d '{    "code": "string"  }'
Empty

Complete login with 2FA

POST/auth/2fa/login

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://api.skylinedigital.io/auth/2fa/login" \  -H "Content-Type: application/json" \  -d '{    "tempToken": "string",    "code": "string"  }'
{
  "access_token": "string",
  "refresh_token": "string",
  "requires_2fa_setup": true
}

Authenticate client with API key and secret

POST/auth/token

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://api.skylinedigital.io/auth/token" \  -H "Content-Type: application/json" \  -d '{    "clientId": "string",    "secret": "string"  }'
{
  "access_token": "string",
  "refresh_token": "string",
  "requires_2fa_setup": true
}

Register a new user

POST/auth/register

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://api.skylinedigital.io/auth/register" \  -H "Content-Type: application/json" \  -d '{    "firstName": "string",    "lastName": "string",    "email": "string",    "password": "string"  }'
{}

Register a new user and add them to the organization

POST/auth/register-with-organisation

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://api.skylinedigital.io/auth/register-with-organisation" \  -H "Content-Type: application/json" \  -d '{    "firstName": "string",    "lastName": "string",    "email": "string",    "password": "string"  }'
{}

Refresh user authentication token

POST/auth/refresh

Header Parameters

Authorization*string

User refresh token as Bearer {token}

Response Body

application/json

curl -X POST "https://api.skylinedigital.io/auth/refresh" \  -H "Authorization: string"
{}

Change user's password.

POST/auth/change-password

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://api.skylinedigital.io/auth/change-password" \  -H "Content-Type: application/json" \  -d '{    "oldPassword": "string",    "newPassword": "string"  }'
{}

Forgot Password

POST/auth/forgot-password

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

email*string

User existing email for recovering

Response Body

application/json

curl -X POST "https://api.skylinedigital.io/auth/forgot-password" \  -H "Content-Type: application/json" \  -d '{    "email": "string"  }'
{}

Reset Password

POST/auth/reset-password

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://api.skylinedigital.io/auth/reset-password" \  -H "Content-Type: application/json" \  -d '{    "newPasswordToken": "string",    "newPassword": "string"  }'
Empty

Logout

POST/auth/logout

Authorization

Access Token
AuthorizationBearer <token>

In: header

Response Body

curl -X POST "https://api.skylinedigital.io/auth/logout"
Empty

Confirm Account

POST/auth/confirm-account

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

token*string

Token to update the account

Response Body

application/json

curl -X POST "https://api.skylinedigital.io/auth/confirm-account" \  -H "Content-Type: application/json" \  -d '{    "token": "string"  }'
{
  "twoFactorRequired": true,
  "_id": "string",
  "citizenship": [
    {
      "_id": "string",
      "name": "string",
      "isoCode3166": "string",
      "isoCode3166_alpha3": "string",
      "continent": "string",
      "allowedPaymentRails": [
        {
          "_id": "string",
          "name": "string",
          "rail": "string",
          "display": "string",
          "requiredFields": [
            {}
          ],
          "priority": 0,
          "isEnabled": true
        }
      ],
      "iban": true
    }
  ],
  "country": {
    "_id": "string",
    "name": "string",
    "isoCode3166": "string",
    "isoCode3166_alpha3": "string",
    "continent": "string",
    "allowedPaymentRails": [
      {
        "_id": "string",
        "name": "string",
        "rail": "string",
        "display": "string",
        "requiredFields": [
          {}
        ],
        "priority": 0,
        "isEnabled": true
      }
    ],
    "iban": true
  },
  "email": "string",
  "password": "string",
  "firstName": "string",
  "lastName": "string",
  "dateOfBirth": "2019-08-24T14:15:22Z",
  "address": "string",
  "phoneNumber": "string",
  "telegram": "string",
  "isAccountSetup": true,
  "kycOnboardingInfo": "string",
  "kybOnboardingInfo": "string",
  "organisationRole": "string",
  "features": [
    "LOANS"
  ],
  "isActive": true,
  "comments": [
    {
      "comment": "string",
      "user": "string",
      "documents": [
        "string"
      ],
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ]
}

Create API Key

POST/auth/api-key

Authorization

Access Token
AuthorizationBearer <token>

In: header

Response Body

application/json

curl -X POST "https://api.skylinedigital.io/auth/api-key"
{}

Revoke API Key

POST/auth/api-key/revoke

Authorization

Access Token
AuthorizationBearer <token>

In: header

Response Body

application/json

curl -X POST "https://api.skylinedigital.io/auth/api-key/revoke"
"string"

On this page