curl https://pesarc.xyz/api/v1/ping \
-H "Authorization: Bearer sk_live_xxx"
const res = await fetch("https://pesarc.xyz/api/v1/ping", {
headers: { Authorization: `Bearer ${process.env.PESARC_SECRET_KEY}` },
});
const data = await res.json();
{ "ok": true, "account": "acct_9f2c", "live": true }
{
"error": {
"type": "authentication_error",
"message": "Missing API key. Send Authorization: Bearer sk_live_…"
}
}
Endpoints
Ping
Confirm an API key works and see which account it is scoped to.
GET
/
api
/
v1
/
ping
curl https://pesarc.xyz/api/v1/ping \
-H "Authorization: Bearer sk_live_xxx"
const res = await fetch("https://pesarc.xyz/api/v1/ping", {
headers: { Authorization: `Bearer ${process.env.PESARC_SECRET_KEY}` },
});
const data = await res.json();
{ "ok": true, "account": "acct_9f2c", "live": true }
{
"error": {
"type": "authentication_error",
"message": "Missing API key. Send Authorization: Bearer sk_live_…"
}
}
A simple authenticated smoke test. Use it to verify a key during setup and in
health checks.
Request
string
required
Bearer sk_live_…Response
boolean
Always
true on success.string
The account id the key is scoped to.
boolean
Whether the key is a live key.
curl https://pesarc.xyz/api/v1/ping \
-H "Authorization: Bearer sk_live_xxx"
const res = await fetch("https://pesarc.xyz/api/v1/ping", {
headers: { Authorization: `Bearer ${process.env.PESARC_SECRET_KEY}` },
});
const data = await res.json();
{ "ok": true, "account": "acct_9f2c", "live": true }
{
"error": {
"type": "authentication_error",
"message": "Missing API key. Send Authorization: Bearer sk_live_…"
}
}