Record Assignment External Activity
Record an external activity submission (e.g. from a third-party LTI tool) as an assignment submission. Requires the externalActivity feature to be enabled.
Record an external activity submission from a third-party LTI tool as an assignment submission.
https://example.thoughtindustries.com/incoming/v2/assignmentExternalActivity:::note
Feature flag: Requires the externalActivity feature to be enabled on the company. If not enabled, the request returns 400 with { errors: ["externalActivity feature is not enabled"] }.
:::
Example request
curl -X POST "https://example.thoughtindustries.com/incoming/v2/assignmentExternalActivity" \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"status": "completed",
"assignmentId": "123e4567-e89b-12d3-a456-426614174000",
"learnerId": "223e4567-e89b-12d3-a456-426614174000",
"grade": 95,
"gradeFeedback": "Nice work"
}'You may alternatively pass the attributes in a signed jwt query param instead of a JSON body:
curl -X POST "https://example.thoughtindustries.com/incoming/v2/assignmentExternalActivity?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H 'Authorization: Bearer YOUR_API_KEY'Parameters
| Name | Type | Required | Location | Description |
|---|---|---|---|---|
status | enum | Yes | body | One of completed or incomplete. |
assignmentId | uuid | Yes | body | Assignment UUID. |
learnerId | uuid | Yes | body | Learner UUID. |
grade | number | No | body | Numeric grade. |
gradeFeedback | string | No | body | Feedback text. |
returnUrl | string | No | body | Relative URL to redirect to on success. |
Both assignmentId and learnerId must be valid UUIDs or the request returns 400 with { errors: ["Invalid assignmentId or learnerId (both are required)"] }.
Example response
On success the endpoint issues a 302 redirect to returnUrl (or /learn when none is supplied) — it does not return a JSON body:
HTTP/1.1 302 Found
Location: /learn
Validation errors
If the underlying mutation reports errors, the endpoint responds 400:
{
"valid": false,
"errors": ["Assignment submission could not be recorded"],
"assignmentSubmission": null
}Response fields
| Field | Type | Description |
|---|---|---|
(redirect) | 302 | On success, redirects to returnUrl (or /learn). No JSON body. |
valid | boolean | False on validation error. |
errors | string[] | Validation error messages. |
assignmentSubmission | object | Null on validation error. |