Retry Provisioning a email account

POST/api/v1/email-accounts/{account}/retry-provisioning
Requires anorganization API keywith the scopemailboxes:write

Parameters

NameInTypeDescription
accountrequiredpathstringThe account identifier.

Request

POST/api/v1/email-accounts/{account}/retry-provisioning
curl -X POST 'https://app.mailyte.com/api/v1/email-accounts/01JBT8XQ2M9WYC3K4F6R7S8T9V/retry-provisioning' \
  -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
    • objectstringmailbox
    • idstring

      Unique identifier for the mailbox.

    • addressstring

      The full email address. This *is* the mailbox publicly: there is no separate `username`, because the local part is already in here.

    • namestring

      Display name, as it appears to a recipient. null when none was set.

    • domain_idstring

      The domain this mailbox belongs to. Retrieve it with `GET /api/v1/domains/{domain}`.

    • typestringmail | smtp | both

      What the mailbox was created as, and what you can filter the list by. Recorded rather than enforced: nothing in the product currently branches on it, so it does not by itself restrict what the mailbox can do.

    • statestringactive | provisioning | failed | suspended | deleting

      The one lifecycle answer, ordered by what stops you first: `deleting` outranks everything, then `suspended` (a business decision, whatever the mail server thinks), then what provisioning says. Only an `active` mailbox sends and receives.

    • provisioningobject

      What the mail server has done with this mailbox. Creation is asynchronous, so a mailbox exists here before it exists there.

      • statestringpending | provisioning | active | failed | suspended | deleting | deleted

        The mail server's own lifecycle value, as stored. **Never null**, and not nullable: `email_accounts.provisioning_state` is NOT NULL, defaults to `pending`, and creation writes `pending` explicitly before the row is inserted — so a mailbox always carries one. It is read from OUR database, not fetched from the mail server, so unlike `storage.used_bytes` it never goes unknown when that host is unreachable; a mail server we cannot reach leaves this value STALE, not absent. Every value the product writes today is in the set above, but rows that predate the column can still hold a spelling that is not — `provisioned` survives in real data — so branch on the top-level `state`, which normalises whatever is stored into a set that really is closed.

      • errorstring

        Why provisioning failed, in the mail server's words. null unless `state` is `failed`.

      • retryableboolean

        True only while `state` is `failed`, which is the only state `POST /retry-provisioning` accepts.

    • storageobject

      Bytes, both of them. Never a pre-formatted "3 GB", which cannot be computed with.

      • quota_bytesinteger

        Bytes. The ceiling set for this mailbox. **Never null**, and not nullable — read the contrast with `used_bytes` below, because the two figures in this object have very different reliability. The quota is OUR number, held in MySQL in a NOT NULL column, and a mailbox created without an explicit quota is given one (1 GB), so there is always an answer and it never depends on the mail server being reachable. `used_bytes` is the mail server's number and can be unknown. A null here would mean the mailbox has no ceiling, which is not a state this product can be in.

      • used_bytesinteger

        Bytes. **null means we could not read the figure, not that the mailbox is empty** — usage is measured on the mail server and is null whenever the mailbox does not exist there yet, so there has been nothing to measure. Treat null as "unknown" and show it as such: a customer told they have used nothing, when in truth we could not ask, will discover the difference the day they hit the quota. A mailbox that IS provisioned but whose storage has never been synced currently reads 0 rather than null; the column cannot yet express the difference.

    • send_limitsobject

      Per-mailbox sending overrides.

      • dailyinteger

        Messages per day. **null means no override, not unlimited** — the organization's plan limit applies instead. A 0 would mean "may not send".

      • hourlyinteger

        Messages per hour. null means no override, exactly as `daily`.

    • created_atstring
    • updated_atstring

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.