Skip to main content
POST
/
variables
/
{variableId}
Create or update a variable value
curl --request POST \
  --url https://{subdomain}.nudj.cx/api/v2/integration/variables/{variableId} \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: <api-key>' \
  --data '{
  "value": "<string>",
  "eventName": "achievement-completion",
  "eventId": "<string>"
}'
{
  "id": "<string>",
  "organisationId": "<string>",
  "type": "form-short-text",
  "name": "<string>",
  "label": "<string>",
  "placeholder": "<string>",
  "maxValueOccurrences": 2,
  "isSingleOutputPerUser": true,
  "isImmutable": true,
  "value": "<string>",
  "valueCaptureDate": "<string>",
  "valueValidationDate": "<string>",
  "useDefaultProfileValue": true,
  "prerequisiteVariableConfigIds": [
    "<string>"
  ],
  "options": [
    {
      "key": "<string>",
      "value": "<string>"
    }
  ]
}

Authorizations

x-api-token
string
header
required

Path Parameters

variableId
string
required

Body

application/json
value
string
required
eventName
enum<string>
Available options:
achievement-completion,
facebook-comment,
facebook-follow,
facebook-like,
image-analysis-object-detection,
image-analysis-receipt-detection,
instagram-follow,
instagram-like,
instagram-comment,
instagram-share,
instagram-post,
interaction-engage-with-content,
interaction-external-link,
interaction-image-upload,
interaction-spot-object,
platform-comment-on-post,
platform-complete-achievement,
platform-generative-action,
platform-like-post,
platform-play-game,
platform-validate-event,
question-multiple-choice,
question-open-ended,
question-rate-your-experience,
question-secret-access-code,
question-select-date,
question-select-from-images,
question-select-value-in-range,
question-select-from-list,
question-closed-ended,
question-vote,
spotify-follow,
spotify-listen,
spotify-save,
tiktok-follow,
tiktok-watch,
tiktok-post,
youtube-like,
youtube-comment,
youtube-subscribe,
action-completion,
skip-action,
42-school,
api-auth-link,
api-token-link,
apple,
asgardeo,
atlassian,
auth0,
authentik,
azure-ad-b2c,
azure-ad,
azure-devops,
battlenet,
beyondidentity,
box,
boxyhq-saml,
bungie,
click-up,
cognito,
coinbase,
descope,
discord,
dribbble,
dropbox,
duende-identity-server6,
email,
eveonline,
facebook,
faceit,
foursquare,
freshbooks,
fusionauth,
github,
gitlab,
google,
hubspot,
identity-server4,
instagram,
kakao,
keycloak,
line,
linkedin,
mailchimp,
mailru,
mastodon,
mattermost,
medium,
naver,
netlify,
notion,
okta,
onelogin,
organisation-oidc,
osso,
osu,
passage,
patreon,
pinterest,
pipedrive,
reddit,
salesforce,
slack,
spotify,
strava,
tiktok,
todoist,
trakt,
twitch,
twitter,
united-effects,
vk,
wikimedia,
wordpress,
workos,
yandex,
youtube,
zitadel,
zoho,
zoom,
blog-comment,
blog-like,
blog-share,
blog-view,
challenge-started,
challenge-completion,
challenge-unlock,
community-visit,
parental-approval-requested,
parental-approval-approved,
parental-approval-rejected,
custom,
game-started,
game-completed,
leaderboard-finish,
invite-admin-user,
points-credit,
points-spend,
post-comment,
post-like,
post-view,
reward-redemption,
reward-allocation-purchase,
reward-giveaway-winner,
reward-claim,
reward-distribution,
manual-distribution,
referral-link-used,
shop-purchase,
share-challenge-details,
share-challenge-results,
share-community,
share-reward,
share-post,
share-profile,
share-anything,
streak-extended,
profile-picture-added,
bio-added,
variable-captured,
xp-gained,
xp-total,
xp-leaderboard-topper
eventId
string

Response

Successful response

A variable

id
string
required

The id of the variable

organisationId
string
required

The organisation that the variable belongs to

type
enum<string>
required

Determines how the variable should be rendered in the UI (e.g., text input, select dropdown, date picker, etc.)

Available options:
form-short-text,
form-long-text,
form-number,
form-select,
form-checkbox,
form-email,
form-name,
form-address,
form-date
name
string
required

The name of the variable

label
string
required

The label of the variable

maxValueOccurrences
number
required

The maximum number of times a unique value can be used across all instances of this variable

Required range: x >= 1
isSingleOutputPerUser
boolean
required

Whether a user can only have one value for this variable

isImmutable
boolean
required

Whether the value, once set by a user, cannot be changed

useDefaultProfileValue
boolean
required

Whether to use the default profile value

placeholder
string | null

The placeholder text for the variable

value
string | null

The value of the variable. For select variables, this refers to the key of the selected option

valueCaptureDate
string | null

The date when the value was captured

valueValidationDate
string | null

The date when the value was validated

prerequisiteVariableConfigIds
string[] | null

The variable configs that must be completed before this one

options
object[] | null

The possible options for this variable

I