SDK reference · Node SDK
prov.account.deleteSendingNumber
prov.account.deleteSendingNumber in Node SDK. Delete saved details, release a number (its details kept), or delete a released number's kept details.
Signature
prov.account.deleteSendingNumber(id: string): Promise<SendingNumber>Parameters
idstringRequired
Request fields
idstringpathRequired- The sending number's id.
Returns
Promise<SendingNumber> The row after the change.
HTTP operation
DELETE /v1/account/sending_numbers/{id}: Delete details or release a number
Errors
- authentication_required
- insufficient_role
- rate_limit_exceeded
- resource_missing
- sending_numbers_unavailable
Example
const step1 = 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();
const snumId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/account/sending_numbers/${snumId}`, {
method: "DELETE",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = 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()
snum_id = step1["id"]
data = httpx.delete(f"{api}/v1/account/sending_numbers/{snum_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()