curl --request POST \
--url https://edpire.com/api/v1/submissions/{id}/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"question_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"node_id": "<string>",
"payload": {}
}
'import requests
url = "https://edpire.com/api/v1/submissions/{id}/events"
payload = {
"question_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"node_id": "<string>",
"payload": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
question_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
node_id: '<string>',
payload: {}
})
};
fetch('https://edpire.com/api/v1/submissions/{id}/events', 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://edpire.com/api/v1/submissions/{id}/events",
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([
'question_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'node_id' => '<string>',
'payload' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://edpire.com/api/v1/submissions/{id}/events"
payload := strings.NewReader("{\n \"question_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"node_id\": \"<string>\",\n \"payload\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://edpire.com/api/v1/submissions/{id}/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"question_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"node_id\": \"<string>\",\n \"payload\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://edpire.com/api/v1/submissions/{id}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"question_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"node_id\": \"<string>\",\n \"payload\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"ok": true
},
"error": {
"message": "<string>"
},
"meta": {}
}{
"data": null,
"error": {
"message": "<string>"
},
"meta": null
}{
"data": null,
"error": {
"message": "<string>"
},
"meta": null
}Record Event
Records a structured interaction event for an in-progress submission. Use this to stream telemetry from your player to Edpire for analytics and proctoring.
answer_change — fires each time a learner modifies their answer
for a question. Requires question_id. Atomically increments the
change_count counter on the answer row so you can see how many times
a learner revised each answer.
node_view — learner viewed a specific interactive node within a
question. Pass node_id to identify it.
paused / resumed — learner paused or resumed the session (e.g.
navigated away and returned).
navigated — learner moved between questions or sections. Use the
payload field to record { from: questionId, to: questionId }.
flagged — learner flagged a question for review.
curl --request POST \
--url https://edpire.com/api/v1/submissions/{id}/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"question_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"node_id": "<string>",
"payload": {}
}
'import requests
url = "https://edpire.com/api/v1/submissions/{id}/events"
payload = {
"question_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"node_id": "<string>",
"payload": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
question_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
node_id: '<string>',
payload: {}
})
};
fetch('https://edpire.com/api/v1/submissions/{id}/events', 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://edpire.com/api/v1/submissions/{id}/events",
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([
'question_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'node_id' => '<string>',
'payload' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://edpire.com/api/v1/submissions/{id}/events"
payload := strings.NewReader("{\n \"question_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"node_id\": \"<string>\",\n \"payload\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://edpire.com/api/v1/submissions/{id}/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"question_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"node_id\": \"<string>\",\n \"payload\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://edpire.com/api/v1/submissions/{id}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"question_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"node_id\": \"<string>\",\n \"payload\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"ok": true
},
"error": {
"message": "<string>"
},
"meta": {}
}{
"data": null,
"error": {
"message": "<string>"
},
"meta": null
}{
"data": null,
"error": {
"message": "<string>"
},
"meta": null
}Authorizations
API key starting with edp_live_. Pass via Authorization: Bearer edp_live_xxx.
Scopes: read:assessments, write:assessments, read:results, write:submissions.
Path Parameters
Submission ID (must be in_progress)
Body
Type of interaction event
answer_change, node_view, paused, resumed, navigated, flagged Required for answer_change events; identifies the answer row to increment
Specific interactive node within the question (e.g. a drag-drop slot ID)
Arbitrary event-specific data (e.g. { from, to } for navigated events)