View as Markdown

SDK reference · Node SDK

prov.account.saveSendingNumberDetails

prov.account.saveSendingNumberDetails in Node SDK. Save your business details, on any plan.

Signature

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

Parameters

detailsSendingNumberDetailsRequired

Request fields

legal_namestringRequired
The legal name. It must match the tax id.
business_typeenumRequired
The business type. One of private_company, public_company, non_profit, sole_proprietor, government.
tax_idstring | null
The tax id (an EIN like 12-3456789, or a nine-digit Canadian business number). Required for every type but sole_proprietor. Write-only: kept sealed and never returned.
addressobjectRequired
The business address.
Show child attributes
line1stringRequired
The street address.
line2string | null
A second address line.
citystringRequired
The city.
regionstringRequired
The state or province.
postal_codestringRequired
The ZIP or postal code.
countryenumRequired
The country. One of US, CA.
websitestringRequired
The website (https).
privacy_urlstringRequired
The privacy page (https).
terms_urlstringRequired
The terms page (https). The carriers refuse a registration without one.
contactobjectRequired
The contact person.
Show child attributes
namestringRequired
The contact's name.
emailstringRequired
The contact's email.
phonestringRequired
The contact's phone, in international format (+12175550118).
monthly_volumeintegerRequired
The texts you expect to send a month.
consentobjectRequired
How consent to text is held.
Show child attributes
modeenumRequired
provenance (Provenance asks people) or company (We have it). One of provenance, company.
methodenum
How people agree. Required with company; not sent with provenance. One of sign_up_form, in_app, in_person, customer_list.
number_typeenum
The number's type (toll_free, the default and only value). One of toll_free.

Returns

Promise<SendingNumber> The row as it stands after the save (and the request, when it could start).

HTTP operation

POST /v1/account/sending_numbers: Save your business details

Errors

Example

const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/account/sending_numbers`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "legal_name": "Pellowmarsh Clinics LLC",
    "business_type": "private_company",
    "tax_id": "12-3456789",
    "address": {
      "line1": "100 Sample Street",
      "city": "Springfield",
      "region": "IL",
      "postal_code": "62701",
      "country": "US"
    },
    "website": "https://pellowmarsh.example",
    "privacy_url": "https://pellowmarsh.example/privacy",
    "terms_url": "https://pellowmarsh.example/terms",
    "contact": {
      "name": "Mara Okonjo",
      "email": "mara@pellowmarsh.example",
      "phone": "+12175550118"
    },
    "monthly_volume": 1000,
    "consent": {
      "mode": "company",
      "method": "sign_up_form"
    }
  }),
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.