Skip to main content
POST
Create an artifact
Authenticate with a Tess API token in the Authorization: Bearer header. See the Artifacts API guide for the full flow, permissions and ownership rules.

Code Examples

Headers

integer
required
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

string
required
Title shown to people (maximum 255 characters).
string
required
HTML of the content region. Must not be empty. Must load nothing from outside the artifact (see below).
string
CSS rules for the page, without the <style> tag (maximum 500,000 characters).
string
JavaScript for the page, without the <script> tag (maximum 500,000 characters).
string
Language of the page, for example en or pt-BR (maximum 16 characters).
string
Template slug from List Artifact Templates. Defaults to default.

Response

201

Response fields

string
The artifact ID. Use it in every other call.
integer
Version number (1 on creation).
string
Title.
string
Link that opens the artifact in Tess (login required). Stable across versions.

Errors

404

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-workspace-id
integer

Workspace id. If not provided, the user's selected workspace is used.

Body

application/json
title
string
required
Maximum string length: 255
content
string
required

HTML of the content region; must not be empty.

styles
string | null
Maximum string length: 500000
script
string | null
Maximum string length: 500000
lang
string | null
Maximum string length: 16
Example:

"pt-BR"

template
string | null

Template slug from GET /api/artifact-templates; defaults to default.

Maximum string length: 80

Response

Created

universal_id
string
version
integer
title
string
viewer_url
string