Get started
Authentication
Every call carries an API key in a header.
Every endpoint except the OpenAPI spec needs a key. Send it one of two ways:
curl -H "Authorization: Bearer pd_YOUR_KEY" https://payday.direct/api/v1/stats
curl -H "X-API-Key: pd_YOUR_KEY" https://payday.direct/api/v1/statsKeeping a key safe
- Call the API from your server or bot. Anything a browser loads, its user can read.
- Payday keeps only a SHA-256 fingerprint of each key, so nobody at Payday can read it back. It is shown to you once.
- Revoke a key the moment it may have leaked, from API keys, or from anywhere by sending the key itself:
curl -X DELETE -H "Authorization: Bearer pd_YOUR_KEY" https://payday.direct/api/v1/keys/selfA revoked key stops working everywhere within 15 seconds.
How a key is approved
Every key belongs to an X account and is approved by Payday before it works.
- Sign in with X on API keys.
- Name the key and say what it is for. Ask for launching only if you will launch coins.
- Copy the key. It is shown once and answers
403 key_pendinguntil it is approved. - Payday reads the request and approves it to read data, or to read and launch coins, or declines it.
| Read key | Launch key | |
|---|---|---|
| Sign-in | Signed in with X | Signed in with X |
| Approval | Payday approves each key | Payday approves each key, and grants launching |
| Reads data | Yes | Yes |
| Launches coins | No | Yes |
| How many | 5 active, 10 requests a day per account | 5 active, 10 requests a day per account |
| Allowance | 600 a minute each | 600 a minute each |
Launching is granted when a key is approved and cannot be added later. Request a new key instead.