Create an artifact
curl --request POST \
--url https://api.tess.im/artifacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"content": "<string>",
"styles": "<string>",
"script": "<string>",
"lang": "pt-BR",
"template": "<string>"
}
'import requests
url = "https://api.tess.im/artifacts"
payload = {
"title": "<string>",
"content": "<string>",
"styles": "<string>",
"script": "<string>",
"lang": "pt-BR",
"template": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
content: '<string>',
styles: '<string>',
script: '<string>',
lang: 'pt-BR',
template: '<string>'
})
};
fetch('https://api.tess.im/artifacts', 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.tess.im/artifacts",
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([
'title' => '<string>',
'content' => '<string>',
'styles' => '<string>',
'script' => '<string>',
'lang' => 'pt-BR',
'template' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tess.im/artifacts"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"styles\": \"<string>\",\n \"script\": \"<string>\",\n \"lang\": \"pt-BR\",\n \"template\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://api.tess.im/artifacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"styles\": \"<string>\",\n \"script\": \"<string>\",\n \"lang\": \"pt-BR\",\n \"template\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tess.im/artifacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"styles\": \"<string>\",\n \"script\": \"<string>\",\n \"lang\": \"pt-BR\",\n \"template\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"universal_id": "<string>",
"version": 123,
"title": "<string>",
"viewer_url": "<string>"
}Artifacts
Create Artifact
Renders a new HTML artifact (version 1) from a template. Needs the artifact feature, a plan that includes artifacts and the Artifacts User permission (artifacts:create). The artifact starts private.
POST
/
artifacts
Create an artifact
curl --request POST \
--url https://api.tess.im/artifacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"content": "<string>",
"styles": "<string>",
"script": "<string>",
"lang": "pt-BR",
"template": "<string>"
}
'import requests
url = "https://api.tess.im/artifacts"
payload = {
"title": "<string>",
"content": "<string>",
"styles": "<string>",
"script": "<string>",
"lang": "pt-BR",
"template": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
content: '<string>',
styles: '<string>',
script: '<string>',
lang: 'pt-BR',
template: '<string>'
})
};
fetch('https://api.tess.im/artifacts', 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.tess.im/artifacts",
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([
'title' => '<string>',
'content' => '<string>',
'styles' => '<string>',
'script' => '<string>',
'lang' => 'pt-BR',
'template' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tess.im/artifacts"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"styles\": \"<string>\",\n \"script\": \"<string>\",\n \"lang\": \"pt-BR\",\n \"template\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://api.tess.im/artifacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"styles\": \"<string>\",\n \"script\": \"<string>\",\n \"lang\": \"pt-BR\",\n \"template\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tess.im/artifacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"styles\": \"<string>\",\n \"script\": \"<string>\",\n \"lang\": \"pt-BR\",\n \"template\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"universal_id": "<string>",
"version": 123,
"title": "<string>",
"viewer_url": "<string>"
}Authenticate with a Tess API token in the
404
Authorization: Bearer header. See the Artifacts API guide for the full flow, permissions and ownership rules.
Code Examples
curl --request POST \
--url 'https://api.tess.im/artifacts' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'x-workspace-id: YOUR_WORKSPACE_ID' \
--header 'Content-Type: application/json' \
--data '{
"title": "Weekly pipeline",
"lang": "en",
"content": "<h1>Weekly pipeline</h1><p>Open pipeline: $1.2M</p>",
"styles": "h1 { color: #272727; }"
}'
const axios = require('axios');
const config = {
method: 'post',
url: 'https://api.tess.im/artifacts',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'x-workspace-id': 'YOUR_WORKSPACE_ID',
'Content-Type': 'application/json'
},
data: {
"title": "Weekly pipeline",
"lang": "en",
"content": "<h1>Weekly pipeline</h1><p>Open pipeline: $1.2M</p>",
"styles": "h1 { color: #272727; }"
}
};
try {
const response = await axios(config);
console.log(response.data);
} catch (error) {
console.error(error);
}
import requests
url = "https://api.tess.im/artifacts"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"x-workspace-id": "YOUR_WORKSPACE_ID",
"Content-Type": "application/json"
}
payload = {
"title": "Weekly pipeline",
"lang": "en",
"content": "<h1>Weekly pipeline</h1><p>Open pipeline: $1.2M</p>",
"styles": "h1 { color: #272727; }"
}
response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.json())
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tess.im/artifacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode(["title" => "Weekly pipeline", "lang" => "en", "content" => "<h1>Weekly pipeline</h1><p>Open pipeline: \$1.2M</p>", "styles" => "h1 { color: #272727; }"]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer YOUR_API_KEY",
"x-workspace-id: YOUR_WORKSPACE_ID",
"Content-Type: application/json"
]
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "Error: " . $err;
} else {
echo $response;
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.tess.im/artifacts"))
.header("Authorization", "Bearer YOUR_API_KEY")
.header("x-workspace-id", "YOUR_WORKSPACE_ID")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"title\": \"Weekly pipeline\",\n \"lang\": \"en\",\n \"content\": \"<h1>Weekly pipeline</h1><p>Open pipeline: $1.2M</p>\",\n \"styles\": \"h1 { color: #272727; }\"\n}"))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
package main
import (
"fmt"
"io/ioutil"
"net/http"
"strings"
)
func main() {
client := &http.Client{}
req, err := http.NewRequest("POST", "https://api.tess.im/artifacts", strings.NewReader(`{
"title": "Weekly pipeline",
"lang": "en",
"content": "<h1>Weekly pipeline</h1><p>Open pipeline: $1.2M</p>",
"styles": "h1 { color: #272727; }"
}`))
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer YOUR_API_KEY")
req.Header.Add("x-workspace-id", "YOUR_WORKSPACE_ID")
req.Header.Add("Content-Type", "application/json")
resp, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
client.DefaultRequestHeaders.Add("x-workspace-id", "YOUR_WORKSPACE_ID");
var content = new StringContent(@"{
""title"": ""Weekly pipeline"",
""lang"": ""en"",
""content"": ""<h1>Weekly pipeline</h1><p>Open pipeline: $1.2M</p>"",
""styles"": ""h1 { color: #272727; }""
}", Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.tess.im/artifacts", content);
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
}
}
require 'uri'
require 'net/http'
require 'json'
uri = URI('https://api.tess.im/artifacts')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'Bearer YOUR_API_KEY'
request['x-workspace-id'] = 'YOUR_WORKSPACE_ID'
request['Content-Type'] = 'application/json'
request.body = { 'title' => 'Weekly pipeline', 'lang' => 'en', 'content' => '<h1>Weekly pipeline</h1><p>Open pipeline: $1.2M</p>', 'styles' => 'h1 { color: #272727; }' }.to_json
response = http.request(request)
puts response.read_body
Headers
Workspace ID. Required as of 2026-09-01. Until then, if omitted, the user’s selected workspace is used (deprecated). After the cutoff, a missing header returns 422.
Request Body
HTML of the content region. Must not be empty. Must load nothing from outside the artifact (see below).
Template slug from List Artifact Templates. Defaults to
default.Response
201{
"universal_id": "artifact_5d1f0c2e-8a3b-4c6d-9e7f-1a2b3c4d5e6f",
"version": 1,
"title": "Weekly pipeline",
"viewer_url": "https://tess.im/artifacts/artifact_5d1f0c2e-8a3b-4c6d-9e7f-1a2b3c4d5e6f"
}
Response fields
Errors
| Status | Meaning |
|---|---|
401 | Missing or invalid API token. |
403 | ARTIFACT_FEATURE_DISABLED, ARTIFACT_PLAN_NOT_ALLOWED or ARTIFACT_ROLE_NOT_ALLOWED. |
404 | ARTIFACT_TEMPLATE_NOT_FOUND: the template slug is not available to this workspace. |
422 | Validation error (errors lists the fields), or ARTIFACT_EXTERNAL_RESOURCE: the HTML loads something from outside the artifact. Allowed: own attached files, data: URIs, Google Fonts and <script src> libraries from cdnjs pinned to an exact x.y.z version. Own JS, CSS and font files, jsDelivr and unpkg are refused. Also ARTIFACT_EMPTY_CONTENT. |
429 | Too many requests. Retry after a short wait. |
{
"error_code": "ARTIFACT_TEMPLATE_NOT_FOUND",
"message": "No artifact template \"nope\" is available to this workspace."
}
Authorizations
Body
application/json

