Skip to content
Your Company Documentation Demo

Start typing to search all documentation.

Search the documentationFind a guide, feature, endpoint, or error across every section.

Upload a document

Your Company APIDocuments

POSThttps://api.your-company.example/v1/matters/{matter_id}/documents

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_copy
Role 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/json
idstringrequired
matter_idstringrequired
namestringrequired
kindstringrequired
Allowed values: draftredlinesupportingexecuted_copy
Role 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/json
errorobjectrequired
Object fields
codestringrequired
Stable machine-readable error code.
messagestringrequired
Human-readable summary.
request_idstringrequired
Identifier to include in a support ticket.
detailsobject[]
Array item fields
fieldstringrequired
Request field with an issue.
issuestringrequired
Human-readable validation problem.
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/json
errorobjectrequired
Object fields
codestringrequired
Stable machine-readable error code.
messagestringrequired
Human-readable summary.
request_idstringrequired
Identifier to include in a support ticket.
detailsobject[]
Array item fields
fieldstringrequired
Request field with an issue.
issuestringrequired
Human-readable validation problem.
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/json
errorobjectrequired
Object fields
codestringrequired
Stable machine-readable error code.
messagestringrequired
Human-readable summary.
request_idstringrequired
Identifier to include in a support ticket.
detailsobject[]
Array item fields
fieldstringrequired
Request field with an issue.
issuestringrequired
Human-readable validation problem.
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/json
errorobjectrequired
Object fields
codestringrequired
Stable machine-readable error code.
messagestringrequired
Human-readable summary.
request_idstringrequired
Identifier to include in a support ticket.
detailsobject[]
Array item fields
fieldstringrequired
Request field with an issue.
issuestringrequired
Human-readable validation problem.
Example response
{
  "error": {
    "code": "string",
    "message": "string",
    "request_id": "string",
    "details": [
      {
        "field": "string",
        "issue": "string"
      }
    ]
  }
}
415The document type is not supported.application/json
errorobjectrequired
Object fields
codestringrequired
Stable machine-readable error code.
messagestringrequired
Human-readable summary.
request_idstringrequired
Identifier to include in a support ticket.
detailsobject[]
Array item fields
fieldstringrequired
Request field with an issue.
issuestringrequired
Human-readable validation problem.
Example response
{
  "error": {
    "code": "string",
    "message": "string",
    "request_id": "string",
    "details": [
      {
        "field": "string",
        "issue": "string"
      }
    ]
  }
}
422One or more request fields are invalid.application/json
errorobjectrequired
Object fields
codestringrequired
Stable machine-readable error code.
messagestringrequired
Human-readable summary.
request_idstringrequired
Identifier to include in a support ticket.
detailsobject[]
Array item fields
fieldstringrequired
Request field with an issue.
issuestringrequired
Human-readable validation problem.
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"
      }
    ]
  }
}

Docs created for you by SaturnDocs