# prov.account.setTextConsentSettings

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

## Signature

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

## Parameters

- `params` ({ mode: "provenance" | "company"; everyone?: { method: TextConsentMethod } | null })

## Returns

`Promise<TextConsentSettings>`

## HTTP operation

[`PUT /v1/account/text_consent`](https://provenanceauth.com/docs/api/account.md#put-v1-account-text-consent): Set how consent to text is held

## Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`text_consents_unavailable`](https://provenanceauth.com/docs/platform/errors.md#text_consents_unavailable)

## Example

**Node**

```ts
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();
```

**Python**

```python
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()
```
