# Add Subscribers to a List

You can use SOAP API to add subscribers to a subscriber, publication, or suppression list. You can add a subscriber to a list when you create their subscriber record, or you can update an existing subscriber to add them to a list.

If your use case requires you to add a batch of subscribers to a list, start by performing an `Update` operation. After that, perform a `Create` operation to create the contacts that weren’t found during the `Update` operation.

## Sample SOAP Envelopes

Use these sample SOAP envelopes as guidelines for creating requests that suit your use case.

### Create a Subscriber and Add to List

This example shows how to create a subscriber and add that subscriber to a list.

```sfdocs-code {"lang":"xml", "title": "Sample SOAP Request Envelope"}
<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope
    xmlns:s="http://www.w3.org/2003/05/soap-envelope"
    xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing"
    xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <s:Header>
        <a:Action s:mustUnderstand="1">Create</a:Action>
        <a:To s:mustUnderstand="1">
            https://YOUR_SUBDOMAIN.soap.marketingcloudapis.com/Service.asmx
        </a:To>
        <fueloauth xmlns="http://exacttarget.com">YOUR_ACCESS_TOKEN</fueloauth>
    </s:Header>
    <s:Body
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
            <Objects xsi:type="Subscriber">
                <CustomerKey>dangelo.cunningham@example.com</CustomerKey>
                <EmailAddress>dangelo.cunningham@example.com</EmailAddress>
                <Lists>
                    <ID>99887766</ID>
                </Lists>
                <Attributes>
                    <Name>First Name</Name>
                    <Value>D'Angelo</Value>
                </Attributes>
                <Attributes>
                    <Name>Last Name</Name>
                    <Value>Cunningham</Value>
                </Attributes>
                <Attributes>
                    <Name>Company</Name>
                    <Value>DreamHouse Realty</Value>
                </Attributes>
            </Objects>
        </CreateRequest>
    </s:Body>
</s:Envelope>
```

The body of the SOAP response contains information about the subscriber that you created and the list that they were added to.

```sfdocs-code {"lang":"xml", "title": "Sample SOAP Response Body"}
  <soap:Body>
    <CreateResponse xmlns="http://exacttarget.com/wsdl/partnerAPI">
      <Results>
        <StatusCode>OK</StatusCode>
        <StatusMessage>Created Subscriber.</StatusMessage>
        <OrdinalID>0</OrdinalID>
        <NewID>1106974556</NewID>
        <Object xsi:type="Subscriber">
          <PartnerKey xsi:nil="true" />
          <ID>1106974556</ID>
          <ObjectID xsi:nil="true" />
          <CustomerKey>dangelo.cunningham@example.com</CustomerKey>
          <EmailAddress>dangelo.cunningham@example.com</EmailAddress>
          <Attributes>
            <Name>First Name</Name>
            <Value>D'Angelo</Value>
          </Attributes>
          <Attributes>
            <Name>Last Name</Name>
            <Value>Cunningham</Value>
          </Attributes>
          <Attributes>
            <Name>Company</Name>
            <Value>DreamHouse Realty</Value>
          </Attributes>
          <Lists>
            <PartnerKey xsi:nil="true" />
            <ID>99887766</ID>
            <ObjectID xsi:nil="true" />
          </Lists>
        </Object>
      </Results>
      <RequestID>2206d1db-0629-4a9d-8529-8036c06943a9</RequestID>
      <OverallStatus>OK</OverallStatus>
    </CreateResponse>
  </soap:Body>
```

### Add Existing Subscriber to a List

Add an existing subscriber to a list by updating the subscriber record. This sample request updates the `List.ID` property for a specified contact.

```sfdocs-code {"lang":"xml", "title": "Sample SOAP Envelope"}
<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope
    xmlns:s="http://www.w3.org/2003/05/soap-envelope"
    xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing"
    xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <s:Header>
        <a:Action s:mustUnderstand="1">Update</a:Action>
        <a:To s:mustUnderstand="1">
            https://YOUR_SUBDOMAIN.soap.marketingcloudapis.com/Service.asmx
        </a:To>
        <fueloauth xmlns="http://exacttarget.com">YOUR_ACCESS_TOKEN</fueloauth>
    </s:Header>
    <s:Body
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <UpdateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
            <Objects xsi:type="Subscriber">
                <CustomerKey>dangelo.cunningham@example.com</CustomerKey>
                <Lists>
                    <ID>33445566</ID>
                </Lists>
            </Objects>
        </UpdateRequest>
    </s:Body>
</s:Envelope>
```

The response body includes information about the updated subscriber.

```sfdocs-code {"lang":"xml", "title": "Sample SOAP Response Body"}
  <soap:Body>
    <UpdateResponse xmlns="http://exacttarget.com/wsdl/partnerAPI">
      <Results>
        <StatusCode>OK</StatusCode>
        <StatusMessage>Updated Subscriber.</StatusMessage>
        <OrdinalID>0</OrdinalID>
        <Object xsi:type="Subscriber">
          <PartnerKey xsi:nil="true" />
          <ID>1234567890</ID>
          <ObjectID xsi:nil="true" />
          <CustomerKey>dangelo.cunningham@example.com</CustomerKey>
          <Lists>
            <PartnerKey xsi:nil="true" />
            <ID>33445566</ID>
            <ObjectID xsi:nil="true" />
          </Lists>
        </Object>
      </Results>
      <RequestID>94e3b699-0501-443a-82e0-c717154f5c1d</RequestID>
      <OverallStatus>OK</OverallStatus>
    </UpdateResponse>
  </soap:Body>
```
