v1

latestOpenAPI 3.0.0Apache 2.02026-07-2410185524.2 KB
Authentication

login

Exchange an email and password for a token used for future requests. This endpoint can be used by admin or participant accounts. If you're logging in a participant, an organisationUuid must be present in the body.

For custom components:

RaiselyComponents.api.all('login').post(data = {}, params = {}, headers = {}) => Promise<{result}>

:fa-gears: See Restie Response Data for a more detailed overview of responses through the client wrapper

post/login

Headers

Authorizationstring

A valid HTTP Bearer token, required to access private records.

Request body

usernamestring required

The email address of the account to authenticate.

passwordstring required

The password of the account to authenticate.

requestAdminTokenboolean

By default admins are logged in only with normal participant privileges. Set this to true to get a token that grants full privileges.

otpstring

OTP password to complete 2FA login

mfaTypestring

Either VERIFY or AUTHENTICATOR_APP to specify type of 2fa (optional)

forceSMSboolean

Force an SMS OTP token to be sent

organisationUuidstring

The UUID of the organisation the user is being logged in for. Required to login non-admin users

Response

The created User model (public only)

tokenstring

A bearer token for use in future requests to authenticate the user

Example response

{
  "data": {
    "accessToken": "aaabbbccc",
    "address1": "31 Sunset Boulevard",
    "address2": "Unit 31b",
    "adminSettings": {
      "v4BetaOptin": true,
      "starredCampaigns": [
        "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
        "ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj"
      ]
    },
    "country": "AU",
    "createdAt": "2020-12-03T06:52:46.330Z",
    "email": "harveymilk@example.com",
    "facebookId": "fb_someurl",
    "firstName": "Leila",
    "fullName": "Leila Norma de Lima",
    "internal": {},
    "isAdmin": true,
    "isSamlLogin": true,
    "lastName": "de Lima",
    "organisationUuid": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
    "permission": "PARTICIPANT",
    "phoneNumber": "+1 123-456-7890",
    "photoUrl": "https://raisely-images.imgix.net/www/uploads/t-03-arl-8-es-uhhqua-4-pr-f-4865431-df-58-512-png-08e3f5.png",
    "postcode": "AAA BBBB",
    "preferredName": "Norma",
    "private": {
      "fieldA": "one",
      "fieldB": "yes"
    },
    "public": {
      "fieldA": "one",
      "fieldB": "yes"
    },
    "state": "Victoria",
    "status": "ACTIVE",
    "suburb": "Melbourne",
    "tags": [
      {
        "color": "#ff0000",
        "createdAt": "2020-12-03T06:52:46.330Z",
        "internal": {},
        "isPrivate": true,
        "label": "My Custom Tag",
        "organisationUuid": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
        "path": "example-path",
        "recordType": "user",
        "updatedAt": "2020-12-03T06:52:46.330Z",
        "uuid": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
      }
    ],
    "unsubscribedAt": "2020-12-03T06:52:46.330Z",
    "updatedAt": "2020-12-03T06:52:46.330Z",
    "username": "harveymilk@example.com",
    "uuid": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
  },
  "token": "yJ0eXAiOiJKV1QiLCJhbGciOiJIUz..."
}
All 101 operations