Skip to main content
POST
/
v1
/
submissions
Create a submission
curl --request POST \
  --url https://api.example.com/v1/submissions \
  --header 'Content-Type: application/json' \
  --data '
{
  "assignment_id": "<string>",
  "student_id": "<string>",
  "content": {},
  "files": [
    null
  ]
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.hawkings.education/llms.txt

Use this file to discover all available pages before exploring further.

Body

assignment_id
string
required
student_id
string
required
files
File[]
Up to 10 files. Pass as multipart upload or pre-uploaded file_ids.

Examples

await hk.submissions.create({
  assignment_id: "asg_123",
  student_id: "usr_42",
  content: { text: "Lorentz invariance means..." },
});
With a file:
await hk.submissions.create({
  assignment_id: "asg_123",
  student_id: "usr_42",
  content: { text: "" },
  files: [{ name: "essay.pdf", body: blob, content_type: "application/pdf" }],
});

Returns

A Submission in ai_status: "pending".