Send Plan (billing)

GET/api/v1/billing/send-plan
Requires anorganization API keywith the scopeaccount:read

Request

GET/api/v1/billing/send-plan
curl -X GET 'https://app.mailyte.com/api/v1/billing/send-plan' \
  -H 'Authorization: Bearer mk_live_YOUR_API_KEY'
The key names its own organization, so no X-Organization-ID header is needed.

Response

Success.

  • dataobject

    The Send plan held, this month's overage, and the spend cap. No payment processor is named: which rail would collect an overage charge is our arrangement, not the customer's data.

    • objectstringsend_plan
    • plan_keystring

      The Send plan you have. Null when you have none.

    • currencystring

      The currency every amount here uses, as an ISO 4217 code such as NGN or USD. Amounts are in its smallest unit. NGN when you have no plan.

    • included_monthlyinteger

      Emails a month the plan includes. 0 when you have no plan.

    • used_this_monthinteger

      Emails sent this calendar month. Null means the mail server could not be reached; try again rather than reading it as 0. overage.emails, overage.amount and spend_cap.reached are then null too.

    • overageobject

      Sending past included_monthly, and what it costs.

      • emailsinteger

        Emails past what your plan includes. Null when used_this_month is null.

      • amountinteger

        What the extra emails cost so far this month, in the smallest unit of currency (kobo for NGN, cents for USD): 150000 NGN is ₦1,500.00. Null when used_this_month is null; it is not a zero bill.

      • rate_per_thousandinteger

        The price per 1,000 emails past what your plan includes, in the smallest unit of currency (kobo for NGN, cents for USD). Null when the plan has no overage price.

    • spend_capobject

      An optional ceiling on overage spend for the month.

      • amountinteger

        Your spending cap, in the smallest unit of currency (kobo for NGN, cents for USD). Null means no cap. 0 is different: it means never charge me for extra emails. To remove the cap, send null, not 0.

      • reachedboolean

        Whether you have reached the cap. Null when there is a cap but this month's sending could not be read. False when there is no cap.

      • ceiling_emailsinteger

        Your cap as a number of emails, which is how the mail server enforces it. Null when there is no cap.

Returned inside the standard envelope.

Errors

StatusWhen
401The API key is missing, unknown, revoked or expired. All four answer identically, on purpose: distinguishing them would confirm which keys exist.
403The key is valid but may not do this: it lacks the required scope, its IP allowlist does not include you, or this endpoint does not accept API keys.
404No such resource in this organization.
422The request was understood but the values were not acceptable.
429Too many requests, or the organization has spent its sending allowance. `Retry-After` says how long to wait.

Every status, with what causes it and what to do, is on the error reference.