Create action participation
curl --request POST \
--url https://{subdomain}.nudj.cx/api/v2/integration/action-participations \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '
{
"actionId": "<string>",
"actionInput": {
"key": "interaction-external-link",
"nonce": "<string>"
},
"allocationId": "<string>",
"communityId": "<string>",
"isPreview": true
}
'import requests
url = "https://{subdomain}.nudj.cx/api/v2/integration/action-participations"
payload = {
"actionId": "<string>",
"actionInput": {
"key": "interaction-external-link",
"nonce": "<string>"
},
"allocationId": "<string>",
"communityId": "<string>",
"isPreview": True
}
headers = {
"x-api-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
actionId: '<string>',
actionInput: {key: 'interaction-external-link', nonce: '<string>'},
allocationId: '<string>',
communityId: '<string>',
isPreview: true
})
};
fetch('https://{subdomain}.nudj.cx/api/v2/integration/action-participations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.nudj.cx/api/v2/integration/action-participations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'actionId' => '<string>',
'actionInput' => [
'key' => 'interaction-external-link',
'nonce' => '<string>'
],
'allocationId' => '<string>',
'communityId' => '<string>',
'isPreview' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.nudj.cx/api/v2/integration/action-participations"
payload := strings.NewReader("{\n \"actionId\": \"<string>\",\n \"actionInput\": {\n \"key\": \"interaction-external-link\",\n \"nonce\": \"<string>\"\n },\n \"allocationId\": \"<string>\",\n \"communityId\": \"<string>\",\n \"isPreview\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{subdomain}.nudj.cx/api/v2/integration/action-participations")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"actionId\": \"<string>\",\n \"actionInput\": {\n \"key\": \"interaction-external-link\",\n \"nonce\": \"<string>\"\n },\n \"allocationId\": \"<string>\",\n \"communityId\": \"<string>\",\n \"isPreview\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.nudj.cx/api/v2/integration/action-participations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"actionId\": \"<string>\",\n \"actionInput\": {\n \"key\": \"interaction-external-link\",\n \"nonce\": \"<string>\"\n },\n \"allocationId\": \"<string>\",\n \"communityId\": \"<string>\",\n \"isPreview\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"organisationId": "<string>",
"communityId": "<string>",
"actionId": "<string>",
"userId": "<string>",
"actionCategory": "nudj",
"actionKey": "facebook-comment",
"actionAttributes": {
"key": "question-multiple-choice",
"question": "<string>",
"options": [
{
"id": "<string>",
"label": "<string>"
}
],
"minimumNumberOfAnswersRequired": 2,
"maximumNumberOfAnswersAllowed": 2
},
"allocationId": "<string>",
"allocatedTo": "achievement",
"participationStatuses": [
{
"id": "<string>",
"criteriaMet": true,
"output": {
"key": "interaction-external-link",
"eventId": "<string>"
},
"status": "pending",
"participatedAt": "<string>",
"processingStartedAt": "<string>",
"processedAt": "<string>",
"unmetCriteriaMessage": "<string>",
"metCriteriaMessage": "<string>",
"processingFailedMessage": "<string>"
}
],
"createdAt": "<string>",
"updatedAt": "<string>",
"actionGroupId": "<string>"
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "User not authenticated",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Challenge prerequisite not met",
"issues": []
}{
"code": "CONFLICT",
"message": "Challenge already completed",
"issues": []
}{
"code": "PRECONDITION_FAILED",
"message": "Challenge precondition not met",
"issues": []
}{
"code": "UNPROCESSABLE_CONTENT",
"message": "Action input validation failed",
"issues": [
{
"message": "Expected string, received number",
"path": [
"actionInput"
]
}
]
}{
"code": "TOO_MANY_REQUESTS",
"message": "Challenge completion limit reached",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Action Participations
Create action participation
Create a new action participation.
POST
/
action-participations
Create action participation
curl --request POST \
--url https://{subdomain}.nudj.cx/api/v2/integration/action-participations \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '
{
"actionId": "<string>",
"actionInput": {
"key": "interaction-external-link",
"nonce": "<string>"
},
"allocationId": "<string>",
"communityId": "<string>",
"isPreview": true
}
'import requests
url = "https://{subdomain}.nudj.cx/api/v2/integration/action-participations"
payload = {
"actionId": "<string>",
"actionInput": {
"key": "interaction-external-link",
"nonce": "<string>"
},
"allocationId": "<string>",
"communityId": "<string>",
"isPreview": True
}
headers = {
"x-api-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
actionId: '<string>',
actionInput: {key: 'interaction-external-link', nonce: '<string>'},
allocationId: '<string>',
communityId: '<string>',
isPreview: true
})
};
fetch('https://{subdomain}.nudj.cx/api/v2/integration/action-participations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.nudj.cx/api/v2/integration/action-participations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'actionId' => '<string>',
'actionInput' => [
'key' => 'interaction-external-link',
'nonce' => '<string>'
],
'allocationId' => '<string>',
'communityId' => '<string>',
'isPreview' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.nudj.cx/api/v2/integration/action-participations"
payload := strings.NewReader("{\n \"actionId\": \"<string>\",\n \"actionInput\": {\n \"key\": \"interaction-external-link\",\n \"nonce\": \"<string>\"\n },\n \"allocationId\": \"<string>\",\n \"communityId\": \"<string>\",\n \"isPreview\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{subdomain}.nudj.cx/api/v2/integration/action-participations")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"actionId\": \"<string>\",\n \"actionInput\": {\n \"key\": \"interaction-external-link\",\n \"nonce\": \"<string>\"\n },\n \"allocationId\": \"<string>\",\n \"communityId\": \"<string>\",\n \"isPreview\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.nudj.cx/api/v2/integration/action-participations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"actionId\": \"<string>\",\n \"actionInput\": {\n \"key\": \"interaction-external-link\",\n \"nonce\": \"<string>\"\n },\n \"allocationId\": \"<string>\",\n \"communityId\": \"<string>\",\n \"isPreview\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"organisationId": "<string>",
"communityId": "<string>",
"actionId": "<string>",
"userId": "<string>",
"actionCategory": "nudj",
"actionKey": "facebook-comment",
"actionAttributes": {
"key": "question-multiple-choice",
"question": "<string>",
"options": [
{
"id": "<string>",
"label": "<string>"
}
],
"minimumNumberOfAnswersRequired": 2,
"maximumNumberOfAnswersAllowed": 2
},
"allocationId": "<string>",
"allocatedTo": "achievement",
"participationStatuses": [
{
"id": "<string>",
"criteriaMet": true,
"output": {
"key": "interaction-external-link",
"eventId": "<string>"
},
"status": "pending",
"participatedAt": "<string>",
"processingStartedAt": "<string>",
"processedAt": "<string>",
"unmetCriteriaMessage": "<string>",
"metCriteriaMessage": "<string>",
"processingFailedMessage": "<string>"
}
],
"createdAt": "<string>",
"updatedAt": "<string>",
"actionGroupId": "<string>"
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "User not authenticated",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Challenge prerequisite not met",
"issues": []
}{
"code": "CONFLICT",
"message": "Challenge already completed",
"issues": []
}{
"code": "PRECONDITION_FAILED",
"message": "Challenge precondition not met",
"issues": []
}{
"code": "UNPROCESSABLE_CONTENT",
"message": "Action input validation failed",
"issues": [
{
"message": "Expected string, received number",
"path": [
"actionInput"
]
}
]
}{
"code": "TOO_MANY_REQUESTS",
"message": "Challenge completion limit reached",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Authorizations
Body
application/json
The input to create an external link action participation for a user.
- ExternalLinkActionInput
- EngageWithContentActionInput
- ImageUploadActionInput
- SpotObjectActionInput
- OpenEndedActionInput
- MultipleChoiceActionInput
- SingleFixedAnswerActionInput
- SelectFromImagesActionInput
- RateYourExperienceActionInput
- SelectFromListActionInput
- SecretAccessCodeActionInput
- VoteActionInput
- SelectADateActionInput
- SelectValueInRangeActionInput
- ObjectDetectionActionInput
- ReceiptDetectionActionInput
- FacebookCommentActionInput
- FacebookFollowActionInput
- FacebookLikeActionInput
- InstagramFollowActionInput
- InstagramLikeActionInput
- InstagramCommentActionInput
- InstagramShareActionInput
- InstagramPostActionInput
- CommentOnPostActionInput
- CompleteAchievementActionInput
- GenerativeActionActionInput
- LikePostActionInput
- PlayGameActionInput
- Validate Event Action Input
- SpotifyFollowActionInput
- SpotifyListenActionInput
- SpotifySaveActionInput
- TikTokFollowActionInput
- TikTokPostActionInput
- TikTokWatchActionInput
- YoutubeCommentActionInput
- YoutubeSubscribeActionInput
- YoutubeLikeActionInput
Show child attributes
Show child attributes
The ID of the community where the action is being participated from. Used for cross-community challenges to track which community the user is engaging with.
If true, the action participation will be validated in preview mode so that the action can be previewed and tested. This is only available for admins.
Response
Successful response
An action participation
Available options:
nudj, discord, facebook, imageAnalysis, instagram, interaction, linkedin, question, platform, spotify, tiktok, twitter, youtube Available options:
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 A multiple choice question with configurable options and correct answer validation. The question text is stored in the details.title field of the action, while technical configuration remains in attributes.
- Multiple Choice Question
- Open Ended Question
- Rate Your Experience Question
- Secret Access Code Question
- Select From Images Question
- Select From List Question
- Single Fixed Answer Question
- Vote/Polling Question
- Select A Date Question
- Select Value In Range Question
- External Link Interaction
- Engage With Content Interaction
- Image Upload Interaction
- Spot Object Action
- Object Detection Action Attributes
- Receipt Detection Action Attributes
- Facebook Comment Action Attributes
- Facebook Follow Action Attributes
- Facebook Like Action Attributes
- Instagram Follow Action Attributes
- Instagram Like Action Attributes
- Instagram Comment Action Attributes
- Instagram Share Action Attributes
- Instagram Post Action Attributes
- Comment On Post Action Attributes
- Complete Achievement Action Attributes
- Generative Action Attributes
- Like Post Action Attributes
- Play Game Action Attributes
- Validate Event Action Attributes
- Spotify Follow Action Attributes
- Spotify Listen Action Attributes
- Spotify Save Action Attributes
- Youtube Comment Action Attributes
- Youtube Subscribe Action Attributes
- Youtube Like Action Attributes
- TikTok Follow Action Attributes
- TikTok Post Video With Hashtag Action Attributes
- TikTok Watch Video Action Attributes
Show child attributes
Show child attributes
Available options:
achievement, action, community, challenge, leaderboard, post, reward, reward-asset, reward-entry Show child attributes
Show child attributes
Was this page helpful?

