JSON Post API
To add a mobile phone number that you do not want to receive SMS to your blocked number list, send it to the server in JSON format using the HTTP POST method. Follow the instructions below.
İstek yapılacak adres
POSThttps://api.iletimerkezi.com/v1/consent/create/jsonRequest Body
{
"request": {
"authentication": {
"key": "",
"hash": ""
},
"consent": {
"brandCode": 696422,
"list": [
{
"recipient": "+90505xxxxxxx veya [email protected]",
"recipientType": "BIREYSEL",
"source": "HS_EORTAM",
"status": "ONAY",
"type": "MESAJ",
"consentDate": "2026-01-07 23:50:00"
}
]
}
}
}
Definitions
The request sent to the server must be wrapped in the request tag. Definitions for its child tags are as follows:
authentication
Contains information about the transaction status. The values returned with this tag can also be obtained by looking at the header information of the HTTP response. This tag is returned as standard in every request made. Its subtags are as follows
key: After logging into your iletimerkezi.com panel, the API Key that you can create from the settings section should be written in this field. It is mandatory to send it when making a request.
hash: After logging into your iletimerkezi.com panel, the hash created using the API Key and Secret Key, which you can create from the settings section, should be written in this field. It is mandatory to send it when making a request.
consent
Tag that contains the consent information to be sent to IYS (the Consent Management System).
-
brandCode: The code of the brand to which the consent information will be transmitted.
-
list: Tag containing consent entries. Multiple consent entries can be sent inside the list tag.
list
- recipient: The phone number or email address for which the consent will be transmitted.
- recipientType: The type of recipient. Can be BIREYSEL or TACIR.
- source: The source where the consent information was obtained (e.g., HS_EORTAM, HS_FIZIKSEL_ORTAM, etc.).
Source Description HS_KARAR The consent status has been set to RET at the service provider's discretion. The service provider cannot use HS_KARAR as the source value when adding the initial consent. HS_FIZIKSEL_ORTAM The consent was obtained in a physical environment by the service provider. HS_ISLAK_IMZA The consent was obtained when the recipient signed a form or survey. HS_ETKINLIK The consent was obtained at an event organized by the service provider. HS_ATM The consent was obtained via an on-site ATM device belonging to the service provider. HS_EORTAM The consent was obtained in an electronic environment belonging to the service provider. HS_WEB The consent was obtained through an action on the service provider's website. HS_MOBIL The consent was obtained via the service provider's mobile application. HS_MESAJ The consent was obtained via the service provider's short message number. HS_EPOSTA The consent was obtained via the service provider's email. HS_CAGRI_MERKEZI The consent was obtained at a call center associated with the service provider, either by voice or keypad input. HS_SOSYAL_MEDYA The consent was obtained through the service provider's social media channel. - status: Consent status. Can be ONAY or RET.
- type: Consent type. Can be MESAJ, EPOSTA, or ARAMA.
- consentDate: The date and time when the consent or rejection occurred. Format: YYYY-MM-DD HH:MM:SS, and it cannot be older than 3 days.
Server Response
{
"response": {
"status": {
"code": 200,
"message": "İşlem başarılı"
}
}
}
Definitions
The server response is always wrapped in the response tag. Definitions for its child tags are as follows:
status
Contains information about the transaction status. The values returned with this tag can also be obtained by looking at the header information of the HTTP response. This tag is returned as standard in every request made. Its subtags are as follows
- code: It is a numeric value indicating the process status.
- message: Contains information message about the process status.
Error Codes
The following table lists the error codes that the API can return.
| Error Code | Message | Description |
|---|---|---|
| 400 | İstek çözümlenemedi | POST ettiğiniz JSON'in yapısındaki hatadan kaynaklanır. Bu hatalar genellikle, yanlış yazılan JSON etiketi, düzgün kapatılmayan XML etiketi veya CDATA kullanılmadan JSON'in yapısını bozabilecek bir karakterin kullanımından kaynaklanır. |
| 401 | Üyelik bilgileri hatalı | POST ettiğiniz JSON'in authentication etiketi içerisinde göndermiş olduğunuz bilgileri doğrulayamadığımızda bu hatayı veriyoruz, eğer hesabınızda sabit IP tanımladıysanız ve farklı bir IP üzerinden istek yapıyorsanız yine bu hatayı alırsınız. |
| 403 | Aktif abonelik bulunamadı. | Eğer hesabınızda aktif bir abonelik yoksa bu hatayı alırsınız. |
| 404 | API istek yapılan yönteme sahip değil | Eğer bu hatayı alıyorsanız istek yaptığınız adresi tekrar kontrol edin yanlış bir adrese istek yapıyor olabilirsiniz. |
| 405 | Bu işlemi yapmak için, abonelik paketinizde yeterli kota bulunmamaktadır. | Abonelik paketinizin limitini aştığınızda bu hata döner. |
| 422 | İstekte gönderilen bazı değerler doğrulanamadı. | Yapmış olduğunuz isteğin içeriğinde doğrulamadan geçemeyen değerler içerdiğini belirtir. İsteğin içeriğini (body) ve gönderilen değerleri tekrar kontrol etmenizi öneririz. |
| 475 | Alıcı sayısı 5000 kişiyi geçemez. | Tek bir istekte en fazla 5000 alıcıya işlem yapabilirsiniz. |