Установить настройки
Обновляет настройки канала. Передавайте только те поля, которые нужно изменить.
webhookUrl заменяет сохранённый список (строка или массив до 5 URL). Чтобы очистить webhook, передайте пустую строку, null или false. Пустой массив игнорируется.
JWT tokentoken<token>- body
webhookUrl?|array<>HTTP or HTTPS URL for inbound events. A string sets a single URL. An array of up to 5 URLs replaces the stored list. On POST /settings, an empty string, null, or false clears webhooks (an empty array is ignored).
guaranteedHooks?booleanRetry webhook delivery until acknowledged
ackNotificationsOn?booleanInclude message ACK / delivery status events in webhooks
rawHooks?booleanForward raw provider webhook payloads in addition to normalized ones
mm_lite_enabled?booleanMarketing Messages Lite enabled for the channel
template_analytics_enabled?booleanWABA template analytics enabled
cta_url_link_tracking_opted_out?booleanOpt out of CTA URL link tracking on marketing templates
haveDisabledWebhooks?booleantrue when at least one URL in webhookUrl is sticky auto-disabled.
Not "the channel is dead": other configured URLs still receive events.
circuitState?stringCompatibility scalar for one URL (first sticky-disabled, else first
configured). Prefer webhookStatuses[].circuitState.
"ok""degraded""open""half_open""disabled"reason?stringLast qualifying fail reason of the summary URL
fails?integerDiagnostic only (summary URL). Qualifying failures in the rolling
~10 minute breaker window — not lifetime. Prefer webhookStatuses.
trips?integerDiagnostic only (summary URL). Failed recovery probes (≈15 min → 1 h → 6 h). Sticky disable after 3. Not a blind unblock timer.
disabledAt?integerEpoch milliseconds when the summary URL became sticky-disabled
firstFailAt?integerDiagnostic only (summary URL). Epoch ms of the first fail in the
current ~10 minute window (pairs with fails).
lastStatus?integerLast HTTP status from the summary URL, when known
nextProbeAt?integerEpoch milliseconds of the next half-open probe for the summary URL, if any
disabledWebhooks?array<>Currently configured URLs that are sticky auto-disabled (subset of webhookUrl)
webhookStatuses?array<>One entry per currently configured URL. Prefer this over top-level haveDisabledWebhooks / circuitState.
[key: string]?anyПример ответа сервера
application/json- response
webhookUrl?|array<>HTTP or HTTPS URL for inbound events. A string sets a single URL. An array of up to 5 URLs replaces the stored list. On POST /settings, an empty string, null, or false clears webhooks (an empty array is ignored).
guaranteedHooks?booleanRetry webhook delivery until acknowledged
ackNotificationsOn?booleanInclude message ACK / delivery status events in webhooks
rawHooks?booleanForward raw provider webhook payloads in addition to normalized ones
mm_lite_enabled?booleanMarketing Messages Lite enabled for the channel
template_analytics_enabled?booleanWABA template analytics enabled
cta_url_link_tracking_opted_out?booleanOpt out of CTA URL link tracking on marketing templates
haveDisabledWebhooks?booleantrue when at least one URL in webhookUrl is sticky auto-disabled.
Not "the channel is dead": other configured URLs still receive events.
circuitState?stringCompatibility scalar for one URL (first sticky-disabled, else first
configured). Prefer webhookStatuses[].circuitState.
"ok""degraded""open""half_open""disabled"reason?stringLast qualifying fail reason of the summary URL
fails?integerDiagnostic only (summary URL). Qualifying failures in the rolling
~10 minute breaker window — not lifetime. Prefer webhookStatuses.
trips?integerDiagnostic only (summary URL). Failed recovery probes (≈15 min → 1 h → 6 h). Sticky disable after 3. Not a blind unblock timer.
disabledAt?integerEpoch milliseconds when the summary URL became sticky-disabled
firstFailAt?integerDiagnostic only (summary URL). Epoch ms of the first fail in the
current ~10 minute window (pairs with fails).
lastStatus?integerLast HTTP status from the summary URL, when known
nextProbeAt?integerEpoch milliseconds of the next half-open probe for the summary URL, if any
disabledWebhooks?array<>Currently configured URLs that are sticky auto-disabled (subset of webhookUrl)
webhookStatuses?array<>One entry per currently configured URL. Prefer this over top-level haveDisabledWebhooks / circuitState.
update*Объект, в котором перечислены поля, измененные в запросе.
[key: string]?anycurl -X POST 'https://api.1msg.io/123/settings' \ -H 'Content-Type: application/json' \ -d '{ "webhookUrl": "https://example.com/webhook", "ackNotificationsOn": true}'{ "webhookUrl": "https://example.com/webhook", "guaranteedHooks": false, "ackNotificationsOn": true, "rawHooks": false, "mm_lite_enabled": false, "template_analytics_enabled": true, "cta_url_link_tracking_opted_out": false, "haveDisabledWebhooks": true, "circuitState": "ok", "reason": "string", "fails": 0, "trips": 0, "disabledAt": 0, "firstFailAt": 0, "lastStatus": 0, "nextProbeAt": 0, "disabledWebhooks": [ {} ], "webhookStatuses": [ { "url": "http://example.com", "circuitState": "ok", "reason": "string", "fails": 0, "trips": 0, "disabledAt": 0, "firstFailAt": 0, "lastStatus": 0, "nextProbeAt": 0 } ], "update": { "webhookUrl": "https://example.com/webhook", "guaranteedHooks": false, "ackNotificationsOn": true, "rawHooks": false, "mm_lite_enabled": false, "template_analytics_enabled": true, "cta_url_link_tracking_opted_out": false, "haveDisabledWebhooks": true, "circuitState": "ok", "reason": "string", "fails": 0, "trips": 0, "disabledAt": 0, "firstFailAt": 0, "lastStatus": 0, "nextProbeAt": 0, "disabledWebhooks": [ {} ], "webhookStatuses": [ { "url": "http://example.com", "circuitState": "ok", "reason": "string", "fails": 0, "trips": 0, "disabledAt": 0, "firstFailAt": 0, "lastStatus": 0, "nextProbeAt": 0 } ] }}