# Quickstart

Make your first Seemly API call, add a reader and read it back in about five minutes. Every command on this page is run against a test copy of the API every time the documentation changes, so you can paste it as it is.

## Before you start

- The API is included with the Magnets & Promos and Pro plans. A Free workspace has no API access.
- Only the workspace owner can create a key. Open Developers in your dashboard and choose Create a key. Pick the Integration preset for this page.
- The full key is shown once. Copy it somewhere safe. Never put a key in a web address or in code that runs in a browser.

Put the key in an environment variable so the commands below work as written:

```bash
export SEEMLY_API_KEY="seemly_live_..."
```

If you want to try everything without touching real readers, create a [sandbox](/developers/md/guides/sandbox) and use its test key instead. Test keys start with `seemly_test_`.

## 1. Check the key

`get_current_access` needs no scope. It tells you which workspace the key belongs to, what the key may do, your plan's limits and whether sending is paused.

```bash
curl https://api.seemly.com/v1/whoami \
  -H "Authorization: Bearer $SEEMLY_API_KEY"
```

The `callable_operations` list in the answer is every operation this key may call right now. If a call you need is missing, the key lacks a scope: create a new key with it.

## 2. Look before you write

Every change accepts `dry_run=true`. It runs every check and tells you what would happen, and it writes nothing. See [dry runs](/developers/md/guides/dry-runs).

```bash
curl -X POST 'https://api.seemly.com/v1/subscribers?dry_run=true' \
  -H "Authorization: Bearer $SEEMLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email": "reader@example.com", "name": "Sam Reader", "tags": ["store-buyer"]}'
```

## 3. Add a reader

A new reader is added as pending, and Seemly emails them a confirmation link (double opt-in). They join your list only when they click it. The `Idempotency-Key` header makes a retry safe: send the same key again and nothing runs twice. See [idempotency](/developers/md/guides/idempotency).

```bash
curl -X POST https://api.seemly.com/v1/subscribers \
  -H "Authorization: Bearer $SEEMLY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"email": "reader@example.com", "name": "Sam Reader", "tags": ["store-buyer"]}'
```

The answer holds a `subscriber_id`. To add a reader as already confirmed you need a different scope and evidence of consent: read [adding subscribers and consent](/developers/md/guides/subscribers-and-consent).

## 4. Read the reader back

```bash
curl https://api.seemly.com/v1/subscribers/$SUBSCRIBER_ID \
  -H "Authorization: Bearer $SEEMLY_API_KEY"
```

Here `$SUBSCRIBER_ID` is the `subscriber_id` from the previous answer. The reader's status is `pending` until they confirm. To find a reader by address, send the address in a request body to `find_subscriber_by_email`; an address in a web address is refused.

## 5. When something goes wrong

Every error is a small JSON document with a stable `code`, a `fix` sentence and the next operation to call. A request without a valid key looks like this:

```bash
# expect: 401
curl https://api.seemly.com/v1/whoami
```

```json
{
  "type": "https://api.seemly.com/docs/api/errors/unauthenticated",
  "title": "Authentication required",
  "status": 401,
  "code": "unauthenticated",
  "retryable": false,
  "fix": "Send a valid API key as Authorization: Bearer <key>."
}
```

Branch on `code`, show `fix` to a person, and quote `request_id` if you contact support.

## Where next

- [Authentication](/developers/md/guides/authentication): scopes, key lifetime and OAuth.
- [Webhooks](/developers/md/guides/webhooks): hear about new readers as they happen.
- [Guide for AI agents](/developers/md/guides/agents): draft a mailing and ask the author to send it.
- [Limits by plan](/developers/md/guides/limits), [pagination](/developers/md/guides/pagination).
- Every operation has its own page in the [index](/developers), and the whole contract is the [OpenAPI document](https://api.seemly.com/v1/openapi.json).
