Built LMS Help Center
API Reference and PlaygroundEnrollments and ProgressInteraction Events

POST Record interaction event

Record a learning interaction event with optional SCORM/xAPI statement for standards compliance

POST
/course-enrollments/{id}/interactions

Record a learning interaction event with optional SCORM/xAPI statement for standards compliance

Authorization

AuthorizationBearer <token>

Send API keys and access tokens as Authorization: Bearer .

In: header

Path Parameters

id*string

Unique identifier of the enrollment

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/course-enrollments/{id}/interactions" \  -H "Content-Type: application/json" \  -d '{    "block_id": "{block_id}",    "block_type": "course",    "event_type": "viewed",    "event_data": {      "time_spent_seconds": 1,      "progress_percentage": 1,      "score": 1,      "success": true,      "completion": true,      "attempt_id": "{attempt_id}",      "response": "Example response",      "playback_position_seconds": 1    },    "xapi_statement": {      "actor": {        "name": "Example name",        "mbox": "user@example.com",        "account": {          "homePage": "https://example.com",          "name": "Example name"        }      },      "verb": {        "id": "{id}",        "display": {}      },      "object": {        "id": "{id}",        "definition": {          "name": {},          "description": {},          "type": "https://example.com"        }      },      "result": {        "score": {          "scaled": 1,          "raw": 1,          "min": 1,          "max": 1        },        "success": true,        "completion": true,        "duration": "Example duration"      },      "context": {        "registration": "{registration}",        "platform": "Example platform",        "language": "Example language"      },      "timestamp": "2026-01-15T12:00:00Z"    },    "time_spent_seconds": 1,    "session_id": "{session_id}"  }'
{  "data": {    "id": "{id}",    "organization_id": "{organization_id}",    "enrollment_id": "{enrollment_id}",    "user_id": "{user_id}",    "block_id": "{block_id}",    "block_type": "string",    "event_type": "string",    "event_data": {      "time_spent_seconds": 0,      "progress_percentage": 0,      "score": 0,      "success": true,      "completion": true,      "attempt_id": "{attempt_id}",      "response": "string",      "playback_position_seconds": 0,      "property1": "string",      "property2": "string"    },    "xapi_statement": {      "actor": {        "name": "string",        "mbox": "user@example.com",        "account": {          "homePage": "http://example.com",          "name": "string"        }      },      "verb": {        "id": "http://example.com",        "display": {          "property1": "string",          "property2": "string"        }      },      "object": {        "id": "string",        "definition": {          "name": {            "property1": "string",            "property2": "string"          },          "description": {            "property1": "string",            "property2": "string"          },          "type": "http://example.com"        }      },      "result": {        "score": {          "scaled": 0,          "raw": 0,          "min": 0,          "max": 0        },        "success": true,        "completion": true,        "duration": "string"      },      "context": {        "registration": "{registration}",        "platform": "string",        "language": "string",        "property1": "string",        "property2": "string"      },      "timestamp": "2019-08-24T14:15:22Z"    },    "session_id": "{session_id}",    "created_at": "2019-08-24T14:15:22Z"  },  "meta": {    "created": true,    "enrollment_id": "{enrollment_id}",    "organization_id": "{organization_id}",    "rls_validated": true,    "scorm_xapi_format": true  }}