Authenticating
Send your API key as a Bearer token in theAuthorization header. Keys start with fsk_, are created at Settings > API keys and are shown once, so if you no longer have the value, create a new one. Consider issuing a key with an expiry date just for exploring and revoking it when you are done. See Authentication.
X-Workspace-Id is optional on an ordinary key. A key can cover several workspaces, and the header names the one a request acts in. Without it, the request acts in the key’s default workspace. A workspace that is not on the key returns 401. See Workspaces.
A key that acts for members needs both an X-Act-As header and an X-Workspace-Id header on every call, so add them to each request you copy.
Editing the request
The samples use example ids that do not exist in your workspace, so a request run unchanged returns404. Swap them for ids from your own responses. Required fields are marked on the page; leave an optional field out rather than sending it empty. See Endpoint pages for a tour of the whole page.
A safe first sequence
These three reads change nothing in your workspace.1
GET /api/v1/account
Confirms the key is accepted and returns the organisation and workspace it acts in, the role it acts as, and the user work is attributed to (the key’s issuer, or the named member on a key that acts for members).
2
GET /api/v1/workspaces
Lists the key’s workspaces and names the one the call acted in as
active. Copy that id if you plan to send X-Workspace-Id.3
GET /api/v1/packages
Pages through the packages the key can see. Filter with
status or search. See Pagination.POST /api/v1/packages/from-template without "status": "sent" creates a DRAFT, which sends nothing until you act on it.
If you get a 402
A402 means the organisation’s plan does not include the public API, which is part of the Enterprise plan. The message names the missing feature. The same status comes back from a send when the organisation has no credit left, and from a create that would exceed a plan limit such as recipients per package. See Errors and rate limits.
