How to Unsubscribe a Profile

In this guide we will go through the steps of Unsubscribing a Profile.

A Profile can be unsubscribed on different levels:

  • Account

  • Section

  • Topic

Account is the top of the hierarchy and Topic the lowest. Meaning that, if you only specify the Section in your API request, you'll opt-out the Profile from the Section and all Topics in any Consent lists in the entire Section. Read more about the levels of consent...

To unsubscribe a Profile we'll need the following:

  • Valid Section from the APSIS One account. See the API to fetch Section here...

  • Valid Consent list from the Section. See the API to fetch Consent list here...

  • Valid Topic from the Consent List. See the API to fetch Topics here...

  • A Profile Key, in this case an email address

Depending on your use case you might need to alter the API request to fit your needs.

Want to add Consent to Profiles? Jump here...

The following API requests are made from this API, see the API reference for more detailed information.

Per region host names

APSIS One API is provided under different host names depending on your region. For EU use https://api.apsis.one/, for APAC call https://api-apac.apsis.one/.

Here's an example request to unsubscribe a Profile from a Topic.

curl --request POST \
  --url https://api.apsis.one/audience/channels/com.apsis1.channels.email/addresses/joachim.doe%40apsis.com/consents \
  --header 'authorization: Bearer ' \
  --data '{
  "section_discriminator": "usercreated.sections.section_nordics",
  "type": "opt-out",
  "topic_discriminator": "usercreated.topics.clothes",
  "consent_list_discriminator": "usercreated.targets.all"
}'

To unsubscribe a Profile from a Section your API request should look like the following.

curl --request POST \
  --url https://api.apsis.one/audience/channels/com.apsis1.channels.email/addresses/joachim.doe%40apsis.com/consents \
  --header 'authorization: Bearer ' \
  --data '{
  "section_discriminator": "usercreated.sections.section_nordics",
  "type": "opt-out"
}'

To unsubscribe a Profile from the Account, your API request should look like the example below.

A successful call will return a HTTP 204 No Content status code.

curl --request POST \
  --url https://api.apsis.one/audience/channels/com.apsis1.channels.email/addresses/joachim.doe%40apsis.com/consents \
  --header 'authorization: Bearer ' \
  --data '{ "type": "opt-out" }'

Need a hand?

If you encounter any issues, we suggest that you first read through the API Reference. Also, don't forget to make sure that you're up to speed with the authentication process.

Did this answer your question?