> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# Update Subscriber

- Component: `appmixer.manychat.core.UpdateSubscriber`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.manychat 1.0.0](https://connectors.appmixer.com/connector/appmixer.manychat/1.0.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.manychat/1.0.0/component/appmixer.manychat.core.UpdateSubscriber>

Update the name, email, phone, gender and opt-ins of a Manychat subscriber. Empty fields are left unchanged.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Subscriber ID (`subscriberId`) | text | The Manychat subscriber (contact) ID. Get it from Find Subscribers or a Manychat External Request. |
| First Name (`firstName`) | text | - |
| Last Name (`lastName`) | text | - |
| Email (`email`) | text | Email address. Set Email Opt-in when you have the subscriber's consent. |
| Email Opt-in (`hasOptInEmail`) | toggle | Whether the subscriber agreed to receive emails. Sent only when Email is set. |
| Phone (`phone`) | text | Phone number for SMS in international format, for example `+15550100123`. |
| SMS Opt-in (`hasOptInSms`) | toggle | Whether the subscriber agreed to receive SMS. Sent only when Phone is set. Requires Consent Phrase. |
| Consent Phrase (`consentPhrase`) | text | The phrase the subscriber agreed to. Manychat requires it when SMS Opt-in is on. |
| Gender (`gender`) | text | For example `male` or `female`. |

## Output ports

### Port `out`

_No fields defined for this port._

## Full metadata (component.json)

```json
{
  "name": "appmixer.manychat.core.UpdateSubscriber",
  "label": "Update Subscriber",
  "description": "Update the name, email, phone, gender and opt-ins of a Manychat subscriber. Empty fields are left unchanged.",
  "author": "Appmixer <info@appmixer.com>",
  "version": "1.0.0",
  "auth": {
    "service": "appmixer:manychat"
  },
  "quota": {
    "manager": "appmixer:manychat",
    "resources": "requests",
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "subscriberId": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "hasOptInEmail": {
            "type": "boolean"
          },
          "phone": {
            "type": "string"
          },
          "hasOptInSms": {
            "type": "boolean"
          },
          "consentPhrase": {
            "type": "string"
          },
          "gender": {
            "type": "string"
          }
        },
        "required": [
          "subscriberId"
        ]
      },
      "inspector": {
        "inputs": {
          "subscriberId": {
            "type": "text",
            "index": 1,
            "label": "Subscriber ID",
            "tooltip": "The Manychat subscriber (contact) ID. Get it from Find Subscribers or a Manychat External Request."
          },
          "firstName": {
            "type": "text",
            "index": 2,
            "label": "First Name"
          },
          "lastName": {
            "type": "text",
            "index": 3,
            "label": "Last Name"
          },
          "email": {
            "type": "text",
            "index": 4,
            "label": "Email",
            "tooltip": "Email address. Set Email Opt-in when you have the subscriber's consent."
          },
          "hasOptInEmail": {
            "type": "toggle",
            "index": 5,
            "label": "Email Opt-in",
            "defaultValue": false,
            "tooltip": "Whether the subscriber agreed to receive emails. Sent only when Email is set."
          },
          "phone": {
            "type": "text",
            "index": 6,
            "label": "Phone",
            "tooltip": "Phone number for SMS in international format, for example <code>+15550100123</code>."
          },
          "hasOptInSms": {
            "type": "toggle",
            "index": 7,
            "label": "SMS Opt-in",
            "defaultValue": false,
            "tooltip": "Whether the subscriber agreed to receive SMS. Sent only when Phone is set. Requires Consent Phrase."
          },
          "consentPhrase": {
            "type": "text",
            "index": 8,
            "label": "Consent Phrase",
            "tooltip": "The phrase the subscriber agreed to. Manychat requires it when SMS Opt-in is on."
          },
          "gender": {
            "type": "text",
            "index": 9,
            "label": "Gender",
            "tooltip": "For example <code>male</code> or <code>female</code>."
          }
        }
      }
    }
  ],
  "outPorts": [
    "out"
  ],
  "icon": "(data URI omitted)"
}
```
