MetorialDocs

Document Versions

Inspect document version history for an instance document.

The Document Version object

document_version.json
{
  "object": "document.version",
  "id": "example_id",
  "document_id": "example_document_id",
  "version_number": 0,
  "previous_version_id": "example_previous_version_id",
  "list_edited_at": "2026-09-29T11:53:10.476Z",
  "content": "example_content",
  "editors": [
    {
      "type": "organization_actor",
      "organization_actor": {
        "object": "organization.actor",
        "id": "omem_5fGhJkLmNpQrStUv",
        "type": "member",
        "organization_id": "org_7hNkPqRsTuVwXyZa",
        "name": "Alex Chen",
        "email": "[email protected]",
        "image_url": "https://avatar-cdn.metorial.com/aimg_1234567890",
        "member": {
          "object": "organization.member#preview",
          "id": "ome_7hNkPqRsTuVwXyZa",
          "status": "active",
          "role": "member"
        },
        "teams": [
          {
            "id": "tm_3eFgHjKlMnPqRsTu",
            "name": "Engineering",
            "slug": "engineering",
            "assignment_id": "tmas_8jKlMnPqRsTuVwXy"
          },
          {
            "id": "tm_3eFgHjKlMnPqRsTu",
            "name": "Engineering",
            "slug": "engineering",
            "assignment_id": "tmas_8jKlMnPqRsTuVwXy"
          }
        ]
      },
      "consumer": {
        "object": "consumer"
      }
    },
    {
      "type": "organization_actor",
      "organization_actor": {
        "object": "organization.actor",
        "id": "omem_5fGhJkLmNpQrStUv",
        "type": "member",
        "organization_id": "org_7hNkPqRsTuVwXyZa",
        "name": "Alex Chen",
        "email": "[email protected]",
        "image_url": "https://avatar-cdn.metorial.com/aimg_1234567890",
        "member": {
          "object": "organization.member#preview",
          "id": "ome_7hNkPqRsTuVwXyZa",
          "status": "active",
          "role": "member"
        },
        "teams": [
          {
            "id": "tm_3eFgHjKlMnPqRsTu",
            "name": "Engineering",
            "slug": "engineering",
            "assignment_id": "tmas_8jKlMnPqRsTuVwXy"
          },
          {
            "id": "tm_3eFgHjKlMnPqRsTu",
            "name": "Engineering",
            "slug": "engineering",
            "assignment_id": "tmas_8jKlMnPqRsTuVwXy"
          }
        ]
      },
      "consumer": {
        "object": "consumer"
      }
    }
  ],
  "created_at": "2026-09-29T11:53:10.476Z"
}
object"document.version"required
idstringrequired
document_idstringrequired
version_numbernumberrequired
previous_version_idstringrequirednullable
list_edited_atdaterequirednullable
contentstringrequired
created_atdaterequired

Endpoints

List document versions

GET/documents/:document_id/versions

Returns a paginated list of versions for a specific document.

Path parameters

document_idstringrequired

The unique identifier for the document

Query parameters

idstring or string[]optional

Filter by document version ID

Example request

curl -X GET "https://api.metorial.com/documents/doc_Rm4Mnheq2bfEPhBhP7SY/versions" \
  -H "Authorization: Bearer metorial_sk_io2h4..."

Get document version by ID

GET/documents/:document_id/versions/:document_version_id

Retrieves a specific document version by its ID.

Path parameters

document_idstringrequired

The unique identifier for the document

document_version_idstringrequired

The unique identifier for the document_version

Example request

curl -X GET "https://api.metorial.com/documents/doc_Rm4Mnheq2bfEPhBhP7SY/versions/doc_Rm4Mnheq2bfEPhBhP7SY" \
  -H "Authorization: Bearer metorial_sk_io2h4..."