Create a new event link
curl --request POST \
--url https://{subdomain}.nudj.cx/api/v2/admin/events/custom/link \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '
{
"eventName": "<string>",
"payload": {},
"communityId": "<string>",
"expiryTime": 3600,
"isSingleUse": true
}
'import requests
url = "https://{subdomain}.nudj.cx/api/v2/admin/events/custom/link"
payload = {
"eventName": "<string>",
"payload": {},
"communityId": "<string>",
"expiryTime": 3600,
"isSingleUse": 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({
eventName: '<string>',
payload: {},
communityId: '<string>',
expiryTime: 3600,
isSingleUse: true
})
};
fetch('https://{subdomain}.nudj.cx/api/v2/admin/events/custom/link', 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/admin/events/custom/link",
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([
'eventName' => '<string>',
'payload' => [
],
'communityId' => '<string>',
'expiryTime' => 3600,
'isSingleUse' => 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/admin/events/custom/link"
payload := strings.NewReader("{\n \"eventName\": \"<string>\",\n \"payload\": {},\n \"communityId\": \"<string>\",\n \"expiryTime\": 3600,\n \"isSingleUse\": 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/admin/events/custom/link")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"eventName\": \"<string>\",\n \"payload\": {},\n \"communityId\": \"<string>\",\n \"expiryTime\": 3600,\n \"isSingleUse\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.nudj.cx/api/v2/admin/events/custom/link")
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 \"eventName\": \"<string>\",\n \"payload\": {},\n \"communityId\": \"<string>\",\n \"expiryTime\": 3600,\n \"isSingleUse\": true\n}"
response = http.request(request)
puts response.read_body{
"url": "<string>"
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Events
Create a new event link
Creates a link to the Nudj platform. When a user follows the link and registers/signs in, they will have the event logged on their behalf.
POST
/
events
/
custom
/
link
Create a new event link
curl --request POST \
--url https://{subdomain}.nudj.cx/api/v2/admin/events/custom/link \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '
{
"eventName": "<string>",
"payload": {},
"communityId": "<string>",
"expiryTime": 3600,
"isSingleUse": true
}
'import requests
url = "https://{subdomain}.nudj.cx/api/v2/admin/events/custom/link"
payload = {
"eventName": "<string>",
"payload": {},
"communityId": "<string>",
"expiryTime": 3600,
"isSingleUse": 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({
eventName: '<string>',
payload: {},
communityId: '<string>',
expiryTime: 3600,
isSingleUse: true
})
};
fetch('https://{subdomain}.nudj.cx/api/v2/admin/events/custom/link', 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/admin/events/custom/link",
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([
'eventName' => '<string>',
'payload' => [
],
'communityId' => '<string>',
'expiryTime' => 3600,
'isSingleUse' => 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/admin/events/custom/link"
payload := strings.NewReader("{\n \"eventName\": \"<string>\",\n \"payload\": {},\n \"communityId\": \"<string>\",\n \"expiryTime\": 3600,\n \"isSingleUse\": 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/admin/events/custom/link")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"eventName\": \"<string>\",\n \"payload\": {},\n \"communityId\": \"<string>\",\n \"expiryTime\": 3600,\n \"isSingleUse\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.nudj.cx/api/v2/admin/events/custom/link")
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 \"eventName\": \"<string>\",\n \"payload\": {},\n \"communityId\": \"<string>\",\n \"expiryTime\": 3600,\n \"isSingleUse\": true\n}"
response = http.request(request)
puts response.read_body{
"url": "<string>"
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Authorizations
Body
application/json
The name of the custom event
The payload of the event. An object made up of any key, value pairs you want to store with the event.
The community that the event belongs to
Pattern:
^[0-9a-fA-F]{24}$Amount of time (in seconds) until the link will expire
Whether the link should be able to be used by a single user (true) or multiple users (false)
Response
Successful response
The generated event link
Was this page helpful?
⌘I

