Skip to content
Pidgely Docs

API reference · Native API (v1)

Retrieve usage

GEThttps://api.pidgely.com/v1/usage
View as Markdown

Returns today's counters (UTC day), the effective daily quota and the account status. During a new account's first week daily_quota is lower than the plan's plan_daily_quota until ramp_until.

Authorization: Bearer pdg_…. An API key with the full scope.

Request

This endpoint is in the Node.js SDK; the other SDKs don't cover it yet, so call it over HTTP from them.

Node.js
import { Pidgely } from 'pidgely';

const pidgely = new Pidgely(process.env.PIDGELY_API_KEY);

const { data, error } = await pidgely.usage.get();
console.log(data ?? error);
cURL
curl -X GET 'https://api.pidgely.com/v1/usage' \
  -H "Authorization: Bearer $PIDGELY_API_KEY"

Response

200 OK

JSON
{
  "today": {
    "accepted": 152,
    "delivered": 149,
    "bounced": 1,
    "complained": 0
  },
  "daily_quota": 500,
  "plan_daily_quota": 50000,
  "ramp_until": "2026-10-21 09:30:00.000000+00",
  "status": "active"
}

Response fields

Name Type Required Description
today object No —
today.accepted integer No —
today.delivered integer No —
today.bounced integer No —
today.complained integer No —
today.test_sender integer No Recipients sent from the test sender (today's usage only; omitted when zero).
daily_quota integer No Today's effective daily limit (the new-account ramp may hold it below plan_daily_quota).
plan_daily_quota integer No —
ramp_until string | null No When the current new-account ramp step ends; null when no ramp applies.
status string No Current status.

Errors

Native routes return {"error": {"code", "message", "field", "request_id"}}. See Errors.

Status Code When
401 missing_api_key No Authorization: Bearer header.
403 invalid_api_key, insufficient_scope The key is invalid or lacks the scope.
404 not_found The resource does not exist in this account.
422 validation_error A field is missing or invalid; field names it.
429 rate_limited, daily_quota_exceeded Too many requests, or the Free plan quota is used up.