# Custom Property Not Working via API

**URL:** <https://community.hubspot.com/t/custom-property-not-working-via-api/130431>\
**Category:** APIs & Integrations\
**Tags:** professional\
**Created:** [April 23, 2025, 8:15pm UTC](https://community.hubspot.com/t/custom-property-not-working-via-api/130431 "2025-04-23T20:15:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdevogel](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jdevogel/32/59606_2.png) [@jdevogel](https://community.hubspot.com/u/jdevogel)\
**Post date:** [April 23, 2025, 8:15pm UTC](https://community.hubspot.com/t/custom-property-not-working-via-api/130431/1 "2025-04-23T20:15:40Z")

</div>

I’ve created a single-send email, used {{ custom.tracking\_number }} in a raw HTML block, published it, and sent a POST to /email/public/v1/singleEmail/send with that custom property, and I still get MISSING\_TEMPLATE\_PROPERTIES.

Defining it like so:

body = {  
“emailId”: 189265578342,  
“message”: {  
“to”: “[jdevogel@arborwear.com](mailto:jdevogel@arborwear.com)”,  
“customProperties”: {  
“tracking\_number”: “449044304137821”  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![DilionSmith](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dilionsmith/32/29528_2.png) [@DilionSmith](https://community.hubspot.com/u/DilionSmith)\
**Post date:** [April 24, 2025, 1:05am UTC](https://community.hubspot.com/t/custom-property-not-working-via-api/130431/2 "2025-04-24T01:05:04Z")

</div>

Try using a known working default property (like {{ contact.firstname }}) in the email temporarily, and send the same request using a contact with a known firstname. If that works, the issue might be with the customProperties.

---

<div class="post-metadata">

**Author:** ![MichaelMa](https://avatars.discourse-cdn.com/v4/letter/m/b5ac83/32.png) [@MichaelMa](https://community.hubspot.com/u/MichaelMa)\
**Post date:** [April 24, 2025, 1:16pm UTC](https://community.hubspot.com/t/custom-property-not-working-via-api/130431/3 "2025-04-24T13:16:44Z")

</div>

Your customProperties is in the wrong location in the JSON payload. You currently have it put in the “message” key while it should be at the root:

I formatted your payload to make it easier to see::

```lia-code-sample
{
 "emailId": 189265578342,
 "message": {
 "to": "jdevogel@arborwear.com",
 "customProperties": {
 "tracking_number": "449044304137821"
 }
 }
}

```

Move custom properties outside of message and into the top level of the payload:

```lia-code-sample
{
 "emailId": 189265578342,
 "message": {
 "to": "jdevogel@arborwear.com"
 },
 "customProperties": {
 "tracking_number": "449044304137821"
 }
}

```

Sample payload from docs:

> **[Accounts Dashboard | HubSpot](https://app.hubspot.com/myaccounts?next=developerdocs&redirect=%2Fapi-reference%2Fmarketing-single-send-v4%2Fguide)**

```lia-code-sample
{
 "emailId": 4126643121,
 "message": {
 "to": "jdoe@hubspot.com"
 "sendId": "6"
 },
 "customProperties": {
 "purchaseUrl": "https://example.com/link-to-product",
 "productName": "vanilla"
 }
}

```

---

<div class="post-metadata">

**Author:** ![jdevogel](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jdevogel/32/59606_2.png) [@jdevogel](https://community.hubspot.com/u/jdevogel)\
**Post date:** [April 24, 2025, 1:40pm UTC](https://community.hubspot.com/t/custom-property-not-working-via-api/130431/4 "2025-04-24T13:40:21Z")

</div>

I figured this out. Default properties worked fine. The documentation was either wrong or inconsistent.

Had to send as a list of objects rather than a dictionary.

This does not work (dictionary - as per docs):  
“customProperties”: {  
“tracking\_number”: tracking\_number  
}

This does work (list of objects):  
“customProperties”: [  
{  
“name”: “tracking\_number”,  
“value”: tracking\_number  
}  
]
