curl --request GET \
--url https://api.tela.com/environment \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tela.com/environment"
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', 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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tela.com/environment")
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": "0a3f6c2e-9d1b-4c7a-b5e8-2f4d6a8c0e1b",
"resourceType": "prompt",
"resourceId": "95cec438-6080-44fe-8275-28b16bd40178",
"name": "production",
"isSystem": true,
"currentVersionId": "76065caa-c519-441a-8fe2-cc43e29664ab",
"workspaceId": "3f55cfd9-4427-4887-a181-d9ad39967802",
"createdBy": "jane@example.com",
"deletedBy": null,
"createdAt": "2025-05-20T09:30:00.000Z",
"updatedAt": "2025-06-02T15:45:10.000Z",
"deletedAt": null,
"currentVersion": {
"id": "76065caa-c519-441a-8fe2-cc43e29664ab",
"title": "Contract analysis v3",
"promptId": "95cec438-6080-44fe-8275-28b16bd40178",
"draft": false,
"promoted": true,
"createdAt": "2025-06-02T15:40:00.000Z",
"updatedAt": "2025-06-02T15:45:10.000Z",
"createdBy": "jane@example.com",
"updatedBy": "jane@example.com",
"versionIndex": 3
},
"activePublication": {
"publishedAt": "2025-06-02T15:45:10.000Z",
"publishedBy": "jane@example.com"
}
}
]List environments
Returns every environment of a canvas (prompt), ordered with production first and the remaining environments alphabetically.
curl --request GET \
--url https://api.tela.com/environment \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tela.com/environment"
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', 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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tela.com/environment")
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": "0a3f6c2e-9d1b-4c7a-b5e8-2f4d6a8c0e1b",
"resourceType": "prompt",
"resourceId": "95cec438-6080-44fe-8275-28b16bd40178",
"name": "production",
"isSystem": true,
"currentVersionId": "76065caa-c519-441a-8fe2-cc43e29664ab",
"workspaceId": "3f55cfd9-4427-4887-a181-d9ad39967802",
"createdBy": "jane@example.com",
"deletedBy": null,
"createdAt": "2025-05-20T09:30:00.000Z",
"updatedAt": "2025-06-02T15:45:10.000Z",
"deletedAt": null,
"currentVersion": {
"id": "76065caa-c519-441a-8fe2-cc43e29664ab",
"title": "Contract analysis v3",
"promptId": "95cec438-6080-44fe-8275-28b16bd40178",
"draft": false,
"promoted": true,
"createdAt": "2025-06-02T15:40:00.000Z",
"updatedAt": "2025-06-02T15:45:10.000Z",
"createdBy": "jane@example.com",
"updatedBy": "jane@example.com",
"versionIndex": 3
},
"activePublication": {
"publishedAt": "2025-06-02T15:45:10.000Z",
"publishedBy": "jane@example.com"
}
}
]Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Type of resource the environment belongs to. Only prompt (a canvas) is supported.
Resource type an environment is attached to. Only canvases (prompt) are supported today.
prompt Canvas (prompt) ID.
Response
Environments of the canvas
Resource type an environment is attached to. Only canvases (prompt) are supported today.
prompt Canvas (prompt) ID
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"
true for the built-in production environment, which cannot be deleted.
Version currently published to the environment, or null when nothing was published.
Email of the user or key that created the environment.
Summary of the version currently published to an environment.
Show child attributes
Show child attributes
The publication record that is currently active for the environment.
Show child attributes
Show child attributes