Skip to content

Authentication

API keys, OAuth access tokens, scopes, key expiry and what a 401 or 403 means.

On this page

Every request except the public documentation routes carries a credential in the Authorization header. Nothing else is accepted: a key in a web address or a form field is refused, and so is a request without a credential.

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

API keys#

A key looks like seemly_live_<public id><secret><checksum>. Test keys, which exist only in a sandbox, start with seemly_test_. A live key never works on a sandbox and a test key never works on a live workspace; mixing them returns sandbox_only.

  • A workspace owner creates, lists and revokes keys in Developers in the dashboard. There is no operation that creates or reads a key, so a leaked key cannot make more keys.
  • The full key is shown once, at creation. Seemly stores only a keyed hash and the last four characters.
  • A key belongs to exactly one workspace. No request parameter selects a workspace.
  • A workspace can hold up to 25 active keys.

Lifetime#

Kind of keyExpires
A key made by a personAfter one year
An AI agent key (the Agent preset)After 90 days
A key for an approved partner integrationNever, but only after Seemly approves it (see partners)

The dashboard shows a reminder 14 days before a key expires. A revoked or expired key stops working within one request, and the answer is credential_revoked or credential_expired.

Scopes#

A key can only do what its scopes say. Add the fewest it needs. The dashboard offers presets you can edit before you create the key:

PresetForScopes
Read onlyA reporting toolaccount:read, lists:read, tags:read, mailings:read, sequences:read, magnets:read, promos:read, swaps:read, stats:read
IntegrationA store, a website or a no-code toolaccount:read, lists:read, tags:read, subscribers:write, tags:write
AI agentAn assistant that drafts mailingsaccount:read, lists:read, tags:read, audiences:read, design:read, mailings:read, mailings:write, sequences:read, magnets:read, stats:read
Full access (no sending)Your own scriptsEvery scope except the three below

Three scopes are never part of a preset, and each needs an explicit step when the owner grants it:

ScopeWhat it allowsThe owner must
mailings:sendSend mailings without waiting for approval in the dashboardTick a plain-language acknowledgement. The plan must also include API sending.
subscribers:write_confirmedAdd readers as already confirmedDeclare where the readers come from and how they joined, and attest to their consent.
subscribers:exportDownload the whole list as a CSVAccept a warning that it exposes every address.

Each operation page lists its required scopes, and get_current_access returns the scopes of the key you are using.

OAuth for apps that act for many authors#

An application that acts for several authors does not ask them to paste keys. It uses OAuth 2.1 with PKCE:

  1. The app discovers the sign-in service from /.well-known/oauth-protected-resource (RFC 9728). A 401 response also carries a WWW-Authenticate header that points to it.
  2. The author signs in. On first use by an app, the API answers consent_required with a link to the dashboard page where the author chooses the workspace and the scopes.
  3. The app calls the API with the access token as a Bearer token, exactly like a key. The grant, not the token, decides what the app may do.
  4. The author can revoke a connected app at any time in Developers. Revocation takes effect on the next request.

Reading an authentication problem#

Status and codeMeaningWhat to do
401 unauthenticatedNo credential, or one that is malformed or unknownSend Authorization: Bearer <key>. Check for a trailing space or a missing character.
401 credential_expiredThe key passed its expiry dateAsk the owner for a new key.
401 credential_revokedThe owner revoked the keyAsk the owner for a new key.
403 insufficient_scopeThe key is valid but lacks a scopeThe problem names the missing scope. Ask the owner for a key with it.
403 plan_does_not_includeThe plan has no API access, or not this featureUpgrade, or stop using the feature.
403 workspace_pausedThe workspace is pausedRead sending.sentence from get_current_access; the author resolves it in the dashboard.
403 consent_requiredAn OAuth app has no grant for a workspace yetSend the author to the link in the problem.

Failing to authenticate many times from one address in a short time makes that address wait before it is allowed to try again (rate_limited).

Keep keys safe#

  • Store a key in your server's secret store, never in source control, a mobile app or browser code.
  • Give each integration its own key so you can revoke one without breaking the others.
  • If a key leaks, revoke it in Developers. Every request it made is listed on the API activity page.

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.