Delete an unassigned inventory number
const url = 'https://api.siprtc.io/v1/Accounts/AC000000000000000000/AvailablePhoneNumbers/%2B15555550100?modified_by=jane%40example.com';const options = {method: 'DELETE', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url 'https://api.siprtc.io/v1/Accounts/AC000000000000000000/AvailablePhoneNumbers/%2B15555550100?modified_by=jane%40example.com' \ --header 'Authorization: Basic <credentials>'Vendor accounts only. Removes an unassigned number from your inventory by marking it deleted; it no longer appears in searches and cannot be assigned. Only numbers in your inventory (you are the vendor) that are active and not assigned to an account can be deleted. The phone number may be written with or without + and spaces.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Your Auth ID.
Example
AC000000000000000000The inventory number.
Example
+15555550100Query Parameters
Section titled “ Query Parameters ”Name of the person making the change, recorded in the audit log.
Example
jane@example.comResponses
Section titled “ Responses ”Deleted: status success, message ‘Available phone number deleted’
object
Human-readable result or error.
Success or failed.
Example
{ "message": "phone number not found", "status": "failed"}Not your inventory (auth id does not match parent auth id), assigned (unavailable number cannot be deleted), already deleted, or not active
object
Human-readable result or error.
Success or failed.
Example
{ "message": "phone number not found", "status": "failed"}Missing or invalid credentials (returned by the API gateway)
Example generated
examplePhone number not found
object
Human-readable result or error.
Success or failed.
Example
{ "message": "phone number not found", "status": "failed"}