메인 콘텐츠로 건너뛰기
PATCH
curl
Didit의 메시징 동의 업데이트 API는 한 수신자의 한 채널에 대해 수신 동의(opt-in) 또는 수신 거부(opt-out)를 기록합니다. 이후 해당 채널에서 수신 거부 상태인 수신자에게 보내는 발송은 opted_out으로 거부되며 요금이 청구되지 않습니다. 각 발송은 해당 채널의 기록만 조회합니다. to는 +와 ASCII 숫자로 이루어진 E.164 번호, 이메일 주소 또는 WhatsApp 비즈니스 범위 사용자 ID여야 하며, channel은 이에 맞아야 합니다. 수신자 유형은 동의 조회를 참고하십시오. source는 동의 선택이 이루어진 출처를 기록하며, 생략하면 api입니다. 호출은 400과 함께 invalid_status를 반환합니다. status가 opted_in 또는 opted_out이 아닐 때 발생합니다. to가 세 가지 수신자 유형 중 어디에도 해당하지 않거나(person@처럼 형식이 잘못된 이메일 포함) channel이 이에 맞지 않으면 400 응답과 함께 invalid_channel이 반환됩니다. 기록을 저장할 수 없으면 400 응답과 함께 consent_unavailable이 반환되므로 나중에 재시도하십시오. 범위가 지정된 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.

헤더

Idempotency-Key
string

Optional retry-safety key you choose for one operation, up to 255 characters (a UUID works). A request repeated with the same key, endpoint, query and body is answered with the first response, same status and same body, and runs and bills nothing a second time. The same key with another endpoint, query or body returns 409 idempotency_key_reused, and while the first request is still running, 409 idempotency_key_in_progress with Retry-After. A failed request (any 4xx or 5xx) is not stored, so you can send it again with the same key. Keys belong to your application, whether you call with an API key or an access token. See Retries and idempotency.

Required string length: 1 - 255

경로 매개변수

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"

본문

application/json
channel
enum<string>
필수

The channel the choice applies to.

사용 가능한 옵션:
sms,
whatsapp,
telegram,
rcs,
viber,
voice,
email
status
enum<string>
필수

opted_out refuses sends on this channel; opted_in allows them again.

사용 가능한 옵션:
opted_in,
opted_out
source
enum<string>
기본값:api

Where the choice came from, returned as you send it; api when left out. reassigned is only a label you can record: Didit does not detect a change of owner.

사용 가능한 옵션:
stop_reply,
start_reply,
bot_left,
api,
console,
reassigned

응답

The recipient's consent per channel, with this choice recorded.

channels
object[]
필수

The recipient's consent per channel, as the retrieve call returns it.

마지막 수정일 2026년 11월 24일