Skip to main content

API Documentation

Complete reference for the Promptax API.

Base URL

https://api.promptax.io

Authentication

Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

auth

GET/api/auth/session

Get current user session

Response

Session | nullCurrent session or null

projects

GET/api/projectsAuth Required

List all projects for the authenticated user

Response

Project[]Array of projects
POST/api/projectsAuth Required

Create a new project

Request Body

{
  "name": "string",
  "description": "string",
  "organisationId": "string"
}

Response

ProjectCreated project
GET/api/projects/[projectId]Auth Required

Get a specific project by ID

Parameters

projectId (string)requiredProject UUID

Response

ProjectProject details
PUT/api/projects/[projectId]Auth Required

Update a project

Parameters

projectId (string)requiredProject UUID

Request Body

{
  "name": "string",
  "description": "string"
}

Response

ProjectUpdated project
DELETE/api/projects/[projectId]Auth Required

Delete a project

Parameters

projectId (string)requiredProject UUID

Response

{ success: boolean }Deletion confirmation
GET/api/projects/[projectId]/chatAuth Required

Get chat history for a project

Parameters

projectId (string)requiredProject UUID

Response

ChatMessage[]Chat messages
POST/api/projects/[projectId]/chatAuth Required

Send a message and get AI response

Parameters

projectId (string)requiredProject UUID

Request Body

{
  "content": "string",
  "model": "string"
}

Response

ChatMessageAI response message
GET/api/projects/[projectId]/plansAuth Required

List build plans for a project

Parameters

projectId (string)requiredProject UUID

Response

BuildPlan[]Build plans
POST/api/projects/[projectId]/plansAuth Required

Generate a new build plan

Parameters

projectId (string)requiredProject UUID

Request Body

{
  "features": "string[]",
  "techStack": "string[]"
}

Response

BuildPlanGenerated plan with steps
POST/api/projects/[projectId]/generateAuth Required

Generate code for a build step

Parameters

projectId (string)requiredProject UUID

Request Body

{
  "planId": "string",
  "stepId": "string"
}

Response

GeneratedFile[]Generated files
GET/api/projects/[projectId]/deploymentsAuth Required

List deployments for a project

Parameters

projectId (string)requiredProject UUID

Response

Deployment[]Deployment history
POST/api/projects/[projectId]/deploymentsAuth Required

Create a new deployment

Parameters

projectId (string)requiredProject UUID

Request Body

{
  "environment": "string"
}

Response

DeploymentDeployment details
GET/api/projects/[projectId]/testsAuth Required

List test suites for a project

Parameters

projectId (string)requiredProject UUID

Response

TestSuite[]Test suites
POST/api/projects/[projectId]/testsAuth Required

Generate tests for project

Parameters

projectId (string)requiredProject UUID

Request Body

{
  "type": "string"
}

Response

{ suitesCreated: number, testsGenerated: number }Generation result

agency

GET/api/agencyAuth Required

List agency sessions

Response

AgencySession[]Agency sessions
POST/api/agencyAuth Required

Start a new agency consultation

Request Body

{
  "projectId": "string"
}

Response

AgencySessionNew session
POST/api/agency/[sessionId]/messageAuth Required

Send message in agency consultation

Parameters

sessionId (string)requiredSession UUID

Request Body

{
  "content": "string"
}

Response

AgencyMessageAI response with context

tis

POST/api/tis/matchAuth Required

Find matching template for a project

Request Body

{
  "description": "string",
  "category": "string",
  "features": "string[]"
}

Response

TISMatchResponseMatched template or generated

self-heal

GET/api/self-heal/statusAuth Required

Get system health status

Response

SelfHealStatusHealth metrics and events
POST/api/self-heal/fixAuth Required

Request AI-powered code fix

Request Body

{
  "projectId": "string",
  "code": "string",
  "errors": "CodeError[]"
}

Response

GPREResult[]Fix results

analytics

POST/api/analytics/track

Track analytics event

Request Body

{
  "type": "string",
  "data": "object"
}

Response

{ success: boolean }Tracking confirmation