curl --request GET \
--url https://api.tela.com/environment/version \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tela.com/environment/version"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tela.com/environment/version', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tela.com/environment/version",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tela.com/environment/version"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tela.com/environment/version")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tela.com/environment/version")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "76065caa-c519-441a-8fe2-cc43e29664ab",
"promptId": "95cec438-6080-44fe-8275-28b16bd40178",
"title": "Contract analysis v3",
"titleLocked": false,
"content": null,
"markdownContent": null,
"variables": [
{
"name": "document",
"type": "file",
"required": true
}
],
"configuration": {
"model": "gpt-4.1",
"temperature": 0
},
"promoted": true,
"draft": false,
"originVersionId": "1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7a8b",
"workspaceId": "3f55cfd9-4427-4887-a181-d9ad39967802",
"workflowSpec": null,
"graph": null,
"isWorkflow": false,
"createdBy": "jane@example.com",
"updatedBy": "jane@example.com",
"deletedBy": null,
"createdAt": "2025-06-02T15:40:00.000Z",
"updatedAt": "2025-06-02T15:45:10.000Z",
"deletedAt": null,
"versionIndex": 3,
"promptCustomTags": [],
"message": {
"id": "9c8b7a6f-5e4d-4c3b-a2f1-0e9d8c7b6a5f",
"role": "system",
"content": "You are a contract analyst. Summarize the key clauses of {{document}}.",
"markdownContent": null,
"promptVersionId": "76065caa-c519-441a-8fe2-cc43e29664ab",
"index": 0,
"createdBy": "jane@example.com",
"updatedBy": "jane@example.com",
"createdAt": "2025-06-02T15:40:00.000Z",
"updatedAt": "2025-06-02T15:40:00.000Z",
"deletedAt": null
},
"messages": [
{
"id": "9c8b7a6f-5e4d-4c3b-a2f1-0e9d8c7b6a5f",
"role": "system",
"content": "You are a contract analyst. Summarize the key clauses of {{document}}.",
"markdownContent": null,
"promptVersionId": "76065caa-c519-441a-8fe2-cc43e29664ab",
"index": 0,
"createdBy": "jane@example.com",
"updatedBy": "jane@example.com",
"createdAt": "2025-06-02T15:40:00.000Z",
"updatedAt": "2025-06-02T15:40:00.000Z",
"deletedAt": null
}
]
}Get the version published to an environment
Resolves the prompt version currently served by an environment and returns it in full, including its messages, variables and configuration.
curl --request GET \
--url https://api.tela.com/environment/version \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tela.com/environment/version"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tela.com/environment/version', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tela.com/environment/version",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tela.com/environment/version"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tela.com/environment/version")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tela.com/environment/version")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "76065caa-c519-441a-8fe2-cc43e29664ab",
"promptId": "95cec438-6080-44fe-8275-28b16bd40178",
"title": "Contract analysis v3",
"titleLocked": false,
"content": null,
"markdownContent": null,
"variables": [
{
"name": "document",
"type": "file",
"required": true
}
],
"configuration": {
"model": "gpt-4.1",
"temperature": 0
},
"promoted": true,
"draft": false,
"originVersionId": "1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7a8b",
"workspaceId": "3f55cfd9-4427-4887-a181-d9ad39967802",
"workflowSpec": null,
"graph": null,
"isWorkflow": false,
"createdBy": "jane@example.com",
"updatedBy": "jane@example.com",
"deletedBy": null,
"createdAt": "2025-06-02T15:40:00.000Z",
"updatedAt": "2025-06-02T15:45:10.000Z",
"deletedAt": null,
"versionIndex": 3,
"promptCustomTags": [],
"message": {
"id": "9c8b7a6f-5e4d-4c3b-a2f1-0e9d8c7b6a5f",
"role": "system",
"content": "You are a contract analyst. Summarize the key clauses of {{document}}.",
"markdownContent": null,
"promptVersionId": "76065caa-c519-441a-8fe2-cc43e29664ab",
"index": 0,
"createdBy": "jane@example.com",
"updatedBy": "jane@example.com",
"createdAt": "2025-06-02T15:40:00.000Z",
"updatedAt": "2025-06-02T15:40:00.000Z",
"deletedAt": null
},
"messages": [
{
"id": "9c8b7a6f-5e4d-4c3b-a2f1-0e9d8c7b6a5f",
"role": "system",
"content": "You are a contract analyst. Summarize the key clauses of {{document}}.",
"markdownContent": null,
"promptVersionId": "76065caa-c519-441a-8fe2-cc43e29664ab",
"index": 0,
"createdBy": "jane@example.com",
"updatedBy": "jane@example.com",
"createdAt": "2025-06-02T15:40:00.000Z",
"updatedAt": "2025-06-02T15:40:00.000Z",
"deletedAt": null
}
]
}Authorizations
Query Parameters
Environment name (production or a custom name).
Environment name. Lowercase letters, digits and single hyphens between segments (no leading, trailing
or consecutive hyphens), at most 64 characters. Leading/trailing whitespace is trimmed before validation.
production is the system environment every canvas has; it is the only reserved name you can publish to.
The names production, promoted, latest and draft are reserved and cannot be used for custom
environments, and a custom name cannot be a UUID.
The same rules apply to the environment_name field of POST /v2/chat/completions, which runs the
version currently published to that environment of the given canvas_id (environment_name cannot be
combined with version_id or application_id, and returns 404 when the environment does not exist or
has no published version).
64^[a-z0-9]+(?:-[a-z0-9]+)*$"staging"
Response
The published prompt version
A prompt version as returned by environment operations. variables and configuration follow the
prompt-version schemas of the main API; they are typed loosely here.