SDK reference · Node SDK
prov.account.updateSendingNumberDetails
prov.account.updateSendingNumberDetails in Node SDK. Edit saved details (only before the request starts).
Signature
prov.account.updateSendingNumberDetails(id: string, changes: Partial<SendingNumberDetails>): Promise<SendingNumber>Parameters
idstringRequiredchangesPartial<SendingNumberDetails>Required
Request fields
idstringpathRequired- The sending number's id.
Returns
Promise<SendingNumber> The row with the new details.
HTTP operation
PATCH /v1/account/sending_numbers/{id}: Edit saved details
Errors
- authentication_required
- insufficient_role
- invalid_json
- parameter_invalid
- rate_limit_exceeded
- resource_missing
- sending_number_not_editable
- sending_numbers_unavailable
Example
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/account/sending_numbers/snum_4f2a9c0e7b1d3e5a6c8b`, {
method: "PATCH",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({ "monthly_volume": 2500, "contact": { "phone": "+12175550199" } }),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.patch(f"{api}/v1/account/sending_numbers/snum_4f2a9c0e7b1d3e5a6c8b", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"monthly_volume": 2500,
"contact": {
"phone": "+12175550199"
}
}).json()