Website App Builder - API Documentation

Full reference for all commands, content generation, and hosted website features.

In all URLs below, replace XXX with your AI Apps Account ID, found in your account settings.

How Endpoints Work

Two ways to call each endpoint, plus hosted website URLs
Show / Hide
App Command (API Call)
POST your request to https://api.aiappsapi.com with your API key and account ID in the POST body. The fields described in each section below go inside the jsonData POST field as a JSON-encoded string. Use this method when your server is making the call and you have your API credentials available.

Mode / Webhook (Direct URL)
POST directly to the endpoint URL shown in each section. The fields go in the POST body as standard form fields (the same fields you would include in an HTML form POST). Use this method for provider webhooks, website forms, or any third-party system that sends form data. No API key is required, the account ID is part of the URL.
Hosted website URLs: Websites are served directly on your custom domain. Page URLs follow the pattern https://yourdomain.com/pagename. Interactive content uses category URLs: /trivia-1, /polls-1, /survey-1, /application-1, /forms-5 (lead capture), /path-2 (offer path). News articles use date-based URLs: /news-MM-DD-YYYY.

Generate Page Content

command: websitecontent
Show / Hide
Uses AI to generate HTML content for a single web page based on your prompt. Can create new content from scratch or edit existing content by providing the current HTML. The generated content is returned as a section element ready to insert into a page.
POST App Command URL
https://api.aiappsapi.com     app: webbuilder     command: websitecontent
This command is only available as an App Command. It is not available as a direct mode/webhook URL.

Required Fields
Field NameField KeyNotes
Prompt prompt Natural language instructions for what content to generate. Must be at least 5 characters.
Optional Fields
Field NameField KeyNotes
Existing Content content Current HTML content of the page. When provided, the AI edits this content rather than creating from scratch.
Topic topic Topic or title for the page. Used as the heading in the generated section.
Extra Rules extraRules Additional instructions appended to the AI system prompt for custom formatting or style rules.
Use Images useImages Set to 1 to allow the AI to include uploaded site images in the generated content. Requires sitearray to be provided.
Site Array sitearray The site configuration object. Required when useImages is enabled so the AI can access the image library and descriptions.
Domain domain Domain name for the website.

Generate Image

command: makeimage
Show / Hide
Uses AI to generate one or more images based on your prompt, uploads them to S3, and adds them to the site's image library. Generated images are immediately available on your hosted website at /images/filename.png.
POST App Command URL
https://api.aiappsapi.com     app: webbuilder     command: makeimage
This command is only available as an App Command. It is not available as a direct mode/webhook URL.

Required Fields
Field NameField KeyNotes
Prompt prompt Description of the image to generate. Must be at least 5 characters.
Domain domain Domain name for the website. The image is stored in this domain's S3 folder.
Optional Fields
Field NameField KeyNotes
Image Size imageSize Pixel dimensions. Defaults to 1024x1024.
Image Type imageType Set to favicon to generate a site favicon (forces 1024x1024 size).
Number of Images numImages How many images to generate. Defaults to 1.
Site Array sitearray Site configuration object. Images are appended to the site's image list.

CSS Editor

command: csseditor
Show / Hide
Uses AI to create or modify the site's CSS stylesheet based on your prompt. Provide the current CSS and describe what changes you want. The AI modifies only the CSS, never touching HTML or PHP structure.
POST App Command URL
https://api.aiappsapi.com     app: webbuilder     command: csseditor
This command is only available as an App Command. It is not available as a direct mode/webhook URL.

Required Fields
Field NameField KeyNotes
Prompt prompt Natural language instructions for what CSS changes to make.
Domain domain Domain name for the website.
Optional Fields
Field NameField KeyNotes
Current CSS style The site's current CSS stylesheet. When provided, the AI edits the existing styles. When omitted, creates a new stylesheet.

Bulk Page Content

job: bulkwebsitecontent
Show / Hide
Generates multiple web pages at once from a list of topics. Each topic gets its own page with AI-generated content. Pages are automatically added to the site's page list and stored in the webhosting database. Runs as a background job.
POST App Command URL
https://api.aiappsapi.com     app: webbuilder     command: bulkwebsitecontent
This command runs as a background job. The response confirms the job was queued.

Required Fields
Field NameField KeyNotes
Prompt prompt Content generation prompt. Use #Topic# as a placeholder that gets replaced with each topic.
Topics topics Array of topic strings, or a newline-separated string. One page is created per topic.
Site Array sitearray The site configuration object. New pages are appended to the pages list.

Create Trivia Questions

job: createtrivia
Show / Hide
Uses AI to generate trivia questions with three answer choices and stores them in the webhosting database for your site. Duplicate questions are automatically filtered out. Questions are served on your hosted site at URLs like /trivia-1, /trivia-2, etc.
POST App Command URL
https://api.aiappsapi.com     app: webbuilder     command: createtrivia
This command runs as a background job. The response confirms the job was queued.

Required Fields
Field NameField KeyNotes
Prompt prompt Instructions for what trivia topics to generate (e.g. "Generate 20 trivia questions about world geography").
Domain domain Domain name where the trivia will be hosted.

Article with FAQ

job: articlewithfaq
Show / Hide
Uses AI to generate a main article page plus multiple sub-topic pages with FAQ schema markup. Each page gets proper SEO metadata (keywords, description, schema.org structured data). All pages are added to the site automatically. Runs as a background job.
POST App Command URL
https://api.aiappsapi.com     app: webbuilder     command: articlewithfaq
This command runs as a background job. The response confirms the job was queued.

Required Fields
Field NameField KeyNotes
Headline headline The main article headline. Used as the anchor topic for generating sub-topics.
Domain domain Domain name where the articles will be hosted.
Optional Fields
Field NameField KeyNotes
Prompt prompt Custom AI prompt for generating article content and sub-topics.
Number of FAQs numFAQs Maximum number of sub-topic pages to generate. Defaults to 50.
Site Name siteName Publisher name for schema.org markup. Defaults to the domain.
Meta Description metaDesc Description for the main article's schema.org metadata.

Automated News Articles

scheduled task (daily)
Show / Hide
Automatically generates news articles on a daily schedule using AI. Configure the topic prompt and system instructions in your site settings under the news content section. Articles are published at the URL /news-MM-DD-YYYY on your hosted domain. The system checks once per day and skips generation if an article has already been created for today.
This is a scheduled task, not an API endpoint. Configure it through the admin interface in your site's content settings. Set the prompt, system instructions, and number of daily articles. The schedule runs automatically at 12:30 PM EST.

Delete Image

command: deleteimage
Show / Hide
Removes an image from the site's image library and deletes it from S3 storage.
POST App Command URL
https://api.aiappsapi.com     app: webbuilder     command: deleteimage
This command is only available as an App Command. It is not available as a direct mode/webhook URL.

Required Fields
Field NameField KeyNotes
Domain domain Domain name for the website.
Filename filename The image filename to delete (e.g. hero-banner.png).