PaperPony

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

gethttps://api.paperpony.dev/v1/account

Example

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

getAccount response
FieldTypeDescription
idrequiredstring
emailrequiredstringemail
namerequiredstring
planrequired"free" | "starter" | "growth" | "scale"
statusrequired"active" | "past_due" | "suspended"
creditsrequiredobject
included_monthlyrequiredinteger
used_current_periodrequiredinteger
purchased_balancerequiredinteger
remainingrequiredinteger
current_periodrequiredobject
started_atrequiredstringdate-time
ends_atrequiredstringdate-time
created_atrequiredstringdate-time

Responses

StatusCodeMeaning
200The account behind the presented API key.
401unauthorized · invalid_api_keyNo credential, or the credential is malformed, unknown or revoked.
403account_suspendedThe 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.
404not_foundNo route matches the path (not_found), or the resource does not exist on this account (template_not_found, job_not_found).
429rate_limitedToo many requests. Authenticated routes count per account, never per key.
500internal_errorUnexpected 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.