API Documentation
Complete reference for the Promptax API.
auth
1 endpoints
projects
14 endpoints
agency
3 endpoints
tis
1 endpoints
self-heal
2 endpoints
analytics
1 endpoints
Base URL
https://api.promptax.ioAuthentication
Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYauth
GET
/api/auth/sessionGet current user session
Response
Session | null— Current session or nullprojects
GET
/api/projectsAuth RequiredList all projects for the authenticated user
Response
Project[]— Array of projectsPOST
/api/projectsAuth RequiredCreate a new project
Request Body
{
"name": "string",
"description": "string",
"organisationId": "string"
}Response
Project— Created projectGET
/api/projects/[projectId]Auth RequiredGet a specific project by ID
Parameters
projectId (string)required— Project UUIDResponse
Project— Project detailsPUT
/api/projects/[projectId]Auth RequiredUpdate a project
Parameters
projectId (string)required— Project UUIDRequest Body
{
"name": "string",
"description": "string"
}Response
Project— Updated projectDELETE
/api/projects/[projectId]Auth RequiredDelete a project
Parameters
projectId (string)required— Project UUIDResponse
{ success: boolean }— Deletion confirmationGET
/api/projects/[projectId]/chatAuth RequiredGet chat history for a project
Parameters
projectId (string)required— Project UUIDResponse
ChatMessage[]— Chat messagesPOST
/api/projects/[projectId]/chatAuth RequiredSend a message and get AI response
Parameters
projectId (string)required— Project UUIDRequest Body
{
"content": "string",
"model": "string"
}Response
ChatMessage— AI response messageGET
/api/projects/[projectId]/plansAuth RequiredList build plans for a project
Parameters
projectId (string)required— Project UUIDResponse
BuildPlan[]— Build plansPOST
/api/projects/[projectId]/plansAuth RequiredGenerate a new build plan
Parameters
projectId (string)required— Project UUIDRequest Body
{
"features": "string[]",
"techStack": "string[]"
}Response
BuildPlan— Generated plan with stepsPOST
/api/projects/[projectId]/generateAuth RequiredGenerate code for a build step
Parameters
projectId (string)required— Project UUIDRequest Body
{
"planId": "string",
"stepId": "string"
}Response
GeneratedFile[]— Generated filesGET
/api/projects/[projectId]/deploymentsAuth RequiredList deployments for a project
Parameters
projectId (string)required— Project UUIDResponse
Deployment[]— Deployment historyPOST
/api/projects/[projectId]/deploymentsAuth RequiredCreate a new deployment
Parameters
projectId (string)required— Project UUIDRequest Body
{
"environment": "string"
}Response
Deployment— Deployment detailsGET
/api/projects/[projectId]/testsAuth RequiredList test suites for a project
Parameters
projectId (string)required— Project UUIDResponse
TestSuite[]— Test suitesPOST
/api/projects/[projectId]/testsAuth RequiredGenerate tests for project
Parameters
projectId (string)required— Project UUIDRequest Body
{
"type": "string"
}Response
{ suitesCreated: number, testsGenerated: number }— Generation resultagency
GET
/api/agencyAuth RequiredList agency sessions
Response
AgencySession[]— Agency sessionsPOST
/api/agencyAuth RequiredStart a new agency consultation
Request Body
{
"projectId": "string"
}Response
AgencySession— New sessionPOST
/api/agency/[sessionId]/messageAuth RequiredSend message in agency consultation
Parameters
sessionId (string)required— Session UUIDRequest Body
{
"content": "string"
}Response
AgencyMessage— AI response with contexttis
POST
/api/tis/matchAuth RequiredFind matching template for a project
Request Body
{
"description": "string",
"category": "string",
"features": "string[]"
}Response
TISMatchResponse— Matched template or generatedself-heal
GET
/api/self-heal/statusAuth RequiredGet system health status
Response
SelfHealStatus— Health metrics and eventsPOST
/api/self-heal/fixAuth RequiredRequest AI-powered code fix
Request Body
{
"projectId": "string",
"code": "string",
"errors": "CodeError[]"
}Response
GPREResult[]— Fix resultsanalytics
POST
/api/analytics/trackTrack analytics event
Request Body
{
"type": "string",
"data": "object"
}Response
{ success: boolean }— Tracking confirmation