Printago API
POST /v1/classwork/{id}/attachments

Commit an uploaded classwork attachment

Requires: classwork.editor

Path Parameters

id required
string

Request Body

ClassworkAttachmentInsert
contentTyperequired
string
displayOrderoptional
integer
fileNamerequired
string
fileUrirequired
string
The `uploads:`-prefixed path returned by the upload-url endpoint.
sizeBytesrequired
integer

Example Request

application/json
{
  "fileUri": "string",
  "fileName": "string",
  "contentType": "string",
  "sizeBytes": 1,
  "displayOrder": 1
}

Response Schema

ClassworkAttachment
classworkIdrequired
string
pattern: ^[a-z0-9]{24}$
contentTyperequired
string
createdAtrequired
string
format: date-time
displayOrderrequired
number
fileNamerequired
string
fileUrirequired
string
idrequired
string
pattern: ^[a-z0-9]{24}$
sizeBytesrequired
number
storeIdrequired
string
pattern: ^[a-z0-9]{24}$
updatedAtrequired
string
format: date-time

Example Response

201 OK — application/json
{
  "classworkId": "string",
  "fileUri": "string",
  "fileName": "string",
  "contentType": "string",
  "sizeBytes": 1,
  "displayOrder": 1,
  "id": "string",
  "storeId": "string",
  "createdAt": "2026-09-16T04:04:12.298Z",
  "updatedAt": "2026-09-16T04:04:12.298Z"
}