I'm trying to send a SOAP request to the Marketing Cloud API so I can unsuscribe a person from a list but the response always is "Bad Request".
Here is the request I'm sending:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<UsernameToken>
<Username>--USERNAME--</Username>
<Password>--PASSWORD--</Password>
</UsernameToken>
</Security>
</soapenv:Header>
<soapenv:Body>
<UpdateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
<Objects xsi:type="Subscriber">
<EmailAddress>--PERSON EMAIL TO UNSUSCRIBE--</EmailAddress>
<Lists>
<PartnerKey xsi:nil="true"/>
<ID>59</ID>
<Status>Unsubscribed</Status>
<Action>Update</Action>
</Lists>
</Objects>
</UpdateRequest>
</soapenv:Body>
</soapenv:Envelope>
Method: POST
The endpoint is: https://XXXXXXX.soap.marketingcloudapis.com/Service.asmx
And the parameters in the header are:
Content-Type:text/xml
SOAPAction:Update
Accept:text/xml
Charset:UTF-8
Can someone tell me what I'm doing wrong please?