# prov.account

prov.account in the Node SDK: 55 methods. The account methods.

## Methods

### [usage](https://provenanceauth.com/docs/sdks/node/account/usage.md)

```ts
prov.account.usage(): Promise<AccountUsage>
```

Plan + current-period usage vs.

Calls `GET /v1/account/usage`.

### [keys](https://provenanceauth.com/docs/sdks/node/account/keys.md)

```ts
prov.account.keys(): Promise<AccountKey[]>
```

List the account's API keys (metadata only, never the secret).

Calls `GET /v1/account/keys`.

### [rotateKey](https://provenanceauth.com/docs/sdks/node/account/rotate-key.md)

```ts
prov.account.rotateKey(params?: { keyId?: string }): Promise<RotatedKey>
```

Rotate a key (the calling key by default, or a named `keyId`).

### [revokeKey](https://provenanceauth.com/docs/sdks/node/account/revoke-key.md)

```ts
prov.account.revokeKey(keyId: string, params?: { reason?: string }): Promise<RevokedKey>
```

Revoke a key with no replacement (a leaked or unused key).

Calls `POST /v1/account/keys/{id}/revoke`.

### [setNotifyOn](https://provenanceauth.com/docs/sdks/node/account/set-notify-on.md)

```ts
prov.account.setNotifyOn(events: string[]): Promise<{ notifyOn: string[] }>
```

Which events reach your humans (`deny`/`velocity`/`revocation`…).

Calls `PUT /v1/account/notify_on`.

### [setNotifyTemplate](https://provenanceauth.com/docs/sdks/node/account/set-notify-template.md)

```ts
prov.account.setNotifyTemplate(template: string | null): Promise<NotifyTemplates>
```

Set (or clear with `null`) the per-account SMS template.

Calls `PUT /v1/account/notify_template`.

### [setThirdPartyTemplates](https://provenanceauth.com/docs/sdks/node/account/set-third-party-templates.md)

```ts
prov.account.setThirdPartyTemplates(params: { approverSmsTemplate?: string | null; inviteSmsTemplate?: string | null; approverEmailSubject?: string | null; approverEmailBody?: string | null; inviteEmailSubject?: string | null; inviteEmailBody?: string | null; }): Promise<NotifyTemplates>
```

Set (or reset with `null`) the wording of texts to people outside your account.

Calls `PUT /v1/account/notify_template`.

### [captureApp](https://provenanceauth.com/docs/sdks/node/account/capture-app.md)

```ts
prov.account.captureApp(): Promise<CaptureApp>
```

The app capture links hand off to (`linkUrl` null = none).

Calls `GET /v1/attest/settings/capture_app`.

### [setCaptureApp](https://provenanceauth.com/docs/sdks/node/account/set-capture-app.md)

```ts
prov.account.setCaptureApp(params: { linkUrl: string | null; name?: string | null; iosAppId?: string | null; androidPackage?: string | null; storeUrls?: { ios?: string; android?: string } | null; }): Promise<CaptureApp>
```

Set (or clear with `linkUrl: null`) the app for capture links.

Calls `PUT /v1/attest/settings/capture_app`.

### [reminderSettings](https://provenanceauth.com/docs/sdks/node/account/reminder-settings.md)

```ts
prov.account.reminderSettings(): Promise<ReminderSettings>
```

The limits every reminder runs under, your time zone for quiet hours, and the automatic schedule per product.

Calls `GET /v1/account/reminders`.

### [setReminderSettings](https://provenanceauth.com/docs/sdks/node/account/set-reminder-settings.md)

```ts
prov.account.setReminderSettings(params: { /** #140: the delivery default for new requests: `send`, or `self` (link only). */ delivery?: "send" | "self"; /** #140: which messages a new request may send by default. */ channels?: Array<"app_notification" | "email" | "text">; /** #140 slice 3: the follow-up text default (Pro and above on live; every plan in the sandbox). */ followUpText?: { enabled?: boolean; when?: "not_opened" | "not_finished"; afterMinutes?: number }; defaultTimeZone?: string | null; maxPerRequest?: number; minGapSeconds?: number; quietHours?: { start: number; end: number }; schedules?: Partial<Record<"captureRequest" | "approval" | "checkoutApproval", { enabled?: boolean; after?: string[] }>>; }): Promise<ReminderSettings>
```

Any of your time zone (IANA, or null to clear), a lower cap, a longer gap, wider quiet hours, and the automatic schedule per product (turning one on needs Pro or higher: 402 `plan_required` below).

Calls `PUT /v1/account/reminders`.

### [approvalChannels](https://provenanceauth.com/docs/sdks/node/account/approval-channels.md)

```ts
prov.account.approvalChannels(): Promise<ApprovalChannels>
```

The account default: how approvals reach every console person who hasn't chosen their own.

Calls `GET /v1/account/approval_channels`.

### [setApprovalChannels](https://provenanceauth.com/docs/sdks/node/account/set-approval-channels.md)

```ts
prov.account.setApprovalChannels(params: { mode?: ApprovalChannelMode; channels: ApprovalChannelName[] }): Promise<ApprovalChannels>
```

Set the account default (owners and admins; replaces `PUT /v1/account/notify_channels`).

Calls `PUT /v1/account/approval_channels`.

### [textConsentSettings](https://provenanceauth.com/docs/sdks/node/account/text-consent-settings.md)

```ts
prov.account.textConsentSettings(): Promise<TextConsentSettings>
```

How consent to your texts is held, your statement for everyone, the counts and the wording in force.

Calls `GET /v1/account/text_consent`.

### [setTextConsentSettings](https://provenanceauth.com/docs/sdks/node/account/set-text-consent-settings.md)

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

`provenance` (Provenance asks) or `company` (you hold consent).

Calls `PUT /v1/account/text_consent`.

### [listTextConsents](https://provenanceauth.com/docs/sdks/node/account/list-text-consents.md)

```ts
prov.account.listTextConsents(params?: { phone?: string; status?: "active" | "withdrawn"; source?: TextConsent["source"]; limit?: number; cursor?: string }): Promise<ListResponse<TextConsent>>
```

Your consent records, newest first; `phone` looks one phone up by its full number.

Calls `GET /v1/account/text_consents`.

### [createTextConsent](https://provenanceauth.com/docs/sdks/node/account/create-text-consent.md)

```ts
prov.account.createTextConsent(params: TextConsentStatement & { phone: string }): Promise<TextConsent>
```

Record that a phone agreed to your texts (mode `company`, Pro and up).

Calls `POST /v1/account/text_consents`.

### [getTextConsent](https://provenanceauth.com/docs/sdks/node/account/get-text-consent.md)

```ts
prov.account.getTextConsent(id: string): Promise<TextConsent>
```

One consent record.

Calls `GET /v1/account/text_consents/{id}`.

### [withdrawTextConsent](https://provenanceauth.com/docs/sdks/node/account/withdraw-text-consent.md)

```ts
prov.account.withdrawTextConsent(id: string): Promise<TextConsent>
```

Record a withdrawal you received another way; the phone is stopped for your texts.

Calls `POST /v1/account/text_consents/{id}/withdraw`.

### [importTextConsents](https://provenanceauth.com/docs/sdks/node/account/import-text-consents.md)

```ts
prov.account.importTextConsents(file: string | Uint8Array | Blob, opts?: { fileName?: string }): Promise<TextConsentImport>
```

Slice 2: import a CSV of phones that agreed to your texts (mode `company`, Pro and up): the columns `phone`, `method`, `obtained_at` and, optionally, `evidence_url`; up to 50,000 rows and 5 MB.

Calls `POST /v1/account/text_consent_imports`.

### [getTextConsentImport](https://provenanceauth.com/docs/sdks/node/account/get-text-consent-import.md)

```ts
prov.account.getTextConsentImport(id: string): Promise<TextConsentImport>
```

Slice 2: one import, its status and counts and the first 1,000 rows not added.

Calls `GET /v1/account/text_consent_imports/{id}`.

### [listTextConsentScreenshots](https://provenanceauth.com/docs/sdks/node/account/list-text-consent-screenshots.md)

```ts
prov.account.listTextConsentScreenshots(): Promise<{ object: "list"; data: TextConsentScreenshot[]; hasMore: boolean }>
```

Slice 6: your screenshots of how people agree to your texts (records only), oldest first.

Calls `GET /v1/account/text_consent/screenshots`.

### [addTextConsentScreenshot](https://provenanceauth.com/docs/sdks/node/account/add-text-consent-screenshot.md)

```ts
prov.account.addTextConsentScreenshot(image: Uint8Array | Blob, contentType: "image/png" | "image/jpeg"): Promise<TextConsentScreenshot>
```

Slice 6: under We have it, a screenshot (PNG or JPEG, up to 5 MB) of how people agree to your texts; up to five.

Calls `POST /v1/account/text_consent/screenshots`.

### [deleteTextConsentScreenshot](https://provenanceauth.com/docs/sdks/node/account/delete-text-consent-screenshot.md)

```ts
prov.account.deleteTextConsentScreenshot(id: string): Promise<{ id: string; object: "text_consent_screenshot"; deleted: true }>
```

Slice 6: delete a screenshot; a review it was already sent to stops showing it.

Calls `DELETE /v1/account/text_consent/screenshots/{id}`.

### [captureRouting](https://provenanceauth.com/docs/sdks/node/account/capture-routing.md)

```ts
prov.account.captureRouting(): Promise<CaptureRoutingSettings>
```

Where capture links open: the account default, each destination's availability, the order people get.

Calls `GET /v1/attest/settings/capture_routing`.

### [setCaptureRouting](https://provenanceauth.com/docs/sdks/node/account/set-capture-routing.md)

```ts
prov.account.setCaptureRouting(params: { order?: Array<"company_app" | "provenance_app" | "app_clip" | "store_listing" | "web">; storeListing?: { ios?: "provenance" | "company"; android?: "provenance" | "company" }; requireTier?: "any" | "hardware"; }): Promise<CaptureRoutingSettings>
```

`order` and `storeListing` (Growth and up; 402 `plan_required` below) and `requireTier` (any plan).

Calls `PUT /v1/attest/settings/capture_routing`.

### [captureRetention](https://provenanceauth.com/docs/sdks/node/account/capture-retention.md)

```ts
prov.account.captureRetention(): Promise<CaptureRetention>
```

How long captured images are kept (1–365 days, default 30).

Calls `GET /v1/attest/settings/capture_retention`.

### [setCaptureRetention](https://provenanceauth.com/docs/sdks/node/account/set-capture-retention.md)

```ts
prov.account.setCaptureRetention(params: { days: number }): Promise<CaptureRetention>
```

Set how long captured images are kept; applies to the images already held too.

Calls `PUT /v1/attest/settings/capture_retention`.

### [captureListLabel](https://provenanceauth.com/docs/sdks/node/account/capture-list-label.md)

```ts
prov.account.captureListLabel(): Promise<CaptureListLabel>
```

D-119: the workspace's word for the Captures list ("Captures" unless changed).

Calls `GET /v1/attest/settings/capture_list`.

### [setCaptureListLabel](https://provenanceauth.com/docs/sdks/node/account/set-capture-list-label.md)

```ts
prov.account.setCaptureListLabel(params: { label: string | null }): Promise<CaptureListLabel>
```

D-119: name the Captures list in the console (up to 24 characters); `null` puts back "Captures".

Calls `PUT /v1/attest/settings/capture_list`.

### [branding](https://provenanceauth.com/docs/sdks/node/account/branding.md)

```ts
prov.account.branding(): Promise<AccountBranding>
```

Calls `GET /v1/account/branding`.

### [setBranding](https://provenanceauth.com/docs/sdks/node/account/set-branding.md)

```ts
prov.account.setBranding(params: { name?: string | null; primary?: string | null; secondary?: string | null; accent?: string | null; helpUrl?: string | null; emailFrom?: string | null; emailFromName?: string | null; emailReplyTo?: string | null; }): Promise<AccountBranding>
```

Set branding fields (only those passed change; `null` clears one).

Calls `PUT /v1/account/branding`.

### [emailDomains](https://provenanceauth.com/docs/sdks/node/account/email-domains.md)

```ts
prov.account.emailDomains(): Promise<EmailDomain[]>
```

Your sending domains.

Calls `GET /v1/account/email_domains`.

### [addEmailDomain](https://provenanceauth.com/docs/sdks/node/account/add-email-domain.md)

```ts
prov.account.addEmailDomain(domain: string): Promise<EmailDomain>
```

Add a sending domain; publish the returned DNS records, then `verifyEmailDomain`.

Calls `POST /v1/account/email_domains`.

### [verifyEmailDomain](https://provenanceauth.com/docs/sdks/node/account/verify-email-domain.md)

```ts
prov.account.verifyEmailDomain(id: string): Promise<EmailDomain>
```

Calls `POST /v1/account/email_domains/{id}/verify`.

### [removeEmailDomain](https://provenanceauth.com/docs/sdks/node/account/remove-email-domain.md)

```ts
prov.account.removeEmailDomain(id: string): Promise<{ id: string; object: "email_domain"; deleted: true }>
```

Calls `DELETE /v1/account/email_domains/{id}`.

### [sendingNumbers](https://provenanceauth.com/docs/sdks/node/account/sending-numbers.md)

```ts
prov.account.sendingNumbers(): Promise<SendingNumberList>
```

Your sending number and released history, with `companyTexts` and `notice`.

Calls `GET /v1/account/sending_numbers`.

### [saveSendingNumberDetails](https://provenanceauth.com/docs/sdks/node/account/save-sending-number-details.md)

```ts
prov.account.saveSendingNumberDetails(details: SendingNumberDetails): Promise<SendingNumber>
```

Save your business details, on any plan.

Calls `POST /v1/account/sending_numbers`.

### [sendingNumber](https://provenanceauth.com/docs/sdks/node/account/sending-number.md)

```ts
prov.account.sendingNumber(id: string): Promise<SendingNumber>
```

One sending number, with its steps and timeline.

Calls `GET /v1/account/sending_numbers/{id}`.

### [updateSendingNumberDetails](https://provenanceauth.com/docs/sdks/node/account/update-sending-number-details.md)

```ts
prov.account.updateSendingNumberDetails(id: string, changes: Partial<SendingNumberDetails>): Promise<SendingNumber>
```

Edit saved details (only before the request starts).

Calls `PATCH /v1/account/sending_numbers/{id}`.

### [resubmitSendingNumber](https://provenanceauth.com/docs/sdks/node/account/resubmit-sending-number.md)

```ts
prov.account.resubmitSendingNumber(id: string, corrections: Partial<Omit<SendingNumberDetails, "consent">> & { consent?: { method?: SendingNumberConsentMethod; evidenceUrl?: string | null } }): Promise<SendingNumber>
```

Send the corrected details of a number that needs a fix.

Calls `POST /v1/account/sending_numbers/{id}/resubmit`.

### [addSendingNumberConsentEvidence](https://provenanceauth.com/docs/sdks/node/account/add-sending-number-consent-evidence.md)

```ts
prov.account.addSendingNumberConsentEvidence(id: string, image: Uint8Array | Blob, contentType: "image/png" | "image/jpeg"): Promise<{ object: "consent_evidence"; evidenceUrl: string }>
```

An image (PNG or JPEG, up to 5 MB) of how people agree, for a number that needs a fix.

Calls `POST /v1/account/sending_numbers/{id}/consent_evidence`.

### [deleteSendingNumber](https://provenanceauth.com/docs/sdks/node/account/delete-sending-number.md)

```ts
prov.account.deleteSendingNumber(id: string): Promise<SendingNumber>
```

Delete saved details, release a number (its details kept), or delete a released number's kept details.

Calls `DELETE /v1/account/sending_numbers/{id}`.

### [testTexts](https://provenanceauth.com/docs/sdks/node/account/test-texts.md)

```ts
prov.account.testTexts(params?: { requestId?: string; limit?: number; cursor?: string }): Promise<TestTextList>
```

Slice 3: the texts the test provider recorded in the sandbox, newest first; `requestId` narrows to one request.

Calls `GET /v1/account/test_texts`.

### [testText](https://provenanceauth.com/docs/sdks/node/account/test-text.md)

```ts
prov.account.testText(id: string): Promise<TestText>
```

Slice 3: one recorded test text, with its body as it would have been sent.

Calls `GET /v1/account/test_texts/{id}`.

### [clearTestTextStops](https://provenanceauth.com/docs/sdks/node/account/clear-test-text-stops.md)

```ts
prov.account.clearTestTextStops(): Promise<{ object: "test_text_stops"; lifted: number }>
```

Slice 3: lift the stops the test number +12025550103 wrote (stands in for the person's START).

Calls `DELETE /v1/account/test_texts/stops`.

### [setBrandingLogo](https://provenanceauth.com/docs/sdks/node/account/set-branding-logo.md)

```ts
prov.account.setBrandingLogo(dataBase64: string): Promise<AccountBranding>
```

Upload a PNG, JPEG or WebP logo (≤ 200 KB, ≤ 1024 px), as base64.

Calls `PUT /v1/account/branding/logo`.

### [removeBrandingLogo](https://provenanceauth.com/docs/sdks/node/account/remove-branding-logo.md)

```ts
prov.account.removeBrandingLogo(): Promise<AccountBranding>
```

Calls `DELETE /v1/account/branding/logo`.

### [approvalSettings](https://provenanceauth.com/docs/sdks/node/account/approval-settings.md)

```ts
prov.account.approvalSettings(): Promise<ApprovalSettings>
```

The default approval expiry (`effectiveDefaultExpiresIn` falls back to the server's).

Calls `GET /v1/mandate/settings/approvals`.

### [setApprovalSettings](https://provenanceauth.com/docs/sdks/node/account/set-approval-settings.md)

```ts
prov.account.setApprovalSettings(params: { defaultExpiresIn: number | null }): Promise<ApprovalSettings>
```

Set the default approval expiry in seconds (60 to 7 days), or `null` for the server default.

Calls `PUT /v1/mandate/settings/approvals`.

### [traceExplanations](https://provenanceauth.com/docs/sdks/node/account/trace-explanations.md)

```ts
prov.account.traceExplanations(): Promise<{ object: "trace_explanations_setting"; aiSummary: "off" | "on"; aiLabeling: "off" | "on"; explainerConfigured: boolean }>
```

The opt-in AI trip summary and AI labelling settings (default off) + whether an AI provider is configured.

Calls `GET /v1/trace/settings/explanations`.

### [setTraceExplanations](https://provenanceauth.com/docs/sdks/node/account/set-trace-explanations.md)

```ts
prov.account.setTraceExplanations(setting: { aiSummary?: "off" | "on"; aiLabeling?: "off" | "on"; }): Promise<{ object: "trace_explanations_setting"; aiSummary: "off" | "on"; aiLabeling: "off" | "on"; explainerConfigured: boolean }>
```

Turn the AI summary or AI labelling on or off (an owner/admin session, or an admin-scope key).

Calls `PUT /v1/trace/settings/explanations`.

### [billing](https://provenanceauth.com/docs/sdks/node/account/billing.md)

```ts
prov.account.billing(): Promise<AccountBilling>
```

Billing go-live: plan, active Stripe mode (test|live), subscription status, past_due.

Calls `GET /v1/account/billing`.

### [upgradeSession](https://provenanceauth.com/docs/sdks/node/account/upgrade-session.md)

```ts
prov.account.upgradeSession(): Promise<CheckoutSession>
```

Billing go-live: a Stripe Checkout URL to upgrade this account to Growth (owner/admin).

Calls `POST /v1/account/upgrade_session`.

### [billingPortal](https://provenanceauth.com/docs/sdks/node/account/billing-portal.md)

```ts
prov.account.billingPortal(): Promise<BillingPortalSession>
```

Billing go-live: a Stripe Customer Portal URL (card, invoices, cancel), owner/admin.

Calls `POST /v1/account/billing_portal`.
