> For the complete documentation index, see [llms.txt](https://docs.planetcrust.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.planetcrust.com/mailchimp/mailchimp/action-add-update-upsert-member.md).

# Action: Add/Update (upsert) Member

Mailchimp Operation

<p align="center"><a class="button primary" data-icon="circle-caret-right">Try @Human</a><a class="button primary" data-icon="check">Buy @Human Subscriptions</a><a class="button primary" data-icon="comments">Join @Human Community</a></p>

<figure><img src="https://173051806-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEFQVbo960GBdKqZMghCQ%2Fuploads%2Fgit-blob-cd9a209f8054bf35b2c9a395c085b7c806ca63d4%2FMailchimp.png?alt=media" alt=""><figcaption></figcaption></figure>

<p align="center">The List Members action enables users to update an existing member in a specific list in Mailchimp.</p>

{% embed url="<https://www.youtube.com/watch?v=CyuUuaBSZzA>" %}

#### Example User Story

As a marketing manager, I want to update a subscriber's details in a Mailchimp list so that I can keep the contact information current and relevant for email campaigns.

#### Fields

| Field Name             | Field Type | Required |
| ---------------------- | ---------- | -------- |
| list\_id               | String     | Yes      |
| subscriber\_hash       | String     | Yes      |
| email\_address         | String     | No       |
| status                 | String     | No       |
| merge\_fields          | Object     | No       |
| interests              | Object     | No       |
| language               | String     | No       |
| vip                    | Boolean    | No       |
| location               | Object     | No       |
| marketing\_permissions | Array      | No       |
| ip\_signup             | String     | No       |
| timestamp\_signup      | String     | No       |

### Related Connections

### Related Automations

Example link

### Code (Apache v2.0): Operation

```
{
  "handle": "update-list-member",
  "state": "inDev",
  "meta": {
    "short": "Update List Member",
    "description": "Update an existing member in a Mailchimp list."
  },
  "input": [
    {
      "name": "list_id",
      "type": "String",
      "required": true,
      "meta": {
        "description": "The unique ID for the Mailchimp list."
      }
    },
    {
      "name": "subscriber_hash",
      "type": "String",
      "required": true,
      "meta": {
        "description": "The MD5 hash of the lowercase version of the list member's email address."
      }
    },
    {
      "name": "email_address",
      "type": "String",
      "required": false,
      "meta": {
        "description": "Email address for the subscriber."
      }
    },
    {
      "name": "status",
      "type": "String",
      "required": false,
      "meta": {
        "description": "Subscriber's status (e.g., 'subscribed', 'unsubscribed', 'cleaned', 'pending').",
        "options": ["subscribed", "unsubscribed", "cleaned", "pending"]
      }
    },
    {
      "name": "merge_fields",
      "type": "Object",
      "required": false,
      "meta": {
        "description": "Merge fields for the subscriber."
      }
    },
    {
      "name": "interests",
      "type": "Object",
      "required": false,
      "meta": {
        "description": "Interests for the subscriber."
      }
    },
    {
      "name": "language",
      "type": "String",
      "required": false,
      "meta": {
        "description": "Subscriber's language preference."
      }
    },
    {
      "name": "vip",
      "type": "Boolean",
      "required": false,
      "meta": {
        "description": "VIP status for the subscriber."
      }
    },
    {
      "name": "location",
      "type": "Object",
      "required": false,
      "meta": {
        "description": "Location information for the subscriber."
      }
    },
    {
      "name": "marketing_permissions",
      "type": "Array",
      "required": false,
      "meta": {
        "description": "Marketing permissions for the subscriber."
      }
    },
    {
      "name": "ip_signup",
      "type": "String",
      "required": false,
      "meta": {
        "description": "IP address the subscriber signed up from."
      }
    },
    {
      "name": "timestamp_signup",
      "type": "String",
      "required": false,
      "meta": {
        "description": "Sign-up timestamp for the subscriber."
      }
    }
  ],
  "output": [
    {
      "name": "id",
      "type": "String",
      "selector": ["id"],
      "meta": {
        "description": "The unique ID for the member."
      }
    },
    {
      "name": "email_address",
      "type": "String",
      "selector": ["email_address"],
      "meta": {
        "description": "The email address for the member."
      }
    },
    {
      "name": "status",
      "type": "String",
      "selector": ["status"],
      "meta": {
        "description": "The status of the member."
      }
    }
  ],
  "steps": [
    {
      "type": "http",
      "http": {
        "method": "PUT",
        "path": "/lists/{{list_id}}/members/{{subscriber_hash}}",
        "headers": {
          "Content-Type": "application/json"
        },
        "bodyTemplate": {
          "value": "{\"email_address\":\"{{email_address}}\",\"status\":\"{{status}}\",\"merge_fields\":{{merge_fields}},\"interests\":{{interests}},\"language\":\"{{language}}\",\"vip\":{{vip}},\"location\":{{location}},\"marketing_permissions\":{{marketing_permissions}},\"ip_signup\":\"{{ip_signup}}\",\"timestamp_signup\":\"{{timestamp_signup}}\"}",
          "placeholders": [
            {
              "name": "email_address",
              "type": "String",
              "description": "Email address for the subscriber.",
              "required": false
            },
            {
              "name": "status",
              "type": "String",
              "description": "Subscriber's status.",
              "required": false
            },
            {
              "name": "merge_fields",
              "type": "Object",
              "description": "Merge fields for the subscriber.",
              "required": false
            },
            {
              "name": "interests",
              "type": "Object",
              "description": "Interests for the subscriber.",
              "required": false
            },
            {
              "name": "language",
              "type": "String",
              "description": "Subscriber's language preference.",
              "required": false
            },
            {
              "name": "vip",
              "type": "Boolean",
              "description": "VIP status for the subscriber.",
              "required": false
            },
            {
              "name": "location",
              "type": "Object",
              "description": "Location information for the subscriber.",
              "required": false
            },
            {
              "name": "marketing_permissions",
              "type": "Array",
              "description": "Marketing permissions for the subscriber.",
              "required": false
            },
            {
              "name": "ip_signup",
              "type": "String",
              "description": "IP address the subscriber signed up from.",
              "required": false
            },
            {
              "name": "timestamp_signup",
              "type": "String",
              "description": "Sign-up timestamp for the subscriber.",
              "required": false
            }
          ]
        }
      }
    }
  ]
}

```

<p align="center"><a class="button primary" data-icon="square-caret-right">Try @Human</a><a class="button primary" data-icon="check">Buy @Human Subscription</a><a class="button primary" data-icon="comments">Join @Human Community</a></p>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.planetcrust.com/mailchimp/mailchimp/action-add-update-upsert-member.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
