🚧 We’re still putting the finishing touches on our platform
Create Page
Create a new page for a tenant's website using AI-powered content generation.
Endpoint: POST /api/tenants/{tenantUuid}/pages
Authentication: Required (Bearer Token)
Request Headers:
Content-Type: application/json
Accept: application/json
Authorization: Bearer YOUR_API_TOKEN
Path Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
tenantUuid | string | Yes | UUID of the tenant for which to create the page |
Request Body:
Field | Type | Required | Description |
---|---|---|---|
prompt_text | string | Yes | AI prompt describing the page content to generate. Maximum 5000 characters. |
language | string | No | Language for the generated content. Options: english , mongolian . Default: english |
Request Body Example:
{
"prompt_text": "Create a landing page for a digital marketing agency specializing in social media management",
"language": "english"
}
Success Response (200 OK):
{
"success": true
}
Note: The page creation is processed asynchronously using a job queue. The API returns immediately after the job is queued. The actual page generation happens in the background through AI processing.
Error Responses:
400 Bad Request (Tenant has no website):
{
"message": "Tenant has no associated website"
}
401 Unauthorized:
{
"message": "Unauthorized"
}
404 Not Found (Tenant not found):
{
"message": "No query results"
}
422 Unprocessable Entity (Validation failed):
{
"message": "The prompt text field is required. (and 1 more error)",
"errors": {
"prompt_text": [
"The prompt text field is required."
],
"language": [
"The selected language is invalid."
]
}
}
Validation Rules:
prompt_text
: Required, string, maximum 5000 characterslanguage
: Optional, must be one of:english
,mongolian
Usage Examples
cURL
Example 1: Create a page
curl -X POST https://webfluss.com/api/tenants/860f5708-21eb-44bf-bb4f-ce1dbed2ede1/pages \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"prompt_text": "Create a landing page for a digital marketing agency specializing in social media management",
"language": "english"
}'