Your application authenticates to the public API with an API key. You create keys in the console, and each key works for one app only. The public API can't create keys.
Before you start
You need the owner or admin role in your organization. Members and viewers see the API Keys page but can't create or change keys.
Switch to the app the key is for, such as your staging app, with the app switcher at the top of the sidebar. A key made in one app can't reach another.
Create the key
- Open API Keys in the sidebar and click Create API key.
- In Name, say what the key is for, such as
billing-service staging. - In Expiration, choose when the key stops working: 7 days, 30 days, 60 days, 90 days, Custom or No Expiration. The default is 30 days. A Custom date expires at the end of that day in your local time zone.
- In Scopes, choose No access, Read or Write for Events, Deliveries, Sources and Destinations. Write includes Read. For Analytics, choose No access or Access. Choose at least one.
- Click Create key.
A new key defaults to Events set to Write, with the other groups set to No access. The four read/write groups and Analytics cover nine scopes in total.
For the quickstart, set Events and Destinations to Write. That lets the key create a destination, send events and read them back. Set Deliveries to Read if you want to query deliveries directly. Set Sources to Write if the key will create or configure sources for incoming webhooks. API key scopes lists the operations behind each level.
Copy the secret
The next dialog shows the full key once, starting with ppk_live_. Click Copy to clipboard before you close it. The console keeps only a hash of the key and shows its last four characters afterwards, so nobody can show it to you again. If you lose it, rotate the key or create a new one.
Keep the key on your server, never in browser or mobile code. The guides read it from an environment variable:
export PAYLOADPUFFIN_API_KEY='ppk_live_...'Send it as a Bearer token in the Authorization header. The apk_ value shown as Key ID only identifies the key in the console. It can't authenticate.
Change the key later
Select the key in the list to open its panel. There you can edit the name, the scopes and the expiry. You can move the expiry earlier, but not later. A scope change can take up to a minute to take effect.
To replace the secret without downtime, follow Rotate an API key. To stop the key for good, click Delete API key. Every request with the key fails from then on, and the key stays listed under Inactive.
Next steps
Configure a destination gives your events somewhere to go.