Skip to main content
POST
/
assets
/
{assetId}
/
versions
/
{versionId}
/
revert
Revert to version by UUID
curl --request POST \
  --url https://versuno.ai/api/public/assets/{assetId}/versions/{versionId}/revert \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "commitDescription": "<string>"
}
'
import requests

url = "https://versuno.ai/api/public/assets/{assetId}/versions/{versionId}/revert"

payload = { "commitDescription": "<string>" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({commitDescription: '<string>'})
};

fetch('https://versuno.ai/api/public/assets/{assetId}/versions/{versionId}/revert', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://versuno.ai/api/public/assets/{assetId}/versions/{versionId}/revert"

payload := strings.NewReader("{\n \"commitDescription\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://versuno.ai/api/public/assets/{assetId}/versions/{versionId}/revert",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'commitDescription' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
require 'uri'
require 'net/http'

url = URI("https://versuno.ai/api/public/assets/{assetId}/versions/{versionId}/revert")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"commitDescription\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.post("https://versuno.ai/api/public/assets/{assetId}/versions/{versionId}/revert")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"commitDescription\": \"<string>\"\n}")
.asString();
using RestSharp;


var options = new RestClientOptions("https://versuno.ai/api/public/assets/{assetId}/versions/{versionId}/revert");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"commitDescription\": \"<string>\"\n}", false);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);
{
  "assetId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "assetType": "prompt",
  "versionNumber": 3,
  "assetData": {
    "title": "SKILL",
    "content": "fdasfsd\n\nfdsafdsa",
    "description": null,
    "emoji": null,
    "tags": [],
    "files": [],
    "is_public": false,
    "block_ids": [
      "b_015729a2-f530-40b0-aa65-6f3efadc967e",
      "b_55000bce-0e51-45d6-bd64-3962ec8b948b"
    ],
    "content_blocks": [
      {
        "id": "b_015729a2-f530-40b0-aa65-6f3efadc967e",
        "type": "paragraph",
        "meta": {},
        "content": "fdasfsd"
      },
      {
        "id": "b_55000bce-0e51-45d6-bd64-3962ec8b948b",
        "type": "paragraph",
        "meta": {},
        "content": "fdsafdsa"
      }
    ]
  },
  "userId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "id": "d4e5f6a7-b8c9-0123-def0-234567890123",
  "commitDescription": "Updated tone to be more empathetic",
  "createdAt": "2026-01-20T14:45:00.000Z",
  "user": {
    "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "fullName": "Alex Johnson",
    "username": "alexj",
    "avatarUrl": "https://versuno.ai/avatars/alexj.png"
  }
}
{
"error": "Wrong data: assetType is required"
}
{
"error": "Invalid API key"
}
{
"error": "Not found"
}

Authorizations

Authorization
string
header
default:Bearer uk_live_your_api_key_here
required

Versuno API key. Must be prefixed with Bearer. Format: Bearer uk_live_...

Path Parameters

assetId
string<uuid>
required
versionId
string<uuid>
required

Body

application/json
commitDescription
string

Custom message. Auto-generated if omitted.

Maximum string length: 2000

Response

Newly created revert version object.

A full-snapshot version checkpoint of an asset.

assetId
string<uuid>
required

ID of the asset this version belongs to.

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

assetType
enum<string>
required

Type of the parent asset.

Available options:
prompt,
persona,
context,
system_prompt,
skill
Example:

"prompt"

versionNumber
integer
required

Monotonically increasing version number within the asset.

Example:

3

assetData
object
required

Full snapshot of the asset state at the time this version was saved. Returned exactly as stored (no key normalization).

Example:
{
"title": "SKILL",
"content": "fdasfsd\n\nfdsafdsa",
"description": null,
"emoji": null,
"tags": [],
"files": [],
"is_public": false,
"block_ids": [
"b_015729a2-f530-40b0-aa65-6f3efadc967e",
"b_55000bce-0e51-45d6-bd64-3962ec8b948b"
],
"content_blocks": [
{
"id": "b_015729a2-f530-40b0-aa65-6f3efadc967e",
"type": "paragraph",
"meta": {},
"content": "fdasfsd"
},
{
"id": "b_55000bce-0e51-45d6-bd64-3962ec8b948b",
"type": "paragraph",
"meta": {},
"content": "fdsafdsa"
}
]
}
userId
string<uuid>
required

ID of the user who created this version.

Example:

"b2c3d4e5-f6a7-8901-bcde-f12345678901"

id
string<uuid>

Unique identifier for this version.

Example:

"d4e5f6a7-b8c9-0123-def0-234567890123"

commitDescription
string | null

Optional message describing what changed in this version.

Example:

"Updated tone to be more empathetic"

createdAt
string<date-time>

ISO 8601 timestamp when this version was saved.

Example:

"2026-01-20T14:45:00.000Z"

user
object

Author profile.