Technical reference for the NextCoder API
/api/auth/sessionGet current user session information
/api/payments/checkoutCreate a Stripe checkout session for a subscription
/api/payments/webhookHandle Stripe webhook events
/api/workspacesList all workspaces for the authenticated user
/api/workspacesCreate a new workspace
/api/workspaces/{id}Get details for a specific workspace
/api/workspaces/{id}Update a workspace
/api/workspaces/{id}Delete a workspace
/api/agentsList all AI agents for the authenticated user
/api/agentsCreate a new AI agent
/api/agents/{id}Get details for a specific AI agent
/api/agents/{id}Update an AI agent
/api/agents/{id}Delete an AI agent
/api/integrationsList all integrations for the authenticated user
/api/integrationsCreate a new integration
/api/integrations/{id}Get details for a specific integration
/api/integrations/{id}Update an integration
/api/integrations/{id}Delete an integration
All API requests require authentication via Clerk session cookies. The authentication is handled automatically when making requests from the browser.
const response = await fetch('/api/workspaces', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
});
const workspaces = await response.json();The API uses standard HTTP status codes to indicate the success or failure of requests.