Skip to main content

Get your platform connected to Sapiom

Get an API key and start making requests. From the API keys view, click “Create platform key.”
API keys dashboard with API keys selected in the sidebar and the Create platform key button outlined in red

API keys → Create platform key

A platform key is the highest permission API key. With the Sapiom platform key, you can create and remove users and make purchases for them.

Give a user a Sapiom ID

Each of your users will need a Sapiom user ID before they can make purchases through Sapiom. After creating the Sapiom user ID, generate and save their user API key. A User API Key is a regular Sapiom API key scoped to one user. Your agent will use this ID and key when making purchases on behalf of your user. Unlike your platform key, you may share this User API key with an agent so that it may take actions on behalf of the user.
409 means it exists, so look it up by externalId.
Then create the user’s key. Store the plainKey encrypted.

Connect your agent as that user

One MCP connection per session with the user key, never shared between users. A user key connects to one user’s cards and purchases.
connect-sapiom.ts

Revoke and remove

Revoke a key in API keys.

Errors