# SmsConsentDto

A model the API reference uses in a request or a response. The operation pages link every field typed as this model here.

Read-only DTO for a merchant-scoped SMS consent / opt-out record, including its audit history.

## Fields
- `id` (string(uuid))
- `phoneNumber` (string): Canonical E.164 phone number this record governs. (nullable)
- `tenantId` (string(uuid)): Tenant the record belongs to. (nullable)
- `merchantId` (string(uuid)): Merchant the record is scoped to. (nullable)
- `status` ([SmsConsentStatus](https://devportal.demo.winkpg.io/docs/api/models/SmsConsentStatus.md)): Current consent state.
  Values:
  - `OptedIn`: The recipient has expressly consented to receive SMS from this merchant. Sends are allowed.
  - `OptedOut`: The recipient has revoked consent (STOP keyword, carrier unsubscribe, or an operator action). The send-time gate blocks every SMS to this number for this merchant until a re-opt-in is recorded.
- `captureMethod` ([SmsConsentCaptureMethod](https://devportal.demo.winkpg.io/docs/api/models/SmsConsentCaptureMethod.md)): How the most recent transition's evidence was captured.
  Values:
  - `Unknown`: Capture method was not supplied. Treated as the least-authoritative evidence.
  - `WebForm`: Recipient opted in through a public web form (e.g. a hosted checkout consent checkbox).
  - `VirtualTerminal`: An operator captured consent while taking the payment in the Virtual Terminal.
  - `HostedPaymentPage`: Consent was captured on a Hosted Payment Page flow.
  - `Import`: The record was created from a bulk import of prior consent evidence.
  - `ApiRequest`: Consent or opt-out was recorded through the API by an integrating system.
  - `AdminEntry`: An administrator recorded the consent or opt-out manually.
  - `CarrierBackfill`: Opt-out was back-filled from a carrier send-time signal (Twilio error 21610 on send). The platform learned of the revocation from the carrier rather than capturing it directly. Inbound STOP / START replies use InboundKeyword instead, which keeps a more precise evidence trail.
  - `InboundKeyword`: Consent transition was captured from an inbound SMS keyword the recipient texted to the platform number (STOP / UNSUBSCRIBE / START / etc.), received on the Twilio inbound webhook. The inbound message SID is retained as the evidence reference.
- `statusChangedAt` (string(date-time)): When the current status was last set (UTC).
- `evidenceText` (string): Proof-of-consent evidence for the current status. (nullable)
- `evidenceReference` (string): Stable reference for the current status's source. (nullable)
- `history` (array<[SmsConsentHistoryEntryDto](https://devportal.demo.winkpg.io/docs/api/models/SmsConsentHistoryEntryDto.md)>): Append-only audit trail of every status transition, oldest first. (nullable)
  Fields of each item:
  - `status` ([SmsConsentStatus](https://devportal.demo.winkpg.io/docs/api/models/SmsConsentStatus.md)): The status this transition moved the record to.
    Values:
    - `OptedIn`: The recipient has expressly consented to receive SMS from this merchant. Sends are allowed.
    - `OptedOut`: The recipient has revoked consent (STOP keyword, carrier unsubscribe, or an operator action). The send-time gate blocks every SMS to this number for this merchant until a re-opt-in is recorded.
  - `captureMethod` ([SmsConsentCaptureMethod](https://devportal.demo.winkpg.io/docs/api/models/SmsConsentCaptureMethod.md)): How this transition's evidence was captured.
    Values:
    - `Unknown`: Capture method was not supplied. Treated as the least-authoritative evidence.
    - `WebForm`: Recipient opted in through a public web form (e.g. a hosted checkout consent checkbox).
    - `VirtualTerminal`: An operator captured consent while taking the payment in the Virtual Terminal.
    - `HostedPaymentPage`: Consent was captured on a Hosted Payment Page flow.
    - `Import`: The record was created from a bulk import of prior consent evidence.
    - `ApiRequest`: Consent or opt-out was recorded through the API by an integrating system.
    - `AdminEntry`: An administrator recorded the consent or opt-out manually.
    - `CarrierBackfill`: Opt-out was back-filled from a carrier send-time signal (Twilio error 21610 on send). The platform learned of the revocation from the carrier rather than capturing it directly. Inbound STOP / START replies use InboundKeyword instead, which keeps a more precise evidence trail.
    - `InboundKeyword`: Consent transition was captured from an inbound SMS keyword the recipient texted to the platform number (STOP / UNSUBSCRIBE / START / etc.), received on the Twilio inbound webhook. The inbound message SID is retained as the evidence reference.
  - `occurredAt` (string(date-time)): When the transition occurred (UTC).
  - `evidenceText` (string): Proof-of-consent evidence for this transition. (nullable)
  - `evidenceReference` (string): Stable reference tying this transition to its source. (nullable)

## See also

- [All documentation](https://devportal.demo.winkpg.io/llms.txt): the machine-readable index of every public page on this site.
