Promote a version to primary
Set `is_primary: true` to promote this version. The previously-primary version is demoted in the same transaction. The only valid body is `{ "is_primary": true }`; demoting without promoting another version is not supported.
Authorization
bearerAuth documents.writeAuthorizationBearer <token>
Dashboard-issued token (pm_live_...) or OAuth-issued access token.
In: header
Scope: documents.write
Path Parameters
id*string
vid*string
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
is_primary*boolean
Set to true to promote this version. The previous primary is demoted in the same transaction.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://api.papermark.com/v1/documents/string/versions/string" \ -H "Content-Type: application/json" \ -d '{ "is_primary": true }'{
"id": "clxy9ver1234567890",
"version_number": 2,
"is_primary": true,
"type": "pdf",
"content_type": "application/pdf",
"num_pages": 12,
"file_size": 2048576,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}{
"error": {
"code": "unauthorized",
"message": "Missing bearer token.",
"doc_url": "https://www.papermark.com/docs/api/errors#unauthorized",
"details": null
}
}{
"error": {
"code": "unauthorized",
"message": "Missing bearer token.",
"doc_url": "https://www.papermark.com/docs/api/errors#unauthorized",
"details": null
}
}{
"error": {
"code": "unauthorized",
"message": "Missing bearer token.",
"doc_url": "https://www.papermark.com/docs/api/errors#unauthorized",
"details": null
}
}{
"error": {
"code": "unauthorized",
"message": "Missing bearer token.",
"doc_url": "https://www.papermark.com/docs/api/errors#unauthorized",
"details": null
}
}{
"error": {
"code": "unauthorized",
"message": "Missing bearer token.",
"doc_url": "https://www.papermark.com/docs/api/errors#unauthorized",
"details": null
}
}{
"error": {
"code": "unauthorized",
"message": "Missing bearer token.",
"doc_url": "https://www.papermark.com/docs/api/errors#unauthorized",
"details": null
}
}