> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firstanswer.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Welcome to the First Answer API. Access your AI visibility monitoring data programmatically.

## Overview

The First Answer API gives you programmatic access to the data available in the First Answer platform. Use it to integrate AI visibility insights into your own workflows, dashboards, and tools.

All endpoints are **read-only** (HTTP `GET`) and return data in JSON format. The API follows RESTful conventions and uses standard HTTP status codes.

## Base URL

All API requests should be made to:

```text theme={null}
https://api.firstanswer.ai
```

## Available Resources

| Resource                                                      | Description                                                             |
| ------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [Brands](/api-reference/brands)                               | Your monitored brands and their visibility data                         |
| [Groups](/api-reference/groups)                               | Prompt groups for organization                                          |
| [Monitored Competitors](/api-reference/monitored-competitors) | Competitor brands and their visibility data                             |
| [Monitored Prompts](/api-reference/monitored-prompts)         | AI prompts being tracked, with responses, citations, and search queries |
| [Cited Sources](/api-reference/cited-sources)                 | Domains and URLs cited in AI responses, with related prompts            |
| [Action Plans](/api-reference/action-plans)                   | Suggested action plans for improving AI visibility                      |
| [Dashboard](/api-reference/dashboard)                         | Aggregated dashboard metrics                                            |

## Response Format

All successful responses follow a consistent structure.

**Single resource:**

```json theme={null}
{
  "data": {
    "id": 1,
    "name": "Example Brand"
  }
}
```

**Paginated list:**

```json theme={null}
{
  "pagination": {
    "current_page": 1,
    "per_page": 100,
    "total_pages": 3,
    "total_records": 250
  },
  "data": [
    { "id": 1, "name": "Example Brand" }
  ]
}
```

## Pagination

List endpoints return paginated results. Use the `page` and `per_page` query parameters to control pagination:

| Parameter  | Type    | Default | Description                                     |
| ---------- | ------- | ------- | ----------------------------------------------- |
| `page`     | integer | `1`     | Page number (1-indexed)                         |
| `per_page` | integer | `100`   | Number of items per page (min: `1`, max: `100`) |

## Error Format

All errors return a consistent JSON structure:

```json theme={null}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "A human-readable description of the error."
  }
}
```

### Error Codes

| HTTP Status | Code                    | Description                                                                 |
| ----------- | ----------------------- | --------------------------------------------------------------------------- |
| `401`       | `AUTHENTICATION_FAILED` | Missing, invalid, or expired API key                                        |
| `403`       | `PERMISSION_DENIED`     | API key does not have access to this resource                               |
| `404`       | `NOT_FOUND`             | The requested resource does not exist                                       |
| `405`       | `METHOD_NOT_ALLOWED`    | HTTP method not supported for this endpoint                                 |
| `429`       | `RATE_LIMIT_EXCEEDED`   | Project rate limit exceeded — see [Rate limits](/api-reference/rate-limits) |
| `500`       | `INTERNAL_SERVER_ERROR` | An unexpected error occurred on the server                                  |

## Quick Start

<Steps>
  <Step title="Get your API key">
    Go to your [account settings](https://app.firstanswer.ai/settings/api-keys) and generate a new API key. Copy it immediately — it won't be shown again.
  </Step>

  <Step title="Make your first request">
    ```bash theme={null}
    curl -H "api-key: YOUR_API_KEY" \
      https://api.firstanswer.ai/v1/brands/
    ```
  </Step>

  <Step title="Explore the data">
    Use the response to navigate related resources like monitored prompts, citations, and competitors.
  </Step>
</Steps>

## Need Help?

If you have questions or run into issues, reach out to our support team at [support@firstanswer.ai](mailto:support@firstanswer.ai).
