Sending a Custom Event
Request structure
await fetch("https://server.torque.so/event/custom", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-torque-api-key": "<YOUR_API_KEY>",
},
body: JSON.stringify(payload),
});{
"timestamp": 1731596206795, // In ms or valid date string
"userPubkey": "<PUB_KEY>", // User's pubkey
"eventName": "<event_name>", // The name of the event as configured in Settings
"data": {
"<string_param_name>": "<value>",
"<number_param_name>": 0,
"<boolean_param_name>": true || false,
}
}Example request
Last updated