# 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

```ts
prov.account.deleteSendingNumber(id: string): Promise<SendingNumber>
```

## Parameters

- `id` (string)

## Returns

`Promise<SendingNumber>`

## HTTP operation

[`DELETE /v1/account/sending_numbers/{id}`](https://provenanceauth.com/docs/api/account.md#delete-v1-account-sending-numbers-id): Delete details or release a number

## Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_role`](https://provenanceauth.com/docs/platform/errors.md#insufficient_role)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)
- [`sending_numbers_unavailable`](https://provenanceauth.com/docs/platform/errors.md#sending_numbers_unavailable)

## Example

**Node**

```ts
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();
```

**Python**

```python
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()
```
