# Overview

Integrate InsightAgent into your applications with our REST API.

## Base URL

```
https://api.insightagent.io
```

## Authentication

All API requests require authentication. See [Authentication](https://docs.insightagent.io/api-reference/authentication) for details.

## Quick Start

```bash
# List your interviews
curl -X GET "https://api.insightagent.io/api/interviews" \
  -H "Authorization: Bearer <your-token>"

# Create an interview
curl -X POST "https://api.insightagent.io/api/interviews" \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "interviewType": "FULL_INTERVIEW",
    "title": "Market Research Interview",
    "expert": {"name": "John Doe", "title": "VP Engineering"},
    "questions": ["What are the key challenges in your role?"]
  }'
```

## Available Endpoints

| Resource          | Description                  |
| ----------------- | ---------------------------- |
| `/api/interviews` | Create and manage interviews |
| `/api/agents`     | Configure AI agents          |
| `/api/auth`       | Authentication and profiles  |

See [Endpoints](https://docs.insightagent.io/api-reference/endpoints) for complete documentation.

## Response Format

Successful responses return JSON data directly:

```json
{
  "id": "...",
  "title": "...",
  ...
}
```

## Error Handling

Errors return appropriate HTTP status codes:

| Code | Description                            |
| ---- | -------------------------------------- |
| 400  | Bad Request - Invalid parameters       |
| 401  | Unauthorized - Invalid or missing auth |
| 403  | Forbidden - Insufficient permissions   |
| 404  | Not Found - Resource doesn't exist     |
| 500  | Server Error - Something went wrong    |

Error response format:

```json
{
  "error": {
    "code": "INVALID_PARAMETER",
    "message": "The 'expert.name' field is required"
  }
}
```

## OpenAPI Specification

Access our OpenAPI spec for code generation:

```
https://api.insightagent.io/api-docs-json
```

Interactive documentation is available at:

```
https://api.insightagent.io/api-docs
```
