Usage a smtp credential

GET/api/v1/smtp-credentials/{credential}/usage
Requires anorganization API keywith the scopesmtp:read

Parameters

NameInTypeDescription
credentialrequiredpathstringThe credential identifier.

Request

GET/api/v1/smtp-credentials/{credential}/usage
curl -X GET 'https://app.mailyte.com/api/v1/smtp-credentials/01JBT8XQ2M9WYC3K4F6R7S8T9V/usage' \
  -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
    • objectstringsmtp_credential_usage
    • windowobject

      The period these counts cover, stated in full so you do not have to infer the end from the start.

      • daysinteger

        Length of the window in days.

      • sincestring

        When the counting window starts, in ISO 8601 UTC. Null when counted is false.

      • untilstring

        ISO 8601 UTC. The moment the counts were computed against.

    • countedboolean

      Whether the counts below were measured. False when the key is not set up on the mail server yet; the counts are then null, not 0.

    • totalinteger

      Messages sent with this key. Null means unknown, not 0.

    • deliveredinteger

      Messages accepted by the receiving server. Null means unknown, not 0.

    • bouncedinteger

      Messages permanently refused. Null means unknown, not 0.

    • deferredinteger

      Messages temporarily refused and retried. Null means unknown, not 0.

    • rejectedinteger

      Messages we refused before sending. Null means unknown, not 0.

    • last_used_atstring

      When the key last signed in to send, in ISO 8601 UTC, read live from the mail server. Null means it has never been used.

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.