Create a new document version
Creates a draft version from either the current promoted version or a specific source version.
The new version is created with status draft and is not active until published and activated.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Path Parameters
id*string
Document ID
Format
uuidRequest Body
application/json
source_version_id?string
Optional source version ID to clone. Use current to clone the promoted version.
name?string
Optional friendly name for the new version.
Length
length <= 255Response Body
application/json
application/json
application/json
application/json
application/json
application/json
package mainimport ( "fmt" "net/http" "io/ioutil" "strings")func main() { url := "https://app.orbiqhq.com/api/v1/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/versions" body := strings.NewReader(`{}`) req, _ := http.NewRequest("POST", url, body) req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body))}{
"success": true,
"data": {
"version": {
"id": "b9db1e63-3c9c-4b37-a1b1-29d9a7df0a46",
"key": "draft_1714502400000",
"name": "Q2 Refresh",
"status": "draft",
"is_active": false,
"date_created": "2025-04-30T09:30:00Z",
"date_updated": "2025-04-30T09:30:00Z",
"modified_fields": []
}
}
}{
"type": "https://docs.orbiqhq.com/errors/validation",
"code": "validation_failed",
"message": "source_version_id must refer to an existing version.",
"doc_url": "https://docs.orbiqhq.com/errors/validation"
}{
"type": "https://docs.orbiqhq.com/errors/unauthorized",
"code": "unauthorized",
"message": "Authentication required.",
"doc_url": "https://docs.orbiqhq.com/errors/unauthorized"
}{
"type": "string",
"code": "string",
"message": "string",
"doc_url": "string"
}{
"type": "string",
"code": "string",
"message": "string",
"doc_url": "string"
}{
"type": "https://docs.orbiqhq.com/errors/internal",
"code": "internal_error",
"message": "Unexpected server error.",
"doc_url": "https://docs.orbiqhq.com/errors/internal"
}How is this guide?