Projects
Create project
Create a new project. Starts inactive. Script input options (mutually exclusive):
- script.blocks — provide an explicit block list; written immediately, no credits consumed
- intent — natural-language description; AI drafts the script (every block type, scoring, show_when) and writes it through the same validation as PUT /script; consumes bot credits; returns 402 if the balance is below the chosen quality's floor. Takes the same draft inputs as POST /projects/generate (quality, question_count, language, facts, and plan + answers + session_id from POST /projects/generate/plan). The community's default welcome block is not added: the draft brings its own intro when it wants one.
- source_project_id — fork script from an existing project
- (none) — project is created with an empty script
When script or intent is provided the response includes a script.blocks field; with intent it also includes draft (author notes, dropped blocks, model, credits).
post/v1/communities/{communityId}/projects
Request
- Base URL: https://api.subo.ai
- URL: https://api.subo.ai/v1/communities/{communityId}/projects
- Auth: API key in header X-API-Key
Path parameters
communityIdstring required
Community ID (Discord guild snowflake, serialized as string)
Request body
Example request
{
"name": "Customer Satisfaction Survey",
"intent": "Measure how satisfied members are with last week's event",
"language": "fr",
"admin_language": "en"
}Response
Created. Response includes data.script.blocks when script or intent was provided. If the AI draft failed after the project was created, data.script is null, data.script_error is "ai_failure" and data.script_error_detail says why and what was charged. The project still exists, empty; add a script with PUT /script or retry with POST /projects/generate.
Changes
No recorded changes to this operation across all 1 revision of this API.