Перейти к основному содержанию
GET
curl
Messaging Consent API Didit возвращает согласие получателя для каждого канала, по которому у вашего приложения есть запись, а также источник каждой записи и время её последнего изменения. Канал, по которому записи нет, в ответе не указывается. to может быть одного из трёх типов получателя, и у каждого свои каналы: Закодируйте to в пути в процентной кодировке: + в номере становится %2B. Если to не относится ни к одному из трёх типов, ответ будет {"channels": [], "reassigned": false}. Значение reassigned всегда false: в этом релизе смена владельца номера не определяется, и ни одна отправка из-за этого не пропускается. API-ключу с ограниченными правами нужен доступ на чтение сообщений.
Чтобы зафиксировать согласие на получение сообщений или отказ от него, обновите согласие.

Авторизации

x-api-key
string
header
обязательно

Your application's API key, from Developers -> API keys in the Business Console. The primary key has full access. A named key can be scoped: none, read or write per resource, limited to some workflows or to approved sessions, to a list of IP addresses, and to an expiry date. 401 means the key is wrong, revoked or expired; 403 means no key was sent, the key has no access to this resource or action, or the request came from an address outside its IP list; 404 on a session route means the session is outside the key's workflows or statuses. A key without media access receives image, video and PDF URLs as null, and a key without sessions write receives session links and tokens as null. See https://docs.didit.me/console/api-keys.

Параметры пути

to
string
обязательно

The recipient: an E.164 number (+ and up to 15 ASCII digits), an email address, or a WhatsApp business-scoped user id.

Пример:

"+34600000012"

Ответ

The recipient's consent per channel.

channels
object[]
обязательно

The recipient's consent per channel, for the channels you have a record on.

reassigned
boolean
обязательно

Always false: this release does not detect that a number changed owner, and no send is skipped for it.

Последнее изменение 24 ноября 2026 г.