API Reference
Security
See why logins failed and unblock your IPs from your own code. One route, POST /v1/security, with the same command format as the other /v1 routes.
- POST /v1/security
- smtp:read
- smtp:create
Authentication
Lists: list_auth_errors and list_blocked_ips.
Unblock: unblock_ip.
Send the API key as Authorization: Bearer <key>. The body is { "commands": [ { "command", "args", "id" } ] }, like every /v1 route.
Commands
list_auth_errorssmtp:readFailed SMTP, API and MCP logins of the last 30 days, newest first. Identical errors are merged into one row with a count.
- Arguments
cursor,limit(1–200, default 50),source(smtp,api,mcp,api_v1),reason,ip. All optional.- Returns
items(id,at,first_at,count,source,credential,ip,reason,message) andnext_cursor.credentialis the SMTP username orapi_key …ab12: a password or a full key never appears.messageis the exact reply the client received. An invalid cursor starts the list over.
curl -s -X POST https://g.sendcorex.com/v1/security \
-H "Authorization: Bearer $SENDCOREX_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"commands":[{"command":"list_auth_errors","args":{"source":"smtp","limit":50},"id":"1"}]}'{
"type": "SUCCESS",
"results": [{
"command": "list_auth_errors", "id": "1", "type": "SUCCESS",
"data": {
"items": [{
"id": "ae_01JE7Q…",
"at": "2026-12-02T10:14:09Z",
"first_at": "2026-12-02T09:58:41Z",
"count": 7,
"source": "smtp",
"credential": "user-8f2k1",
"ip": "203.0.113.24",
"reason": "wrong_password",
"message": "535 5.7.8 Authentication failed: wrong username or password. https://docs.sendcorex.com/errors#smtp_wrong_password"
}],
"next_cursor": "eyJ0IjoxNzMz…"
}
}]
}list_blocked_ipssmtp:readThe IPs blocked on your account right now, how many self-service unblocks you have left, and the thresholds.
- Arguments
- None.
- Returns
items(ip,reason,until,level,pair_blocked,wrong_password_count,can_unblock),quota(used,max,left,resets_at) andthresholds.reasoniswrong_password,daily_limit,too_many_connectionsorabuse; onlyabusehascan_unblock: false.levelgoes from 1 to 5 (5 min, 10 min, 30 min, 1 h, 6 h). When the block is only for one username on that IP (pair_blocked: true),levelanduntilarenulland it lifts on its own within 1 hour.
curl -s -X POST https://g.sendcorex.com/v1/security \
-H "Authorization: Bearer $SENDCOREX_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"commands":[{"command":"list_blocked_ips","args":{},"id":"1"}]}'{
"type": "SUCCESS",
"results": [{
"command": "list_blocked_ips", "id": "1", "type": "SUCCESS",
"data": {
"items": [{
"ip": "203.0.113.24",
"reason": "wrong_password",
"until": "2026-12-02T10:44:09Z",
"level": 3,
"pair_blocked": false,
"wrong_password_count": 5,
"can_unblock": true
}],
"quota": { "used": 1, "max": 3, "left": 2, "resets_at": "2026-12-28T00:00:00Z" },
"thresholds": {
"wrong_password_per_ip": "…",
"wrong_password_many_ips": "…",
"failed_logins_progressive": "…",
"self_unblocks_per_30_days": 3,
"unblock_takes_effect_within": "10 seconds"
}
}
}]
}unblock_ipsmtp:createUnblocks one of your IPs.
- Arguments
ip(required).- Returns
- The same as
list_blocked_ips, plusmessage.
curl -s -X POST https://g.sendcorex.com/v1/security \
-H "Authorization: Bearer $SENDCOREX_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"commands":[{"command":"unblock_ip","args":{"ip":"203.0.113.24"},"id":"1"}]}'{
"type": "SUCCESS",
"results": [{
"command": "unblock_ip", "id": "1", "type": "ERROR",
"code": "UNBLOCK_QUOTA",
"message": "You already used 3 of 3 unblocks in the last 30 days.",
"fix": "Wait until quota.resets_at, or contact support.",
"docs_url": "https://docs.sendcorex.com/errors#unblock_quota",
"retryable": false
}]
}Unblock rules
Only blocks you caused
Wrong password, daily limit and too many connections can be unblocked here. Abuse blocks need support.
3 unblocks per 30 days
The limit is for the whole account, not per IP.
Works again in ~10 seconds
An unblock takes effect within about 10 seconds.
Fix the cause first
Update the password in every app before unblocking, or the IP gets locked again.
When an IP or credential gets locked
Wrong password, one IP
5 wrong passwords from one IP for one username within 1 hour lock that IP.
Wrong password, many IPs
Wrong passwords from 5 different IPs within 1 hour lock the credential.
Failed logins, one IP
5 failed logins from one IP within 2 minutes block the IP, for longer each time.
Reasons in list_auth_errors
| Reason | What to do |
|---|---|
wrong_passwordWrong password | Copy the password again from SMTP > Credentials, or reset it, and update your email client. |
invalid_username_formatWrong username | Use the SMTP username (user-…), not your email address. |
ip_locked_after_failuresIP locked (5 wrong passwords) | Fix the password, then unblock the IP. |
credential_lockedCredential locked | Wrong passwords came from several IPs. Reset this credential's password. |
credential_temporarily_blockedTemporarily blocked | Too many failed logins. Fix the password and wait a few minutes. |
ip_not_allowedIP not allowed | Add this IP to the credential/key's Allowed IPs, or remove the restriction. |
account_blockedAccount suspended | Contact support. |
api_key_expiredAPI key expired | Create a new API key. |
api_key_missing_scopeMissing permission | Edit the API key and add the permission it needs. |
api_key_invalidInvalid API key | Check the key or create a new one. |
Errors
Each code links to its fix on the Errors page.
Before the command runs (HTTP status)
In the command result
- MISSING_SCOPE
- INVALID_ARGS
list_auth_errors - NOT_BLOCKED
unblock_ip - NOT_SELF_SERVICE
unblock_ip - UNBLOCK_QUOTA
unblock_ip - INTERNAL
In AI apps (MCP)
The account MCP has the same commands as tools, with the same arguments and scopes:
security_list_auth_errors= list_auth_errors
Lists failed SMTP, API and MCP logins of the last 30 days (newest first), with the reason and the exact reply; filter by source, reason or IP.
security_list_blocked_ips= list_blocked_ips
Lists the account's blocked IPs with the reason and until when, plus the self-service unblocks left.
security_unblock_ip= unblock_ip
Unblocks one of the account's IPs blocked for wrong passwords, daily limit or too many connections (3 per 30 days; abuse blocks need support).