Skip to main content
Pila authenticates each request with two headers. There are no sessions, tokens to refresh, or OAuth flows — you send the same pair of headers every time. Requests that send Content-Type: application/json bodies also need that header, as usual.
Example request

Finding your keys

Your keys live under Developers → Configuration in the dashboard. Each app has a separate sandbox and live pair, and you can regenerate either at any time.
API keys in the Pila dashboard

The Configuration screen, where each app's keys are listed

The key you pass in Authorization is the private key for the environment you are hitting. A sandbox key will not authenticate against api.trypila.co, and vice versa.

Setting it up in Postman

Add both values as headers on the request — Authorization with your private key and AppId with the application ID.
Pila authentication headers configured in Postman

Authorization and AppId headers set on a Postman request

Base URLs

Every request must include a base URL, and every request must be made over HTTPS. See Environments for what differs between the two.

Keeping keys safe

Never share or publish your secret key. Treat it the way you would a database password.
Read keys from environment variables or a secrets manager at runtime.
Call Pila from your backend only. A key shipped in a mobile app or browser bundle is a key that has leaked.
Use separate apps for separate products or environments so you can rotate one without taking everything down.
Regenerate immediately from Developers → Configuration if a key is ever exposed — in a commit, a log, a screenshot or a support ticket.

Troubleshooting

Check that you are sending both headers. AppId is required alongside Authorization; sending only the key will fail.
You are probably still sending the sandbox key, or your account has not been verified for live access yet. Both the base URL and the key have to change together.
Someone may have regenerated the key from the dashboard. Copy the current value from Developers → Configuration and redeploy.