API Documentation
Build powerful integrations with the Irresistible API.
Overview
Base URL
https://api.irresistible.appAuthentication
All API requests must include an authorization header with a valid access token.
Authorization: Bearer YOUR_TOKENRate Limits
API requests are rate limited based on your plan:
- Free: 100 requests/hour
 - Pro: 1,000 requests/hour
 - Team: 10,000 requests/hour
 
Code Examples
Authentication
          // Authentication example
const response = await fetch('https://api.irresistible.app/api/auth/token', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    apiKey: 'your-api-key',
    apiSecret: 'your-api-secret'
  })
});
const { token } = await response.json();
        Create Project
          // Create a new project
const response = await fetch('https://api.irresistible.app/api/projects', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + token,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'My Awesome Project',
    template: 'react',
    description: 'A new React project'
  })
});
const project = await response.json();
        AI Code Generation
          // Generate code with AI
const response = await fetch('https://api.irresistible.app/api/ai/generate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + token,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    prompt: 'Create a React component for a user profile card',
    language: 'typescript',
    framework: 'react'
  })
});
const { code, explanation } = await response.json();
        API Endpoints
Authentication
All API requests require authentication using an API key.
POST 
 Generate an access token/api/auth/tokenPOST 
 Refresh an expired token/api/auth/refreshPOST 
 Revoke an access token/api/auth/revokeProjects
Manage your projects programmatically.
GET 
 List all projects/api/projectsPOST 
 Create a new project/api/projectsGET 
 Get project details/api/projects/:idPUT 
 Update project/api/projects/:idDELETE 
 Delete project/api/projects/:idAI Assistant
Interact with the AI assistant programmatically.
POST 
 Send a message to AI assistant/api/ai/chatPOST 
 Generate code from prompt/api/ai/generateGET 
 Get AI usage statistics/api/ai/usageDeployments
Deploy and manage your applications.
POST 
 Deploy a project/api/deployGET 
 Get deployment status/api/deployments/:idGET 
 Get deployment logs/api/deployments/:id/logsResponse Format
All API responses follow a consistent JSON format:
Success Response
          {
  "success": true,
  "data": {
    // Response data
  },
  "meta": {
    "timestamp": "2024-01-01T00:00:00Z",
    "version": "1.0"
  }
}
        Error Response
          {
  "success": false,
  "error": {
    "code": "INVALID_REQUEST",
    "message": "Invalid API key",
    "details": {
      // Additional error info
    }
  }
}
        Error Codes
| Code | Description | HTTP Status | 
|---|---|---|
| INVALID_REQUEST | Invalid request parameters | 400 | 
| UNAUTHORIZED | Missing or invalid authentication | 401 | 
| FORBIDDEN | Insufficient permissions | 403 | 
| NOT_FOUND | Resource not found | 404 | 
| RATE_LIMITED | Too many requests | 429 | 
| SERVER_ERROR | Internal server error | 500 | 
SDKs & Libraries
Official SDKs for popular languages and frameworks:
Need Help with the API?
Check out our detailed API guides or reach out to our developer support team.