Generate Password a email account

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

Parameters

NameInTypeDescription
accountrequiredpathstringThe account identifier.

Request body

  • lengthinteger

    How many characters the generated password has.

  • include_symbolsboolean

    Whether the generated password may contain symbols.

  • must_change_passwordboolean

    Make the person choose their own password at their next sign-in to webmail or the app.

  • send_tostring

    Optional. An address to email the new password to. Not the mailbox itself: its owner cannot sign in to read it.

Request

POST/api/v1/email-accounts/{account}/generate-password
curl -X POST 'https://app.mailyte.com/api/v1/email-accounts/01JBT8XQ2M9WYC3K4F6R7S8T9V/generate-password' \
  -H 'Authorization: Bearer mk_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "length": 16,
    "include_symbols": true
  }'
The key names its own organization, so no X-Organization-ID header is needed.

Response

Success.

  • dataobject
    • objectstringmailbox_password
    • mailbox_idstring

      The mailbox whose password changed. Retrieve it with GET /api/v1/email-accounts/{email_account}.

    • passwordstring

      The new password, from POST /generate-password. **It is shown only once, here**: save it now, because it can never be read again. Null from POST /reset-password, where you chose the password yourself.

    • changed_atstring

      When the password was changed, which is the time of this request.

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.