Endpoint
POST /v1/tents is an async trigger, not a synchronous HTML response. The immediate response only confirms the request was accepted.Request Body
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | Yes | Human-readable tent name |
prompt | string | Yes | The generation prompt |
user_id | string | No | Optional external identifier to attribute the request |
include_brand | boolean | No | Pulls brand context from the workspace before generation |
template_id | string | No | Starts from an approved template in the same workspace instead of a blank generation |
auto_publish | boolean | No | Automatically publishes after successful generation |
custom_page_alias | string | No | Only valid when auto_publish is true |
tent_id | uuid | No | Use this when you uploaded assets first and want to generate into that idle tent |
asset_ids | string[] | No | Up to 5 asset IDs. Requires tent_id |
Request Examples
Minimal Request
With Uploaded Assets
If you uploaded files first, provide the returned tent and asset IDs:Response Example
202 Accepted
asset_ids can only be used with a tent_id. If you send asset IDs without a tent ID, the API returns 400 Bad Request.Create From a Template
Passtemplate_id when you want Tented to start from an existing approved template instead of generating from scratch.
template_id is present:
- The template must exist in the same workspace as the API key
- The template must already be approved
- Tented uses the approved template content as the starting point for the generation
- The request still requires a
promptdescribing the customization you want
POST /v1/tents.
Template-based requests use the same
POST /v1/tents endpoint and return the same 202 Accepted response shape as prompt-only creates.Include Workspace Branding
Setinclude_brand to true when you want Tented to enrich the prompt with workspace brand context such as:
- Brand logo
- Brand icon
- Primary color
- Workspace or company name
- Company domain
- Company description
- Brand guidelines
Auto-Publish After Generation
Setauto_publish to true if you want Tented to publish the finished tent automatically.
- Generation still completes asynchronously
- The create response is still
202 Accepted - Publication details appear later in
GET /v1/tents/{tentId}
Requesting a custom page alias
You can optionally request a custom published path:- Maximum
100characters - Lowercase letters, numbers, hyphens, underscores, and dots only
- Must start with a letter or number
- Must not be a UUID
- Must not use reserved words such as
api,admin,submit, orassets - Use
/to publish at the domain root
Important Behavior
One initial generation per tent
If you supplytent_id, that tent must not already have a generation. Otherwise Tented returns:
409 Conflict.
Prompt validation
Tented validates that your prompt is actually asking for web content. Requests that do not look like a landing page, form, registration page, or related web experience can be rejected with:template_id, prompt validation becomes more permissive. Short customization requests like “make it blue”, “change the speaker name”, or “use it as is” are accepted as long as they are clearly about modifying the selected template.
Credit limits
If the workspace does not have enough credits to start generation, the API returns429 Too Many Requests.
User attribution
If you provideuser_id, Tented stores it as the request’s creator identity for that tent’s first chat message and generation trigger. It does not change authentication or workspace scope.
Common Errors
| Status | Cause |
|---|---|
400 Bad Request | Invalid JSON body |
400 Bad Request | Request body is missing |
400 Bad Request | Missing required fields like name or prompt |
400 Bad Request | asset_ids sent without tent_id |
400 Bad Request | template_id exists but is not approved |
400 Bad Request | template_id has no approved content available |
400 Bad Request | Invalid custom_page_alias |
400 Bad Request | Prompt fails web-content intent validation |
401 Unauthorized | Missing or invalid bearer token |
404 Not Found | tent_id does not exist |
404 Not Found | One of the supplied asset_ids does not exist |
404 Not Found | template_id does not exist in the workspace |
409 Conflict | The supplied tent_id already has a generation |
429 Too Many Requests | Credit limit exceeded |
Next: Retrieve Tent Status
Poll for generation progress and read publication results.