Skip to main content Skip to navigation

Documentation

Everything you need to build irresistible applications

API Documentation

Build powerful integrations with the Irresistible API.

Overview

Base URL

https://api.irresistible.app

Authentication

All API requests must include an authorization header with a valid access token.

Authorization: Bearer YOUR_TOKEN

Rate 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 /api/auth/token
Generate an access token
POST /api/auth/refresh
Refresh an expired token
POST /api/auth/revoke
Revoke an access token

Projects

Manage your projects programmatically.

GET /api/projects
List all projects
POST /api/projects
Create a new project
GET /api/projects/:id
Get project details
PUT /api/projects/:id
Update project
DELETE /api/projects/:id
Delete project

AI Assistant

Interact with the AI assistant programmatically.

POST /api/ai/chat
Send a message to AI assistant
POST /api/ai/generate
Generate code from prompt
GET /api/ai/usage
Get AI usage statistics

Deployments

Deploy and manage your applications.

POST /api/deploy
Deploy a project
GET /api/deployments/:id
Get deployment status
GET /api/deployments/:id/logs
Get deployment logs

Response 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

CodeDescriptionHTTP Status
INVALID_REQUESTInvalid request parameters400
UNAUTHORIZEDMissing or invalid authentication401
FORBIDDENInsufficient permissions403
NOT_FOUNDResource not found404
RATE_LIMITEDToo many requests429
SERVER_ERRORInternal server error500

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.