Document Versions

Inspect document version history for an instance document.

Document Versions object

Attributes

object

String

String representing the object's type

id

String

document_id

String

version_number

Number

previous_version_id

StringNullable

list_edited_at

DateNullable

content

String

editors

Object

created_at

Date
{
"object": "document.version",
"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",
"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",
"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"
}
}
]
}

List document versions

Returns a paginated list of versions for a specific document.

URL Parameters

document_id

String

The unique identifier for the document

Query Parameters

limit

NumberOptional

after

StringOptional

before

StringOptional

cursor

StringOptional

order

EnumOptional

id

UnionOptional

Filter by document version ID

created_at

ObjectOptional

Filter Filter by creation time by date range

last_edited_at

ObjectOptional

Filter Filter by last edit time by date range

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

Get document version by ID

Retrieves a specific document version by its ID.

URL Parameters

document_id

String

The unique identifier for the document

document_version_id

String

The unique identifier for the document_version

GEThttp://api.metorial.com/documents/:document_id/versions/:document_version_id
curl -X GET "https://api.metorial.com/documents/doc_Rm4Mnheq2bfEPhBhP7SY/versions/doc_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."