# Update SMS Trunk Group

Updates an SMS trunk group.

All attributes and relationships are optional. Sending `sms_trunks` replaces the whole
membership of the group: trunks not listed are removed from the group, and an empty list
removes all trunks.

## Request

HTTP Method: `PATCH`

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

### URI Query Parameters

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

### Request Body Object Attributes

| Name | Type | Nullable | Is Required? | Description |
| --- | --- | --- | --- | --- |
| name | `string` | No | No | Friendly name of the SMS trunk group. Must be unique among the SMS trunks and SMS trunk groups of the account. |
| external\_reference\_id | `string` | Yes | No | Optional identifier for the SMS trunk group in the customer's external system. Maximum length is 100 characters. |

### Request Body Object Relationships

| Name | Type | Description |
| --- | --- | --- |
| sms\_trunks | [To many](../../../specification/relationships.html#api-relationships) | Replaces the member trunks of the group. Only `sms_to_email`, `http_in`, `smpp_esme`, and `smpp_smsc` trunks of the account are accepted. The list must not contain duplicates. |

The delivery order within the group is set with the `priority` attribute of each
[SMS Trunk](../sms-trunks/update-sms-trunk.html).

## Examples

Replace SMS TrunksRemove All SMS Trunks

[[DIDWW-API-EXAMPLE-START]]

http

```
 1PATCH /v3/sms_trunk_groups/c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46 HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Authorization: Bearer [access token]
 6
 7{
 8  "data": {
 9    "id": "c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46",
10    "type": "sms_trunk_groups",
11    "attributes": {
12      "name": "Inbound SMS primary"
13    },
14    "relationships": {
15      "sms_trunks": {
16        "data": [
17          {
18            "type": "sms_trunks",
19            "id": "3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24"
20          },
21          {
22            "type": "sms_trunks",
23            "id": "8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67"
24          },
25          {
26            "type": "sms_trunks",
27            "id": "a1d3f5b7-4c2e-4e8a-9b6d-3e7f1c5a9d28"
28          }
29        ]
30      }
31    }
32  }
33}
```

curl

```
1curl -i -X PATCH https://api.didww.com/v3/sms_trunk_groups/c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46 -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"name": "Inbound SMS primary"}, "id": "c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46", "relationships": {"sms_trunks": {"data": [{"type": "sms_trunks", "id": "3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24"}, {"type": "sms_trunks", "id": "8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67"}, {"type": "sms_trunks", "id": "a1d3f5b7-4c2e-4e8a-9b6d-3e7f1c5a9d28"}]}}, "type": "sms_trunk_groups"}}'
```

response

```
 1HTTP/1.1 200 OK
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46",
 7    "type": "sms_trunk_groups",
 8    "attributes": {
 9      "name": "Inbound SMS primary",
10      "external_reference_id": null,
11      "created_at": "2026-10-22T09:15:42.118Z",
12      "updated_at": "2026-10-22T10:02:17.541Z"
13    },
14    "relationships": {
15      "sms_trunks": {
16        "links": {
17          "self": "https://api.didww.com/v3/sms_trunk_groups/c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46/relationships/sms_trunks",
18          "related": "https://api.didww.com/v3/sms_trunk_groups/c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46/sms_trunks"
19        }
20      },
21      "incoming_dids": {
22        "links": {
23          "self": "https://api.didww.com/v3/sms_trunk_groups/c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46/relationships/incoming_dids",
24          "related": "https://api.didww.com/v3/sms_trunk_groups/c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46/incoming_dids"
25        }
26      }
27    },
28    "meta": {
29      "sms_trunks_count": 3
30    }
31  },
32  "meta": {
33    "api_version": "2026-11-19"
34  }
35}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
 1PATCH /v3/sms_trunk_groups/c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46 HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Authorization: Bearer [access token]
 6
 7{
 8  "data": {
 9    "id": "c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46",
10    "type": "sms_trunk_groups",
11    "relationships": {
12      "sms_trunks": {
13        "data": []
14      }
15    }
16  }
17}
```

curl

```
1curl -i -X PATCH https://api.didww.com/v3/sms_trunk_groups/c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46 -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"id": "c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46", "relationships": {"sms_trunks": {"data": []}}, "type": "sms_trunk_groups"}}'
```

response

```
 1HTTP/1.1 200 OK
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46",
 7    "type": "sms_trunk_groups",
 8    "attributes": {
 9      "name": "Inbound SMS",
10      "external_reference_id": null,
11      "created_at": "2026-10-22T09:15:42.118Z",
12      "updated_at": "2026-10-22T10:02:17.541Z"
13    },
14    "relationships": {
15      "sms_trunks": {
16        "links": {
17          "self": "https://api.didww.com/v3/sms_trunk_groups/c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46/relationships/sms_trunks",
18          "related": "https://api.didww.com/v3/sms_trunk_groups/c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46/sms_trunks"
19        }
20      },
21      "incoming_dids": {
22        "links": {
23          "self": "https://api.didww.com/v3/sms_trunk_groups/c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46/relationships/incoming_dids",
24          "related": "https://api.didww.com/v3/sms_trunk_groups/c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46/incoming_dids"
25        }
26      }
27    },
28    "meta": {
29      "sms_trunks_count": 0
30    }
31  },
32  "meta": {
33    "api_version": "2026-11-19"
34  }
35}
```

[[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) |
| 400 | No | [Bad Request](../../../specification/errors/index.html#api-bad-request) |
| 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. |
