List hosted opt-in form links
GET /v1/accounts/{AC}/opt-in-links
Required scope: `contacts:read`.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
AC | path · string (AC… SID) | yes | Account SID |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors.
API reference descriptions are provided in English to preserve the exact published contract.
GET /v1/accounts/{AC}/opt-in-links
Required scope: `contacts:read`.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
AC | path · string (AC… SID) | yes | Account SID |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors.
POST /v1/accounts/{AC}/opt-in-links
Mints a link to a form ShipMsg hosts. A person who submits it becomes a contact with an OPTED_IN consent for the purpose, citing this link and its exact wording as evidence. The token is returned once and stored hashed. Required scope: `contacts:write`.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
AC | path · string (AC… SID) | yes | Account SID |
| Name | Type | Required | Description |
|---|---|---|---|
consentText | string (max 1000 chars) | yes | |
defaultCountry | string (pattern ^[A-Za-z]{2}$) | Two-letter country a number typed without + is read against. Defaults to the organization's country. | |
expiresInDays | integer (1–3650) | ||
label | string (max 120 chars) | yes | |
purpose | "MARKETING" | "TRANSACTIONAL" | "SUPPORT" |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors.
POST /v1/accounts/{AC}/opt-in-links/{OL}/revoke
The form stops accepting submissions. The row stays, because the consents it collected cite it. Required scope: `contacts:write`.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
AC | path · string | yes | |
OL | path · string (OL… SID) | yes |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors.
GET /v1/opt-in/{token}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
token | path · string (max 256 chars) | yes |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors.
POST /v1/opt-in/{token}
Creates or finds the contact by phone and records an OPTED_IN consent with source FORM, citing the link and the exact wording that was on the page.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
token | path · string (max 256 chars) | yes |
| Name | Type | Required | Description |
|---|---|---|---|
agreed | boolean | yes | |
name | string (max 200 chars) | ||
phone | string (max 32 chars) | yes |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors.