---
title: API overview
description: OAuth 2 API for accounts, events, attendees, fields, and check-in.
sidebar:
  order: 21
---

The public API is **v2** at:

| Environment | Base URL |
| --- | --- |
| Production | `https://studio.micepad.co/api/v2` |
| Alpha | `https://launchpad.micepad.co/api/v2` |
| Local | `http://localhost:3000/api/v2` |

Interactive reference: [API reference](/reference) (generated from `/api/v2/openapi`).

In-app docs: [studio.micepad.co/api/v2/docs](https://studio.micepad.co/api/v2/docs).

## What v2 covers

- Account
- Current user (`/me`, personal tokens only)
- Events
- Registration types
- Attendees (list, create, update)
- Attendee fields (CRUD)
- Check-in / check-out / undo

There is also a legacy **Partner API v1** (`X-Api-Key`, `/api/v1`) for existing integrations. New work should use v2 OAuth.

The iPad check-in app still uses `/api/admin2` and `/api/v2/...` check-in routes. Those are not the partner API.

## Auth in one minute

```bash
# Machine-to-machine
curl -X POST https://studio.micepad.co/oauth/token \
  -d grant_type=client_credentials \
  -d client_id=CLIENT_ID \
  -d client_secret=CLIENT_SECRET \
  -d scope=read
```

```bash
curl https://studio.micepad.co/api/v2/events \
  -H "Authorization: Bearer ACCESS_TOKEN"
```

Personal (authorization-code) tokens **must** send `X-Account-Id`.

Scopes: `read` (default), `write` (create/update/delete).

## Errors

| Status | Meaning |
| --- | --- |
| 401 | Missing, invalid, expired, or revoked token |
| 404 | Event or record not found |
| 422 | Validation failed (`{ "errors": [...] }`) |
| 429 | Rate limited. Read `Retry-After` |

## Envelopes

Single record:

```json
{ "item": { }, "metadata": { } }
```

Lists:

```json
{ "items": [ ], "metadata": { } }
```

Attendee lists are paged: `page`, `per_page` (default 25, max 100), `total_count`, `total_pages`.
