SDK reference · Node SDK
prov.account
prov.account in the Node SDK: 55 methods. The account methods.
Methods
usage
prov.account.usage(): Promise<AccountUsage>Plan + current-period usage vs.
Calls GET /v1/account/usage.
keys
prov.account.keys(): Promise<AccountKey[]>List the account's API keys (metadata only, never the secret).
Calls GET /v1/account/keys.
rotateKey
prov.account.rotateKey(params?: { keyId?: string }): Promise<RotatedKey>Rotate a key (the calling key by default, or a named keyId).
revokeKey
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
prov.account.setNotifyOn(events: string[]): Promise<{ notifyOn: string[] }>Which events reach your humans (deny/velocity/revocation…).
Calls PUT /v1/account/notify_on.
setNotifyTemplate
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
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
prov.account.captureApp(): Promise<CaptureApp>The app capture links hand off to (linkUrl null = none).
Calls GET /v1/attest/settings/capture_app.
setCaptureApp
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
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
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
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
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
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
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
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
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
prov.account.getTextConsent(id: string): Promise<TextConsent>One consent record.
Calls GET /v1/account/text_consents/{id}.
withdrawTextConsent
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
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
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
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
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
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
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
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
prov.account.captureRetention(): Promise<CaptureRetention>How long captured images are kept (1–365 days, default 30).
Calls GET /v1/attest/settings/capture_retention.
setCaptureRetention
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
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
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
prov.account.branding(): Promise<AccountBranding>Calls GET /v1/account/branding.
setBranding
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
prov.account.emailDomains(): Promise<EmailDomain[]>Your sending domains.
Calls GET /v1/account/email_domains.
addEmailDomain
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
prov.account.verifyEmailDomain(id: string): Promise<EmailDomain>Calls POST /v1/account/email_domains/{id}/verify.
removeEmailDomain
prov.account.removeEmailDomain(id: string): Promise<{ id: string; object: "email_domain"; deleted: true }>Calls DELETE /v1/account/email_domains/{id}.
sendingNumbers
prov.account.sendingNumbers(): Promise<SendingNumberList>Your sending number and released history, with companyTexts and notice.
Calls GET /v1/account/sending_numbers.
saveSendingNumberDetails
prov.account.saveSendingNumberDetails(details: SendingNumberDetails): Promise<SendingNumber>Save your business details, on any plan.
Calls POST /v1/account/sending_numbers.
sendingNumber
prov.account.sendingNumber(id: string): Promise<SendingNumber>One sending number, with its steps and timeline.
Calls GET /v1/account/sending_numbers/{id}.
updateSendingNumberDetails
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
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
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
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
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
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
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
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
prov.account.removeBrandingLogo(): Promise<AccountBranding>Calls DELETE /v1/account/branding/logo.
approvalSettings
prov.account.approvalSettings(): Promise<ApprovalSettings>The default approval expiry (effectiveDefaultExpiresIn falls back to the server's).
Calls GET /v1/mandate/settings/approvals.
setApprovalSettings
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
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
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
prov.account.billing(): Promise<AccountBilling>Billing go-live: plan, active Stripe mode (test|live), subscription status, past_due.
Calls GET /v1/account/billing.
upgradeSession
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
prov.account.billingPortal(): Promise<BillingPortalSession>Billing go-live: a Stripe Customer Portal URL (card, invoices, cancel), owner/admin.
Calls POST /v1/account/billing_portal.