Runs examples for real against your account. Test keys only; kept in this tab, never stored on our side. Get a key
ZapSMTP / Docs / API keys & SMTP credentials

Create SMTP credentials

POST/v1/smtp-credentials

Create an SMTP credential; the password is returned only once.

Requires a full-access live key; test keys get 403 test_key_restricted.

Password: 40 base62 characters. Credentials are sending-only (always behave like sending_access, live mode) and cannot call the HTTP API.

Body parameters

namestringrequired
Limits: trimmed, 1-100 characters → 422 invalid_parameter "name is required (max 100 chars)"
domain_idstring
Restrict the credential to one of the account's domains. Limits: 422 invalid_parameter "unknown domain_id"

Errors

plan_limit_reachedHTTP 403
the <Plan> plan includes <n> SMTP credentials; upgrade your plan to add more
restricted_api_keyHTTP 403
test_key_restrictedHTTP 403
test-mode keys can send test email and read, not change the account: use a live key
invalid_parameterHTTP 422
POST/v1/smtp-credentials
curl -X POST 'https://zapsmtp.xyz/v1/smtp-credentials' \
  -H "Authorization: Bearer $ZAP_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "wordpress-shop"
}'
Set ZAP_API_KEY in your environment.
Response 201 Created
{
  "id": "019a1f06-4d5e-7f60-8b7c-8d9e0f1a2b3c",
  "name": "WordPress",
  "username": "smtp_k3f9x2m7q1ab",
  "domain_id": null,
  "created_at": "2026-10-21T15:35:00Z",
  "password": "Xa7Lq2Vb9Rk4Tm1Wc8Np3Zs6Hd0Fj5Gy2Ue7Io4K",
  "settings": {
    "host": "zapsmtp.xyz",
    "ports": {
      "465": "TLS",
      "587": "STARTTLS",
      "2525": "STARTTLS"
    },
    "mechanisms": [
      "PLAIN",
      "LOGIN"
    ]
  }
}