SDK reference · Python SDK
prov.account.set_text_consent_settings
prov.account.set_text_consent_settings in Python SDK. mode (provenance or company) and, under company, everyone ({"method":...} for everyone you text, None for each person you name; required the first time).
Signature
prov.account.set_text_consent_settings(**fields: Any = …) -> AnyParameters
**fieldsAny
Request fields
modeenumRequired- How consent is held. One of
provenance,company. everyoneobject | null- Under
company, your statement for everyone you text, or null for each person you name.Show child attributes
methodenumRequired- How people agree. One of
sign_up_form,in_app,in_person,customer_list.
Returns
Any The settings.
HTTP operation
PUT /v1/account/text_consent: Set how consent to text is held
Errors
Example
const data = 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": { "method": "sign_up_form" } }),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.put(f"{api}/v1/account/text_consent", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"mode": "company",
"everyone": {
"method": "sign_up_form"
}
}).json()