---
title: "Batch add or remove members"
method: POST
path: "/3.0/lists/{list_id}/segments/{segment_id}"
tags: ["lists"]
---

# Batch add or remove members

`POST /3.0/lists/{list_id}/segments/{segment_id}`

## Request

- Base URL: `https://api.mailchimp.com`
- URL: `https://api.mailchimp.com/3.0/lists/{list_id}/segments/{segment_id}`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `https://login.mailchimp.com/oauth2/authorize`
    - Token URL: `https://login.mailchimp.com/oauth2/token`
- TypeScript: <https://skmtc.dev/mailchimp/apis/mailchimp-api/docs/3.0/lists/:list_id/segments/:segment_id/post.ts> (a function with typed inputs; its response is checked against the schema)

Batch add/remove list members to static segment

## Path parameters

- `list_id` string, required
- `segment_id` string, required

## Request body

- object: Members to add/remove to/from a static segment
  - `members_to_add` string[]: An array of emails to be used for a static segment. Any emails provided that are not present on the list will be ignored. A maximum of 500 members can be sent.
  - `members_to_remove` string[]: An array of emails to be used for a static segment. Any emails provided that are not present on the list will be ignored. A maximum of 500 members can be sent.

## Response `200`

- object: Batch add/remove List members to/from static segment
  - `_links` object[]: A list of link types and descriptions for the API schema documents.
    - `href` string: This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
    - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD': The HTTP method that should be used when accessing the URL defined in 'href'.
    - `rel` string: As with an HTML 'rel' attribute, this describes the type of link.
    - `schema` string: For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.
    - `targetSchema` string: For GETs, this is a URL representing the schema that the response should conform to.
  - `error_count` integer: The total number of items matching the query, irrespective of pagination.
  - `errors` object[]: An array of objects, each representing an array of email addresses that could not be added to the segment or removed and an error message providing more details.
    - `email_addresses` string[]: Email addresses added to the static segment or removed
    - `error` string: The error message indicating why the email addresses could not be added or updated.
  - `members_added` object[]: An array of objects, each representing a new member that was added to the static segment.
    - `_links` object[]: A list of link types and descriptions for the API schema documents.
      - `href` string: This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD': The HTTP method that should be used when accessing the URL defined in 'href'.
      - `rel` string: As with an HTML 'rel' attribute, this describes the type of link.
      - `schema` string: For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.
      - `targetSchema` string: For GETs, this is a URL representing the schema that the response should conform to.
    - `contact_id` string: A unique ID for the contact record.
    - `email_address` string: Email address for a subscriber.
    - `email_client` string: The list member's email client.
    - `email_type` string: Type of email this member asked to get ('html' or 'text').
    - `id` string: The MD5 hash of the lowercase version of the list member's email address.
    - `interests` object: The key of this object's properties is the ID of the interest in question.
    - `ip_opt` string: The IP address the subscriber used to confirm their opt-in status.
    - `ip_signup` string: IP address the subscriber signed up from.
    - `language` string: If set/detected, the [subscriber's language](https://mailchimp.com/help/view-and-edit-contact-languages/).
    - `last_changed` string, date-time: The date and time the member's info was last changed in ISO 8601 format.
    - `last_note` object: The most recent Note added about this member.
      - `created_at` string, date-time: The date and time the note was created in ISO 8601 format.
      - `created_by` string: The author of the note.
      - `note` string: The content of the note.
      - `note_id` integer: The note id.
    - `list_id` string: The list id.
    - `location` object: Subscriber location information.
      - `country_code` string: The unique code for the location country.
      - `dstoff` integer: The offset for timezones where daylight saving time is observed.
      - `gmtoff` integer: The time difference in hours from GMT.
      - `latitude` number: The location latitude.
      - `longitude` number: The location longitude.
      - `timezone` string: The timezone for the location.
    - `member_rating` integer: Star rating for this member, between 1 and 5.
    - `merge_fields` object: An individual merge var and value for a member.
    - `stats` object: Open and click rates for this subscriber.
      - `avg_click_rate` number: A subscriber's average clickthrough rate.
      - `avg_open_rate` number: A subscriber's average open rate.
    - `status` 'subscribed' | 'unsubscribed' | 'cleaned' | 'pending' | 'transactional': Subscriber's current status.
    - `tags` object[]: The tags applied to this member.
      - `id` integer: The tag id.
      - `name` string: The name of the tag
    - `tags_count` integer: The number of tags applied to this member.
    - `timestamp_opt` string, date-time: The date and time the subscriber confirmed their opt-in status in ISO 8601 format.
    - `timestamp_signup` string, date-time: The date and time the subscriber signed up for the list in ISO 8601 format.
    - `unique_email_id` string: An identifier for the address across all of Mailchimp.
    - `vip` boolean: [VIP status](https://mailchimp.com/help/designate-and-send-to-vip-contacts/) for subscriber.
  - `members_removed` object[]: An array of objects, each representing an existing list member that got deleted from the static segment.
    - `_links` object[]: A list of link types and descriptions for the API schema documents.
      - `href` string: This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD': The HTTP method that should be used when accessing the URL defined in 'href'.
      - `rel` string: As with an HTML 'rel' attribute, this describes the type of link.
      - `schema` string: For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.
      - `targetSchema` string: For GETs, this is a URL representing the schema that the response should conform to.
    - `contact_id` string: A unique ID for the contact record.
    - `email_address` string: Email address for a subscriber.
    - `email_client` string: The list member's email client.
    - `email_type` string: Type of email this member asked to get ('html' or 'text').
    - `id` string: The MD5 hash of the lowercase version of the list member's email address.
    - `interests` object: The key of this object's properties is the ID of the interest in question.
    - `ip_opt` string: The IP address the subscriber used to confirm their opt-in status.
    - `ip_signup` string: IP address the subscriber signed up from.
    - `language` string: If set/detected, the [subscriber's language](https://mailchimp.com/help/view-and-edit-contact-languages/).
    - `last_changed` string, date-time: The date and time the member's info was last changed in ISO 8601 format.
    - `last_note` object: The most recent Note added about this member.
      - `created_at` string, date-time: The date and time the note was created in ISO 8601 format.
      - `created_by` string: The author of the note.
      - `note` string: The content of the note.
      - `note_id` integer: The note id.
    - `list_id` string: The list id.
    - `location` object: Subscriber location information.
      - `country_code` string: The unique code for the location country.
      - `dstoff` integer: The offset for timezones where daylight saving time is observed.
      - `gmtoff` integer: The time difference in hours from GMT.
      - `latitude` number: The location latitude.
      - `longitude` number: The location longitude.
      - `timezone` string: The timezone for the location.
    - `member_rating` integer: Star rating for this member, between 1 and 5.
    - `merge_fields` object: An individual merge var and value for a member.
    - `stats` object: Open and click rates for this subscriber.
      - `avg_click_rate` number: A subscriber's average clickthrough rate.
      - `avg_open_rate` number: A subscriber's average open rate.
    - `status` 'subscribed' | 'unsubscribed' | 'cleaned' | 'pending' | 'transactional': Subscriber's current status.
    - `tags` object[]: The tags applied to this member.
      - `id` integer: The tag id.
      - `name` string: The name of the tag
    - `tags_count` integer: The number of tags applied to this member.
    - `timestamp_opt` string, date-time: The date and time the subscriber confirmed their opt-in status in ISO 8601 format.
    - `timestamp_signup` string, date-time: The date and time the subscriber signed up for the list in ISO 8601 format.
    - `unique_email_id` string: An identifier for the address across all of Mailchimp.
    - `vip` boolean: [VIP status](https://mailchimp.com/help/designate-and-send-to-vip-contacts/) for subscriber.
  - `total_added` integer: The total number of items matching the query, irrespective of pagination.
  - `total_removed` integer: The total number of items matching the query, irrespective of pagination.

## Other responses

- `default`: An error generated by the Mailchimp API.

---

[API](https://skmtc.dev/mailchimp/apis/mailchimp-api.md) - [All operations](https://skmtc.dev/mailchimp/apis/mailchimp-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mailchimp/apis/mailchimp-api/revisions/53bf4b156855?raw)
