View as Markdown

SDK reference · Python SDK

prov.account.list_text_consents

prov.account.list_text_consents in Python SDK. Your consent records, newest first (phone, status, source, limit, cursor).

Signature

prov.account.list_text_consents(**params: Any = …) -> Any

Parameters

**paramsAny

Request fields

phonestringquery
A phone in E.164 form, such as +14155550132.
statusenumquery
Only records with this status. One of active, withdrawn.
sourceenumquery
Only records given this way. One of step, box, keyword, statement, import.
limitintegerquery
Page size (default 20).
cursorstringquery
The next_cursor of the previous page.

Returns

Any A page of consent records.

HTTP operation

GET /v1/account/text_consents: List consents to text

Errors

Example

const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/account/text_consent`, {
  method: "PUT",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "mode": "company", "everyone": null }),
})).json();
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/account/text_consents`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "phone": "+14155550133",
    "method": "in_app",
    "obtained_at": "2026-11-03T10:00:00Z"
  }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/account/text_consents`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.