--- title: me.setSmsConsent | Doing Work API description: Grant or revoke Doing Work SMS alerts and check-in consent for the signed-in person. Hosted page only; an agent key cannot opt in for someone. url: https://doingwork.work/docs/reference/me-setsmsconsent/ --- # me.setSmsConsent Grant or revoke Doing Work SMS alerts and check-in consent for the signed-in person. Hosted page only; an agent key cannot opt in for someone. | | | |---|---| | Who | Hosted page only (a person does it in the browser) | | REST | `POST /v1/me/sms-consent` | | MCP tool | Not an MCP tool | | Writes | yes, send an Idempotency-Key | | Area | [Shop](https://doingwork.work/docs/reference/#shop) | ## When to use it Grant or revoke Doing Work SMS alerts and check-in consent for the signed-in person. Hosted page only; an agent key cannot opt in for someone. ## What to tell the owner Send the person the link. They finish this step themselves on the page; you never do it for them. ## Input | Field | Type | Required | |---|---|---| | `phone` | string | no | | `consent` | string (one of yes, no) | yes | | `scope` | string (one of all, operational, nudges) | no | | `source` | string (one of web_start, web_invite, web_account, api) | no | ## Example ```http POST https://doingwork.work/v1/me/sms-consent content-type: application/json Idempotency-Key: 3f1c... { "consent": "yes" } ``` ## Output | Field | Type | Always there | |---|---|---| | `consent_id` | string (uuid) | yes | | `person_id` | string (uuid) | yes | | `phone_e164` | string | yes | | `status` | string | yes | | `scope` | string | yes | | `text_version` | string | yes | | `captured_at` | string (date-time) | yes | ```json { "consent_id": "00000000-0000-4000-8000-000000000000", "person_id": "00000000-0000-4000-8000-000000000000", "phone_e164": "...", "status": "...", "scope": "...", "text_version": "...", "captured_at": "..." } ``` ## Errors | Code | Status | What to do | |---|---|---| | `invalid_input`, `invalid_token`, `rate_limited` | | Can happen on any call. See [errors](https://doingwork.work/docs/errors/). |