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

# Account API

> Use the OpenRevenue Account API to list projects, create projects, delete projects, and manage API access.

## Get started

Use the Account API when you need server-side project management. Analytics data lives in the [Project API](https://docs.openrevenue.com/api/project-api.md).

**Step 1**

Create an API key from [Account → API](https://www.openrevenue.com/account/api)

**Step 2**

Store the key in your server environment

**Step 3**

Pass it as a Bearer token in every request

> [!WARNING]
>
> API keys are created and deleted only from the logged-in dashboard. Keep them out of client-side code and public repositories.

## Authentication

Pass your API key in the `Authorization` header on every request:

```bash theme={"theme":{"light":"one-light","dark":"one-dark-pro"}}
curl https://api.openrevenue.com/v1/projects \
  -H "Authorization: Bearer openrevenue_your_api_key_here"
```

Requests without a valid key return `401 Unauthorized`. Keys can be `read` or `read write`; create and delete require write.

Mobile session routes (Bearer session, not API key): `GET`/`PATCH` `/api/account/profile` and `DELETE` `/api/account`.

## Base URL

All API endpoints are available under `/v1` on the API host:

```bash Base URL theme={"theme":{"light":"one-light","dark":"one-dark-pro"}}
https://api.openrevenue.com/v1
```

Machine-readable OpenAPI 3.1: [/openapi.json](https://www.openrevenue.com/openapi.json). Hosted MCP: [Docs → MCP](https://docs.openrevenue.com/api/mcp.md).

## Periods

Endpoints that accept a `period` query parameter support these values:

| Value | Description |
| - | - |
| `today` | Since midnight today (UTC) |
| `24h` | Last 24 hours |
| `7d` | Last 7 days |
| `30d` | Last 30 days (default) |
| `90d` | Last 90 days |
| `6m` | Last 6 months |
| `12m` | Last 12 months |
| `this_week` | Current week, starting Sunday (UTC) |
| `this_month` | Current calendar month (UTC) |
| `this_year` | Current calendar year (UTC) |
| `all` | Since your first event |

## Endpoints

> [card] [List projects](https://docs.openrevenue.com/api/account-api/list-projects.md)
>
> Returns all projects belonging to the authenticated user, ordered by creation date.

> [card] [Create project](https://docs.openrevenue.com/api/account-api/create-project.md)
>
> Creates a new project. The domain is automatically normalized — protocols and paths are stripped.

> [card] [Delete project](https://docs.openrevenue.com/api/account-api/delete-project.md)
>
> Permanently deletes a project and all its analytics data. Requires a write-scoped API key and `{"confirm":true}` in the JSON body. This action cannot be undone.


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