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

# Introduction

Flora's RESTful API enables developers to seamlessly integrate structured data extraction capabilities into their applications.

This documentation will guide you through the process of integrating Flora's API into your projects, covering everything from authentication to specific endpoint usage.

## Authentication

To access the Flora API, you'll need to include your API key in the request header:

```bash theme={null}
Authorization: Bearer YOUR_FLORA_API_KEY
```

<Note>
  Obtain your Flora API key by signing in to your [Flora
  dashboard](https://withflora.io/api-keys) and navigating to the API Keys
  section.
</Note>

## API Communication

Flora API adheres to RESTful principles, using JSON for both request bodies and response data. The `Content-Type` header in responses is consistently set to `application/json`.

### Response Structure

Responses from Flora API follow a consistent structure:

```json theme={null}
{
    "status": true,
    "message": "Operation successful",
    "data": { ... }
}
```

For paginated responses, a `meta` object is included with pagination details:

```json theme={null}
{
    "status": true,
    "message": "Data retrieved successfully",
    "data": {
        "meta": {
            "total": 100,
            "perPage": 10,
            "currentPage": 1,
            "lastPage": 10,
            "firstPageUrl": "/?page=1",
            "lastPageUrl": "/?page=10",
            "nextPageUrl": "/?page=2",
            "previousPageUrl": null
        },
        "data": [ ... ]
    }
}
```

### Error Handling

Flora API uses HTTP status codes to indicate the outcome of requests. Additionally, the `status` field in the response body provides a boolean indicator of success or failure.

#### Validation Errors (422)

```json theme={null}
{
  "status": false,
  "errors": [
    {
      "field": "email",
      "message": "A valid email address is required"
    },
    {
      "field": "schema_id",
      "message": "The provided schema ID is invalid"
    }
  ]
}
```

#### Other Errors (401, 403, 500)

```json theme={null}
{
  "status": false,
  "message": "An error occurred: [Error description]"
}
```

### Rate Limiting

To ensure fair usage, Flora API implements rate limiting. If you exceed the limit, you'll receive a 429 status code:

```json theme={null}
{
  "status": false,
  "message": "Rate limit exceeded. Please retry after [time] seconds."
}
```

By familiarizing yourself with these fundamentals, you'll be well-equipped to harness the full potential of Flora API in your projects. Explore the subsequent sections for detailed information on available endpoints and their usage.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.