Distribution Lists

Remove members from a distribution list by body

DELETE/distribution-lists/{id}/members
distribution-lists:writeremove_distribution_list_membersDestructiveIdempotentDeprecatedSunset 2027-06-30

Removes every user in userIds from the list and returns 204; users who are not members are skipped. Deprecated: it will be withdrawn on 2027-06-30. Use DELETE /distribution-lists/{id}/members/{member_id} for one member, or PUT to replace the set. No dry run. Emits distribution_list.updated when it changed; no email. Adding the users again undoes it.

Path parameters

  • idintegerRequired#

    The distribution list's id. Distribution lists are keyed by integer ids, not UUIDs: a whole number from 1 to 2147483647.

Request body

application/json, required · MemberIds

  • userIdsstring (uuid)[]Required#
{
  "userIds": [
    "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
  ]
}

Responses

204

The listed users are no longer members.

401

Authentication failed. error.code is one of invalid_token, expired, revoked.

Error
403

Authorization failed. error.code is one of org_disabled, ip_blocked, missing_scope, scope_disabled, user_disabled.

Error
404

Resource not found (error.code = not_found).

Error
422

Request validation failed (HTTP 422). The body is either the Laravel validation envelope (message + field-keyed errors) or the API error envelope for domain rejections (e.g. form_type_not_supported, folder_locked, parent_not_found, folder_not_empty).

429

Rate limit exceeded (error.code = rate_limited).

Error

Examples

curl -X DELETE https://your-org-domain/kong/core/api/v2/distribution-lists/{id}/members\
  -H "Authorization: Bearer $HELM_API_KEY"\
  -H "Content-Type: application/json"\
  -d '{
  "userIds": [
    "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
  ]
}'