Account
Plan, credit balance and the boundaries of the current period. Read it before a batch to find out how many pages you have left.
Plan, credit balance and period boundaries
get
https://api.paperpony.dev/v1/accountExample
curl https://api.paperpony.dev/v1/account \
-H "Authorization: Bearer $PAPERPONY_API_KEY"import { PaperPony } from 'paperpony';
const pony = new PaperPony({ apiKey: process.env.PAPERPONY_API_KEY });
const account = await pony.account.get();
console.log(account.credits_remaining, account.period_ends_at);import os
import requests
response = requests.get(
"https://api.paperpony.dev/v1/account",
headers={"Authorization": f"Bearer {os.environ['PAPERPONY_API_KEY']}"},
)
response.raise_for_status()
print(response.json())Returns
| Field | Type | Description |
|---|---|---|
idrequired | string | |
emailrequired | string | |
namerequired | string | |
planrequired | "free" | "starter" | "growth" | "scale" | |
statusrequired | "active" | "past_due" | "suspended" | |
creditsrequired | object | |
included_monthlyrequired | integer | |
used_current_periodrequired | integer | |
purchased_balancerequired | integer | |
remainingrequired | integer | |
current_periodrequired | object | |
started_atrequired | string | date-time |
ends_atrequired | string | date-time |
created_atrequired | string | date-time |
Responses
| Status | Code | Meaning |
|---|---|---|
200 | The account behind the presented API key. | |
401 | unauthorized · invalid_api_key | No credential, or the credential is malformed, unknown or revoked. |
403 | account_suspended | The key is valid but the account may not use the API. Nothing sets this automatically: billing is not built, so it can only be set by hand. Write to hello@paperpony.dev if you see it. |
404 | not_found | No route matches the path (not_found), or the resource does not exist on this account (template_not_found, job_not_found). |
429 | rate_limited | Too many requests. Authenticated routes count per account, never per key. |
500 | internal_error | Unexpected failure. Quote request_id when reporting it. |
Every error uses one envelope, and every response carries an
X-Request-Id. Quote it if you report a problem.