Add Blacklist API (add-blacklist)
The add-blacklist endpoint adds one phone number to your account's blacklist so it is skipped by send-sms. Idempotent: re-adding the same number returns 200 instead of an error. One number per request.
Prerequisite: enable API access in the panel
Before calling this endpoint, the Allow API access toggle must be on in your iletiMerkezi panel.
Location:
panel.iletimerkezi.com→ Settings → Security → Access PermissionsIf it is off, every request returns
401 — Üyelik bilgileri hatalı("Authentication failed"). See authentication.md.
Endpoint
| Field | Value | |---|---| | Method | POST | | URL | https://api.iletimerkezi.com/v1/add-blacklist/json | | Content-Type | application/json | | Auth | API Key + Hash (request.authentication) |
Request
Schema
request
├─ authentication
│ ├─ key (string, required)
│ └─ hash (string, required)
└─ blacklist
└─ number (string, required) — one number, 905XXXXXXXXX / +905XXXXXXXXX / 5XXXXXXXXXFull example
{
"request": {
"authentication": {
"key": "API_KEY",
"hash": "API_HASH"
},
"blacklist": {
"number": "905XXXXXXXXX"
}
}
}Response
Success (200)
{
"response": {
"status": {
"code": 200,
"message": "İşlem başarılı"
}
}
}İşlem başarılı means "Request successful" in Turkish. The number is now blocked. Re-adding the same number returns the same 200.
Error responses
401 — Üyelik bilgileri hatalı ("Authentication failed")
See authentication.md.
466 — Hatalı numara ("Invalid number")
The number does not match a Turkish carrier prefix (50 / 53 / 54 / 55, etc.). Use a valid Turkish mobile number such as +905330000099. Made-up prefixes like 905999XXXXXXX are rejected.
Other error codes
For 400, 404: see error-codes.md.
Code samples
cURL
curl -X POST 'https://api.iletimerkezi.com/v1/add-blacklist/json' \
-H 'Content-Type: application/json' \
-d '{
"request": {
"authentication": {
"key": "'"$ILETIMERKEZI_API_KEY"'",
"hash": "'"$ILETIMERKEZI_API_HASH"'"
},
"blacklist": { "number": "905XXXXXXXXX" }
}
}'Common pitfalls
- Idempotent. Re-adding the same number is a no-op that returns 200. No need for a
try/except 466-style guard or a pre-check viaget-blacklist. - One number per request.
blacklist.numberis a string, not an array. For bulk adds, loop through and call once per number (mind your rate limits). - 466 = invalid Turkish carrier prefix.
+905330000099works;+905999000000is rejected. International numbers (e.g.+49...) appear in the legacy spec example, but live carrier acceptance varies; test from your own account before production use. - Number format flexible, response uses
+90prefix.905...,+905..., and5...are all accepted on input;get-blacklistreturns them as+905XXXXXXXXX.
Related
Last updated: 2026-04-29 · Türkçe