# Authentication

Parcel Events Sandbox API authenticates requests with the schemes below.

## Your API keys

This panel is personal to the signed-in reader and is filled in the browser at read time; it is never part of these published bytes.

## ApiKey

API key (header)

Pass your key in the Parcel-API-Key request header on every call.

```sh
curl -H "Parcel-API-Key: YOUR_API_KEY" https://api.example.com/endpoint
```

## BearerToken

HTTP Bearer

Send your token in the Authorization header.

Token format: opaque.

```sh
curl -H "Authorization: Bearer YOUR_API_KEY" https://api.example.com/endpoint
```

## Code example

An authenticated call to this API, ready to copy:

```sh
curl -X GET -H 'Parcel-API-Key: YOUR_API_KEY' 'https://api.example.com/v1/pickups'
```

## Related pages

- [Getting started](./getting-started.md)

# Agent Instructions

This portal answers questions programmatically. To receive a synthesized,
source-cited answer instead of crawling page by page, append the `?ask=`
query parameter to any page URL on this site:

    /guides/quickstart?ask=how+do+I+authenticate

Optional parameters:

- `&goal=<what-you-are-trying-to-do>` steers the answer toward your
  objective (e.g. `&goal=write+a+python+client`).
- `&version=<label>` scopes the answer to a mounted version when the
  portal publishes more than one.

The response is `text/markdown`: the answer followed by a `# Sources` list
of the portal pages it was grounded in. Status codes are the contract:

- `200` — the answer; `402` — the portal owner’s plan or answer credits are
  exhausted (surface this to your operator; do NOT retry); `429` — you are
  rate-limited; back off for the `Retry-After` seconds; `503` — the answer
  lane is temporarily unavailable; fall back to crawling the `.md` pages.

For the full corpus map read `llms.txt` at the site root; for the tool
surface (search + page fetch as MCP tools) see `/mcp`.
