quickstart

60 seconds to a
real call.

Three terminals, one bearer, no SDK. By the end of this page you'll have hit both planes — REST for state, MCP for tool dispatch — and you'll know which one to reach for next.

1 · get a token.

Two flavors. Pick one. A session token gets you started; an API key is what you ship.

option A · session token

log in, copy

Log in at tiredevents.com/auth/login. Your browser stores a session token in localStorage.tired.session.v1. Copy the sessionToken field. Good for ~24h, scoped to your user.

option B · long-lived API key

mint, save, rotate

From the organizer dashboard, go to /studio/api-keys. Create a key, copy it once (it's hashed server-side, you cannot read it back). Use this for production. Rotate by issuing a new one, then deleting the old.

option C · MCP bearer

ask

The MCP host uses a separate bearer. Request one by emailing api@tired.events with your use case. Token rotation guarantee: 90 days notice before any key change.

2 · hit REST.

The REST plane is at api.tired.events. Bearer in Authorization header. Responses are JSON. Errors carry a code + human message.

# list your recent orders
export TIRED_TOKEN="..."

curl https://api.tired.events/orders/mine \
  -H "Authorization: Bearer $TIRED_TOKEN" \
  -H "Accept: application/json"

# expected:
# {"orders":[{"id":"ord_…","event_id":"evt_…","total_cents":4500,"status":"paid",…}]}

Rate limit: 60 req/min/key on most routes; 600 req/min on read-only stats endpoints. If you hit it, you'll get 429 with a Retry-After header.

3 · hit MCP.

The MCP plane is at mcp.tiredapi.co/mcp. JSON-RPC 2.0 over HTTP. One bearer, one URL — 41 tools through one entry point.

# list every tool the server exposes
curl -X POST https://mcp.tiredapi.co/mcp \
  -H "Authorization: Bearer $MCP_BEARER" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"tools/list","id":1}'

# call one of them
curl -X POST https://mcp.tiredapi.co/mcp \
  -H "Authorization: Bearer $MCP_BEARER" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"tools/call","id":2,
       "params":{"name":"tired_context_stats","arguments":{}}}'

The tools/list response is the canonical schema. Browse all 41 tools →

4 · pick a path.

When to reach for which plane.

use REST when

you're building product

Mobile app, white-label storefront, custom dashboard. Anything user-facing. Auth-, payment-, and search-style endpoints live here. 250+ routes; if it's a noun, it's REST.

use MCP when

you're building an agent

An LLM with tools. Context persistence, plan parsing, secrets vault, session rot scoring. Verbs that an agent calls between thoughts. If it's a verb-with-state, it's MCP.

use both when

you're shipping the network

REST holds canonical state. MCP gives an agent the verbs to act on that state. Most production apps end up using both — REST for the data, MCP for the supervision.