All guides

Team and administration

API tokens

Let programs, scripts and automations use Sealed Print with an API token.

An API token gives a program access to the Sealed Print REST API, for example to print invoices from an ERP system, labels from an online shop or reports from a script. A token acts on behalf of the person who created it, with at most their permissions, and only in the organization where it was created. The API reference describes every endpoint with examples.

Prerequisites

  • Every member can create tokens in a browser session. Admins see and can revoke all tokens of the organization.
  • To submit jobs through the API, an admin switches on the inbound channel REST API under Settings → Inbound channels. It is off by default. All other endpoints work with a valid token anyway.
  • Included in every plan.

One-time setup

  1. Go to Settings → API tokens and select New token.
  2. Enter a Name that says what the token is used for, for example "Invoice export accounting".
  3. Choose the Permissions: User (your own sources, destinations and jobs), Admin or Owner, at most your own role.
  4. Choose the Expiration: 7, 30 or 90 days, 1 year, a custom date, or no expiration.
  5. Select Create and copy the token. It is shown only now; store it securely, for example in a password manager.

Send the token with every request in the header Authorization: Bearer sp_api_…. To print a PDF:

curl -X POST "https://www.sealedprint.com/api/jobs?name=Invoice" \
  -H "Authorization: Bearer sp_api_…" \
  -H "Content-Type: application/pdf" \
  --data-binary @invoice.pdf

Without a destination, the job goes to your default destination. Add destinationId to print on a specific one; print options such as copies or sides go along as query parameters.

Every time

  • Last used on the token list shows whether a program still uses the token.
  • Rename changes the name; Roll issues a new secret for the same token (the old one stops working at once, name, permissions and expiry stay); Revoke ends it for good.
  • Show expired and revoked lists tokens that no longer work.

Troubleshooting

  • HTTP 401: the token is missing, wrong, expired or revoked.
  • HTTP 403 when submitting a job: the inbound channel REST API is switched off, or the token's permissions do not allow the action.
  • HTTP 413 or 415: the file is larger than the plan allows, or not a PDF, JPEG or PNG.
  • A token suddenly stops working: tokens become invalid when the person who created them leaves the organization. Create a new token with another member.
  • The token was copied somewhere it should not be: select Roll or Revoke right away.

What's next