Name a version
PATCH
/api/v1/brands/{slug}/versions/{number}
const url = 'http://localhost:3000/api/v1/brands/example/versions/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url http://localhost:3000/api/v1/brands/example/versions/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example" }'A named version is a checkpoint: later edits start a new version instead of extending it.
Scope: write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”slug
required
string
Brand slug
number
required
string
Version number
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”The version
Media typeapplication/json
object
data
required
object
number
required
integer
kind
required
string
name
required
string | null
actor
required
Who: a person’s name, an API key’s name, or “web” for the app without an account
string
changed
required
Keys touched; a page as page:{slug}, and theme
Array<string>
summary
required
string
rules
required
integer
publishedBy
required
string | null
note
required
What changed, for readers, given when it was published
string | null
createdAt
required
string format: date-time
updatedAt
required
Edits close together extend a version; this is its last
string format: date-time
Example
{ "data": { "kind": "baseline" }}default
Section titled “default”An error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}