SDK reference · Python SDK
prov.account.save_sending_number_details
prov.account.save_sending_number_details in Python SDK. Save your business details on any plan; on Pro and above the number is requested when the deployment can.
Signature
prov.account.save_sending_number_details(**details: Any = …) -> AnyParameters
**detailsAny
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 butsole_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
modeenumRequiredprovenance(Provenance asks people) orcompany(We have it). One ofprovenance,company.methodenum- How people agree. Required with
company; not sent withprovenance. One ofsign_up_form,in_app,in_person,customer_list.
number_typeenum- The number's type (
toll_free, the default and only value). One oftoll_free.
Returns
Any 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
- authentication_required
- email_not_verified
- insufficient_role
- invalid_json
- parameter_invalid
- rate_limit_exceeded
- sending_number_exists
- sending_numbers_unavailable
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();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/account/sending_numbers", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"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()