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

# Quickstart

> Get an API key and make your first request to the Office Hours API.

The Office Hours API lets you work with your projects, perspectives, consultations, and experts from your own systems. It's a REST API that accepts and returns JSON.

## Get an API key

API keys are issued by Office Hours. Ask your Office Hours representative for one. Each key belongs to your organization and comes with a set of scopes that decide which endpoints it can call.

Treat your key like a password. Store it in an environment variable or a secrets manager, and never commit it to source control.

## Make your first request

Send your key as a bearer token in the `Authorization` header. This request returns the IDs of your company's consultations.

```bash theme={null}
curl https://api.officehours.com/v0/consultations \
  -H "Authorization: Bearer $OFFICEHOURS_API_KEY"
```

```json theme={null}
{
  "data": ["68207f8ee9d1f1b7b1e3c0a2", "68207f8ee9d1f1b7b1e3c0b7"],
  "total": 2,
  "nextPageInfo": {"nextCursor": null, "order": "ASC"}
}
```

Fetch any of them with `GET /v0/consultations/{id}`. A missing or invalid key returns `401 UNAUTHENTICATED`.

## Pagination

Most list endpoints return one page at a time. Each response has `data` for the page, `total` for the number of matches across all pages, and `nextPageInfo`.

To get the next page, pass `nextPageInfo.nextCursor` as the `cursor` parameter. When `nextCursor` is `null`, you've reached the last page. Use `pageSize` to choose how many results come back, up to 100.

## Scopes

Every endpoint requires one scope, such as `consultations.read` or `projects.write`. You'll find it under **Required scope** on each endpoint's reference page. Calling an endpoint your key isn't scoped for returns `403 FORBIDDEN`.

To add or remove scopes on a key, contact your Office Hours representative.

## Rate limits

Each endpoint has its own rate limit, listed on its reference page. Limits apply to your whole organization, so all of your API keys share them.

When you go over a limit, the API returns `429 RATE_LIMITED` with a `Retry-After` header. Wait that many seconds before you try again.

## Next steps

> [card] [Errors](https://docs.officehours.com/errors.md)
>
> See how errors are returned and which ones are safe to retry.

> [card] [Webhooks](https://docs.officehours.com/webhooks/events.md)
>
> Get notified when consultations, projects, and prospects change.


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