Document Versions
Inspect document version history for an instance document.
Document Versions object
Attributes
object
StringString representing the object's type
id
Stringdocument_id
Stringversion_number
Numberprevious_version_id
StringNullablelist_edited_at
DateNullablecontent
Stringeditors
Objectcreated_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
StringThe unique identifier for the document
Query Parameters
limit
NumberOptionalafter
StringOptionalbefore
StringOptionalcursor
StringOptionalorder
EnumOptionalid
UnionOptionalFilter by document version ID
created_at
ObjectOptionalFilter Filter by creation time by date range
last_edited_at
ObjectOptionalFilter 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
StringThe unique identifier for the document
document_version_id
StringThe 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_..."