Skip to content

ResourcesSMTP credentials

SMTP credentials

An SMTP credential lets a tool that only speaks SMTP, such as Supabase Auth or a framework mailer, send as one of your transactional senders. Each credential sends as one sender's address and nothing else.

Last updated

How sending works

  • Sign in at mx1.shipmail.to on port 465 (TLS) or 587 (STARTTLS) with the credential's username and password.
  • The envelope MAIL FROM and the From header must both be the sender's address. Recipients come from the SMTP envelope.
  • Each message goes through the same checks, limits, suppression list, storage and counting as POST /v1/messages from that sender, and counts as transactional email.
  • The sender's display name and Reply-To are always its own. A message with a different Reply-To is refused.
  • A sender has at most 5 credentials. Creating the first one turns SMTP on for that sender.
  • The API key acts for an Owner or Admin who can read the sender's mailbox; anyone else gets 403. A credential acts for the person who created it. Once they leave the organization or lose access to the sender's mailbox, its messages are refused, and a new credential is needed.

The SMTP credential object

{
  "object": "smtp_credential",
  "id": "smtpc_0123456789abcdefghjkmnpq",
  "from": "notifications@notify.example.com",
  "name": "Supabase Auth",
  "username": "smtp-smtpc_0123456789abcdefghjkmnpq@txsmtp.shipmail.to",
  "host": "mx1.shipmail.to",
  "ports": [
    { "port": 465, "security": "tls" },
    { "port": 587, "security": "starttls" }
  ],
  "last_used_at": null,
  "created_at": "2026-11-03T10:00:00.000Z"
}
FieldTypeDescription
idstringStarts with smtpc_.
fromstringThe transactional sender's address. The credential sends only as this address.
namestringYour label, 1 to 64 characters.
usernamestringThe SMTP username to sign in with.
hoststringThe SMTP server, mx1.shipmail.to.
portsarray465 with implicit TLS (tls) and 587 with STARTTLS (starttls).
last_used_atstring or nullWhen the credential last signed in. Null until its first use.
created_atstringISO 8601 timestamp.

List SMTP credentials

GET/v1/smtp-credentialsscope mailbox_credentials:readtier read

Returns { "object": "list", "data": [...] } with the active credentials, newest first, without pagination. Pass from=notifications@notify.example.com to list one sender's credentials. A key limited to some mailboxes sees only the credentials of senders on those mailboxes. Passwords are never returned.

Create an SMTP credential

POST/v1/smtp-credentialsscope mailbox_credentials:writetier write
{
  "from": "notifications@notify.example.com",
  "name": "Supabase Auth"
}

Returns 201 with the credential and a password field. Save the password now: Shipmail keeps no copy and never shows it again. For the same reason the request refuses an Idempotency-Key header.

Revoke an SMTP credential

DELETE/v1/smtp-credentials/:idscope mailbox_credentials:writetier write

Returns 204. Clients that use the credential can no longer sign in or send. Returns 404 when the credential does not exist, is already revoked, or belongs to a mailbox the key cannot reach.

Errors

StatusCodeWhen
404transactional_sender_not_foundfrom is not a transactional sender of your organization, or the API key cannot reach its mailbox. Listing with from and creating both return it.
409conflictThe transactional sender is turned off.
429rate_limit_errorThe sender already has 5 credentials. Revoke one first.
422validation_errorfrom is not an email address, or name is empty or longer than 64 characters.