Ana içeriğe geç

Webhook kaydetme ve güncelleme

POST 

/webhooks

İstek: POST https://ext-api.netgsm.com.tr/iys/v1/webhooks
Canlı ortam: https://ext-api.netgsm.com.tr/iys/v1

İYS'ye yüklediğiniz izinlerin işlenme sonuçlarının ve izin değişikliklerinin bildirileceği adresi tanımlar. Marka için daha önce bir adres tanımlandıysa yenisiyle değiştirilir.

Request​

Bodyrequired

    brandCodeintegerrequired

    İYS marka kodu.

    Possible values: >= 1 and <= 2147483647

    Example: 123456
    pathIysPath (string)nullable

    Gönderilmezse SMSAPI kabul edilir.

    Possible values: [SANTRAL, SMSAPI, WEBPORTAL]

    Example: SMSAPI
    webhookUrlurirequired

    Bildirimlerin gönderileceği adres.

    Example: https://example.com/webhook

Responses​

Webhook adresi kaydedildi.

Schema
    successboolean
    Example: true
    errorCodeinteger
    Example: 0
    messagestring
    Example: success
    data object
    uidstring
    Example: ee5c7e61-3940-432a-af30-13b0c9944371

Örnek istek​

curl -X POST 'https://ext-api.netgsm.com.tr/iys/v1/webhooks' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"brandCode": 123456,
"path": "SMSAPI",
"webhookUrl": "https://example.com/webhook"
}'