latestSwagger 2.02026-08-101561322.2 MB

3e4029d19684

Distribution Lists

Edit a distribution list

<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.

put/api/v2/distribution-lists/{id}

Path parameters

idinteger required

Request body

namestring required

Distribution list name.

includeOptions'body' | 'subject' | 'both' required

Which part of the incoming email to include in the outgoing SMS.

maxLength1 | 2 | 3 | 4 | 5 | 6 required

Maximum number of SMS parts per message (1-6).

senderstring nullable

Phone number or sender ID the forwarded messages are sent from (reply-to). Leave empty to use the account default.

sourceTypestring nullable

Sender source type for the sender field (see Sender settings).

Example request

{
  "name": "Support alerts",
  "recipients": {
    "contactIds": [
      1,
      2
    ],
    "groupIds": [
      3
    ],
    "segmentIds": [
      4,
      5
    ],
    "numbers": [
      "+15551234567"
    ]
  },
  "includeOptions": "both",
  "maxLength": 6,
  "sender": "+15551234567"
}

Response

Returned when successful.

idinteger required

Distribution list ID.

namestring required

Distribution list name.

emailstring required

The auto-generated email address. Emails sent here are forwarded as text messages to the list recipients.

membersCountinteger 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.

maxLengthinteger required

Maximum number of SMS parts per message (1-6).

Example response

{
  "id": 715,
  "name": "Support alerts",
  "email": "ab12345678@distributionlists.textmagic.com",
  "membersCount": 332,
  "includeOptions": "both",
  "maxLength": 6,
  "recipients": {
    "contactIds": [
      1,
      2
    ],
    "groupIds": [
      3
    ],
    "segmentIds": [
      4,
      5
    ],
    "numbers": [
      "+15551234567"
    ]
  },
  "senderSource": {
    "phone": "+15551234567"
  }
}