# Delete SMS Trunk

Deletes an SMS trunk.

The request is rejected with `422` while any DID is routed to the trunk for inbound
messages. Route those DIDs to another trunk or SMS trunk group, or clear their routing,
through the [DID](../did/index.html) resource first. DIDs listed in `outgoing_dids` do
not block the deletion.

[Sender ID verifications](../sender-id-verifications/index.html) that use the trunk are left
without one, and their outbound messages stop until another trunk is assigned.

## Request

HTTP Method: `DELETE`

URI Path: `/v3/sms_trunks/{id}`

### URI Query Parameters

| Name | Type | Is Required? | Description |
| --- | --- | --- | --- |
| id | `string` | Yes | Unique identifier of the SMS trunk. |

## Example

[[DIDWW-API-EXAMPLE-START]]

http

```
1DELETE /v3/sms_trunks/0b1f6c2e-5d4a-4f8e-9c3b-7a2d1e6f4b90 HTTP/1.1
2Host: api.didww.com
3Content-Type: application/vnd.api+json
4Accept: application/vnd.api+json
5Authorization: Bearer [access token]
```

curl

```
1curl -i -X DELETE https://api.didww.com/v3/sms_trunks/0b1f6c2e-5d4a-4f8e-9c3b-7a2d1e6f4b90 -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]"
```

response

```
1HTTP/1.1 204 No Content
```

[[DIDWW-API-EXAMPLE-END]]

## Other Responses

| Code | Success | Description |
| --- | --- | --- |
| 404 | No | [Not Found](../../../specification/errors/index.html#api-not-found) |
| 422 | No | [Validation Error Object](../../../specification/errors/index.html#api-validation-error-object). The trunk is still assigned to DIDs for inbound messages. |
| 401 | No | [Unauthorized](../../authentication.html#authentication-v35) |
| 403 | No | The access token carries the `read` scope, which does not cover this method (title `Insufficient scope`). The response carries `WWW-Authenticate: Bearer error="insufficient_scope"`. See [Scopes](../../authentication.html#authentication-scopes-v35). |
| 429 | No | The request budget of the account for the current window is spent (`too_many_requests`). `Retry-After` gives the number of seconds to wait. |
