Postal Developers
Getting started

API keys

Create a key, choose its scopes, rotate and revoke it.

Every request to api.postal.music/api/v1/* and every MCP connection is authenticated with an API key that belongs to one Postal account. The key acts as that account: it sees that account's library and nothing else.

Create a key

Sign in to Postal and open Settings → Integrations.

Click Create API key. The key is shown once; copy it somewhere safe. You can reveal it again later from the same screen.

Open Tools → Integration to narrow the key's scopes or attach a webhook URL. A key created from settings starts with every assignable scope and no expiry.

Keys look like an 8-character id, a dot, and a 32-character secret:

k7Qw2ZpL.Xj9c3vT1nR8mBq4sLw0yFh6dKe2aGu5p

The part before the dot identifies the key in logs and in the usage report. The part after it is never stored in plain text.

Send it

Put the key in the X-API-Key header:

curl https://api.postal.music/api/v1/tracks/count \
  -H "X-API-Key: YOUR_API_KEY"

Authorization: Bearer is reserved for the web app's session token and is not accepted by the /api/v1 endpoints. The MCP server accepts either header.

Scopes

A key carries a list of scopes. Each endpoint declares the scope it needs, and a key missing that scope gets 403 insufficient_scope.

ScopeGrants
read:tracksList, get and count tracks; taxonomy; suggested tags; duplicates; submissions; natural-language search
create:tracksUpload tracks (multipart or by URL)
update:tracksEdit details and tags, trigger and apply auto-tagging, cover art
read:playlistsList and get playlists
create:playlistsCreate playlists, add tracks
update:playlistsRename, remove tracks, reorder
read:composersList and count composers
read:composerGet a single composer
create:composerCreate a composer
update:composerUpdate a composer
delete:composerDelete a composer
read:analyticsDashboard, per-entity stats, top tracks
read:briefsBriefs you own and their submissions
read:shareholdersReserved
read_usage, create_key, revoke_key, rotate_keyReserved for key management

Two scopes you may see on older keys are not assignable: all is a legacy wildcard that still works on the keys that have it, and act-as-user marks service keys provisioned by Postal. platform:* scopes belong to platform keys and are issued by Postal staff only.

Composer scopes come in pairs

Listing and counting composers needs read:composers; fetching one needs read:composer. A key with only one of the two will half-work. Grant both.

Rotate and revoke

Both live in Tools → Integration. Rotating issues a new id and secret at once and invalidates the old pair; revoking disables the key permanently. Either action also disconnects any MCP client authorised with that key.

The same operations are exposed over HTTP for dashboard sessions; see Key management.

Good practice

  • Create one key per integration so you can revoke one without touching the others.
  • Grant only the scopes the integration uses. Read-only keys cannot change your library even if leaked.
  • Keys have no expiry by default. Set days on creation if you want one.
  • Never ship a key in client-side code. The API is meant to be called from a server or a trusted desktop tool.

On this page