Upload a document
AuthenticationRequires bearerAuth.
Description
Uploads a PDF or DOCX file to a Matter as a new document version.
Parameters
matter_idpathstringrequired
Matter identifier.
Request body
multipart/form-datarequired
filestring <binary>required
PDF or DOCX content, up to 50 MB.
kindstringrequired
Allowed values:
draftredlinesupportingexecuted_copyRole of a document in the Matter.
namestring
Display name. Defaults to the uploaded file name.
source_document_idstring
Prior document when this upload is a new version.
Responses
201The uploaded document metadata.
application/jsonidstringrequired
matter_idstringrequired
namestringrequired
kindstringrequired
Allowed values:
draftredlinesupportingexecuted_copyRole of a document in the Matter.
media_typestringrequired
Media type detected during upload.
size_bytesintegerrequired
File size in bytes.
version_numberintegerrequired
Sequential version within its document history.
source_document_idstring | null
Prior version when applicable.
created_atstring <date-time>required
Example response
{
"id": "doc_01JAZ7C3V9",
"matter_id": "mat_01JAZ6Q7K2",
"name": "Example Counterparty MSA v3.docx",
"kind": "draft",
"media_type": "string",
"size_bytes": 0,
"version_number": 0,
"source_document_id": "string",
"created_at": "2024-01-01T00:00:00Z"
}401The API key is missing, malformed, expired, or revoked.
application/jsonerrorobjectrequired
Example response
{
"error": {
"code": "unauthorized",
"message": "Provide a valid bearer API key.",
"request_id": "req_01JAZA0P8M"
}
}403The API key does not have permission for this action.
application/jsonerrorobjectrequired
Example response
{
"error": {
"code": "forbidden",
"message": "This API key does not have the required permission.",
"request_id": "req_01JAZA0P8M"
}
}404The resource was not found in the authenticated Workspace.
application/jsonerrorobjectrequired
Example response
{
"error": {
"code": "not_found",
"message": "The requested resource was not found.",
"request_id": "req_01JAZA0P8M"
}
}413The document exceeds the 50 MB upload limit.
application/jsonerrorobjectrequired
Example response
{
"error": {
"code": "string",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"issue": "string"
}
]
}
}415The document type is not supported.
application/jsonerrorobjectrequired
Example response
{
"error": {
"code": "string",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"issue": "string"
}
]
}
}422One or more request fields are invalid.
application/jsonerrorobjectrequired
Example response
{
"error": {
"code": "validation_error",
"message": "Correct the highlighted request fields.",
"request_id": "req_01JAZA0P8M",
"details": [
{
"field": "target_signature_date",
"issue": "must be today or later"
}
]
}
}