Skip to main content
POST
/
events
/
custom
Create a new custom event
curl --request POST \
  --url https://{subdomain}.nudj.cx/api/v2/admin/events/custom \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: <api-key>' \
  --data '{
  "eventName": "<string>",
  "communityId": "<string>",
  "payload": {},
  "userId": "<string>",
  "autoCreateUser": false
}'
{
  "name": "<string>",
  "userId": "<string>",
  "externalUserId": "<string>"
}

Authorizations

x-api-token
string
header
required

Body

application/json
eventName
string
required

The name of the custom event

payload
object
required

The payload of the event. An object made up of any key, value pairs you want to store with the event.

userId
string
required

The Nudj ID or the external ID of the user to log the event for

communityId
string | null

The community that the event belongs to

autoCreateUser
boolean
default:false

Whether to automatically create a user if they don't exist

Response

Successful response

The payload of the event. An object made up of any key, value pairs you want to store with the event. A custom event

userId
string
required

The Nudj ID of the user the event has been logged for

name
string
required

The name of the custom event

externalUserId
string

The external ID of the user the event has been logged for

I