---
title: "Edit a distribution list"
method: PUT
path: "/api/v2/distribution-lists/{id}"
tags: ["Distribution Lists"]
---

# Edit a distribution list

`PUT /api/v2/distribution-lists/{id}`

<a class="try-sandbox-link" href="https://sandbox.textmagic.com/#/Distribution%20Lists/updateDistributionList" target="_blank">Try in sandbox</a><br>> This replaces the whole recipient set — submit the complete list of `contactIds`, `groupIds` and `numbers` you want the distribution list to have, not just the additions.

## Path parameters

- `id` integer, required

## Request body

- object
  - `name` string, required — Distribution list name.
  - `recipients` object, required — Recipients of the distribution list. At least one recipient must be provided across contactIds, groupIds, segmentIds and numbers.
    - `contactIds` integer[] — Contact IDs to include.
    - `groupIds` integer[] — List (group) IDs to include.
    - `segmentIds` integer[] — Segment (saved filter view) IDs to include.
    - `numbers` string[] — Plain phone numbers (E.164) to include.
  - `includeOptions` 'body' | 'subject' | 'both', required — Which part of the incoming email to include in the outgoing SMS.
  - `maxLength` 1 | 2 | 3 | 4 | 5 | 6, required — Maximum number of SMS parts per message (1-6).
  - `sender` string, nullable — Phone number or sender ID the forwarded messages are sent from (reply-to). Leave empty to use the account default.
  - `sourceType` string, nullable — Sender source type for the sender field (see Sender settings).

## Response `200`

Returned when successful.

- DistributionList
  - `id` integer, required — Distribution list ID.
  - `name` string, required — Distribution list name.
  - `email` string, required — The auto-generated email address. Emails sent here are forwarded as text messages to the list recipients.
  - `membersCount` integer, required — Total number of unique recipients (contacts + list members + segment members + numbers, de-duplicated).
  - `includeOptions` 'body' | 'subject' | 'both', required — Which part of the incoming email is included in the outgoing SMS.
  - `maxLength` integer, required — Maximum number of SMS parts per message (1-6).
  - `recipients` DistributionListRecipients, required
    - `contactIds` integer[], required — IDs of individual contacts included in the list.
    - `groupIds` integer[], required — IDs of contact lists (groups) included in the list.
    - `segmentIds` integer[], required — IDs of segments (saved filter views) included in the list.
    - `numbers` string[], required — Plain phone numbers included in the list.
  - `senderSource` DistributionListSenderSource, required
    - `id` integer, nullable — ID of the sender number/entity the messages are sent from.
    - `phone` string, nullable — The resolved phone number or sender ID.
    - `type` string, nullable — Sender source type.
    - `countryId` string, nullable — Country of the sender number.
    - `label` string, nullable — Label of the sender number.
    - `status` string, nullable — Status of the sender number.
    - `carrierStatus` string, nullable — Carrier status of the sender number.

## Other responses

- `400` — Returned when the form has errors.
- `401` — Unauthorized request.
- `404` — Returned when no distribution list found.

---

[API](https://skmtc.net/textmagic/apis/textmagic-api.md) · [All operations](https://skmtc.net/textmagic/apis/textmagic-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/textmagic/textmagic-api/revisions/3e4029d19684/schema)
