Skip to main content
https://.thoughtindustries.com

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.

POSThttps://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

NameTypeRequiredLocationDescription
statusenumYesbodyOne of completed or incomplete.
assignmentIduuidYesbodyAssignment UUID.
learnerIduuidYesbodyLearner UUID.
gradenumberNobodyNumeric grade.
gradeFeedbackstringNobodyFeedback text.
returnUrlstringNobodyRelative 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

FieldTypeDescription
(redirect)302On success, redirects to returnUrl (or /learn). No JSON body.
validbooleanFalse on validation error.
errorsstring[]Validation error messages.
assignmentSubmissionobjectNull on validation error.