# Opt out fields not in contact JSON data

**URL:** <https://community.hubspot.com/t/opt-out-fields-not-in-contact-json-data/11468>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [October 9, 2018, 11:18pm UTC](https://community.hubspot.com/t/opt-out-fields-not-in-contact-json-data/11468 "2018-10-09T23:18:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [October 9, 2018, 11:18pm UTC](https://community.hubspot.com/t/opt-out-fields-not-in-contact-json-data/11468/1 "2018-10-09T23:18:51Z")

</div>

Unable to find field in API

We are looking to use the API to get contact properties for opt-out, however I am not finding them in the payload. Example:  
[https://api.hubapi.com/contacts/v1/contact/email/steve.hall@kavokerr.com/profile?hapikey=XXXX](https://api.hubapi.com/contacts/v1/contact/email/steve.hall@kavokerr.com/profile?hapikey=XXXX)

Looking for the following:  
hs\_email\_optout\_4849582  
hs\_email\_optout\_4849490  
hs\_email\_optout\_4849481

I do see other hs\_email\_optout\_##### fields but they do not match the numeric value I’m looking for.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [October 10, 2018, 3:25pm UTC](https://community.hubspot.com/t/opt-out-fields-not-in-contact-json-data/11468/2 "2018-10-10T15:25:48Z")

</div>

Hi [@stevehall13](https://community.hubspot.com/u/stevehall13),

The [Get email subscription types](https://developers.hubspot.com/docs/methods/email/get_subscriptions) endpoint doesn’t return any subscriptions matching those values for portal **547876** , so we wouldn’t expect them to exist on a contact record, either.

The only `subscriptionId` values returned are:

- `842354`
- `411679`
- `474233`
- `787858`
- `809876`
- `770193`
- `892194`
- `5341689`
- `411678`
- `623347`

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [October 10, 2018, 5:56pm UTC](https://community.hubspot.com/t/opt-out-fields-not-in-contact-json-data/11468/3 "2018-10-10T17:56:34Z")

</div>

Then I’m confused. I’m looking to retrieve the following contact properties (as listed in Contacts \> Property-Settings). These are all listed as HubSpot fields and not user created fields. I don’t know what the numeric value at the end of the internal name represents.

Label: Opted out of email: Postal Mail  
Internal name: hs\_email\_optout\_4849582

Label: Opted out of email: Telephone  
Internal name: hs\_email\_optout\_4849490

Label: Opted out of email: Fax  
Internal name: hs\_email\_optout\_4849481

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [October 10, 2018, 6:03pm UTC](https://community.hubspot.com/t/opt-out-fields-not-in-contact-json-data/11468/4 "2018-10-10T18:03:40Z")

</div>

Hi [@stevehall13](https://community.hubspot.com/u/stevehall13),

Can you send me links to where you’re seeing these properties? I searched portal `547876`’s [contact properties](https://app.hubspot.com/property-settings/547876/contact) and found no such properties.

The string following `hs_email_optout_` is the ID of the subscription type. Per my last post, those subscriptions don’t exist according to the API.

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [October 15, 2018, 5:12pm UTC](https://community.hubspot.com/t/opt-out-fields-not-in-contact-json-data/11468/5 "2018-10-15T17:12:05Z")

</div>

Urls to the property pages are below. We have multiple portals so this is not for Portal ID 547876.

[https://app.hubspot.com/property-settings/163861/contact/hs\_email\_optout\_4849490](https://app.hubspot.com/property-settings/163861/contact/hs_email_optout_4849490)  
[https://app.hubspot.com/property-settings/163861/contact/hs\_email\_optout\_4849582](https://app.hubspot.com/property-settings/163861/contact/hs_email_optout_4849582)  
[https://app.hubspot.com/property-settings/163861/contact/hs\_email\_optout\_4849481](https://app.hubspot.com/property-settings/163861/contact/hs_email_optout_4849481)

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [October 15, 2018, 6:30pm UTC](https://community.hubspot.com/t/opt-out-fields-not-in-contact-json-data/11468/6 "2018-10-15T18:30:37Z")

</div>

Thank you for the links, [@stevehall13](https://community.hubspot.com/u/stevehall13).

In the future, please always include the Hub ID you are referring to. I have no way to see this on my end. I inferred that you were working in portal **547876** because you included your [kavokerr.com](http://kavokerr.com) email in the first post.

Properties which have unknown values (unlike `null` values) do _not_ appear in a contact’s API data. [Your test contact record](https://app.hubspot.com/contacts/163861/contact/26976188/?interaction=note) has unknown values for subscriptions

- `hs_email_optout_4849582`
- `hs_email_optout_4849490`
- `hs_email_optout_4849481`

because it was created manually and isn’t currently subscribed to anything other than `hs_email_optout_15589`:

![]()

Unknown values.jpg875x467 80.2 KB

The other three `hs_email_optout` properties which appear in the response for [this contact](https://app.hubspot.com/contacts/163861/contact/26976188/?interaction=note):

- `hs_email_optout_351215`: “Opted out of email: KaVo Dental Blog Subscription”
- `hs_email_optout_352375`: “Opted out of email: Newsletters”
- `hs_email_optout_912672`: “Opted out of email: Try KaVo”

belong to [inactive subscription types](https://app.hubspot.com/settings/163861/marketing/email/types).

Unknown property values are excluded from JSON payloads for other properties as well. For example, your test contact has no value for the [Annual revenue](https://app.hubspot.com/property-settings/163861/contact/annualrevenue) property, so `annualrevenue` is also completely absent from the JSON.

Most organically-created contacts like [this one](https://app.hubspot.com/contacts/163861/contact/61899938/?interaction=note) should have all of their `hs_email_optout` properties visible in the payload, however.
