View as Markdown

SDK reference · Node SDK

prov.account.setTextConsentSettings

prov.account.setTextConsentSettings in Node SDK. provenance (Provenance asks) or company (you hold consent).

Signature

prov.account.setTextConsentSettings(params: { mode: "provenance" | "company"; everyone?: { method: TextConsentMethod } | null }): Promise<TextConsentSettings>

Parameters

params{ mode: "provenance" | "company"; everyone?: { method: TextConsentMethod } | null }Required

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

Promise<TextConsentSettings> 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();

Was this page helpful? Send us feedback

LLM? Read llms.txt.