You are here: Communications Cloud API v1 > Resources > Subscriptions > Delete a Subscription

Delete a Subscription

DELETE to /api/account/ACCOUNT_CODE/subscriptions.xml

Example Input

For an email subscriber

<subscriber>
  <email>EMAIL@ADDRESS.COM</email>
  <send-notifications type='boolean'>false</send-notifications>
  <topics type='array'>
    <topic>
      <code>####</code>
    </topic>
    <topic>
      <code>####</code>
    </topic>
  </topics>
</subscriber>

For a wireless subscriber

<subscriber>
  <phone>###-###-####</phone>
  <country-code>#</country-code>
  <send-notifications type='boolean'>false</send-notifications>
  <topics type='array'>
    <topic>
      <code>####</code>
    </topic>
    <topic>
      <code>####</code>
    </topic>
  </topics>
</subscriber>
Example Output
<?xml version="1.0" encoding="UTF-8"?>
<subscriber>
  <to-param>dGVzdDAxQHRlc3QuZ292ZGVsaXZlcnkuY29t</to-param>
  <link rel="self" href="/api/account/ACCOUNT_CODE/subscribers/dGVzdDAxQHRlc3QuZ292ZGVsaXZlcnkuY29t"/>
  <subscriber-uri>/api/account/ACCOUNT_CODE/subscribers/dGVzdDAxQHRlc3QuZ292ZGVsaXZlcnkuY29t</subscriber-uri>
</subscriber>
Example PHP Code
Troubleshooting

Reference subscriber error codes

 

Was this page helpful? Can't find what you need? Let us know