Skip to content

Quickstart

Create a key, make your first call, add a subscriber and read it back in five minutes.

On this page

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:

Shell
export SEEMLY_API_KEY="seemly_live_..."

If you want to try everything without touching real readers, create a 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.

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.

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": "[email protected]", "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.

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": "[email protected]", "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.

4. Read the reader back#

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:

Shell
# 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#

View this page as MarkdownReport a problem with this page

Type to search. Try a method and path, an operation name or an error code.