v1

latestOpenAPI 3.0.0Apache 2.02026-07-2410185524.2 KB
Users

upsert

Upsert a user record, optionally tagging and creating an interaction. Useful for accepting form submissions. Requires a campaign UUID to be provided as a query parameter.

For custom components:

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

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

post/users/upsert

Query parameters

privateboolean

Returns the full record when authenticated

campaignstring required

The uuid, path or domain of the campaign to associate with the request

Headers

Authorizationstring

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

Request body

Example request

{
  "data": {
    "address1": "31 Sunset Boulevard",
    "address2": "Unit 31b",
    "country": "AU",
    "email": "harveymilk@example.com",
    "firstName": "Leila",
    "fullName": "Leila Norma de Lima",
    "isSamlLogin": true,
    "lastName": "de Lima",
    "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",
    "suburb": "Melbourne",
    "tags": [
      "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
    ],
    "interaction": {
      "categoryUuid": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
    }
  }
}

Response

The user model after creation. To prevent data leaks, this returns only the portions of the user model that were supplied to the request, and the uuid

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",
    "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",
    "unsubscribedAt": "2020-12-03T06:52:46.330Z",
    "updatedAt": "2020-12-03T06:52:46.330Z",
    "username": "harveymilk@example.com",
    "uuid": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
  }
}