I’m currently facing an issue: when I update a field name in field.json, the API still returns the old fields, which is confusing. Is there a way to make it return only the fields defined in the file?
Hi there,
Thanks for reaching out to the Community!
I would like to invite some members of our community who may offer valuable insights.— hey @evaldas , @sylvain_tirreau , @SteveHTM - Could you share your advice?
Thanks for taking a look!
Diana
How do you modify the contents of the json file?
Hello,
Here are some things that I would suggest to look into:
First thing to confirm is that the local updates and been pushed and published to HubSpot. When you update a module’s fields.json locally, those changes don’t automatically replace the schema that HubSpot has cached on its servers. That’s why your API calls keep returning the “old” fields even though you’ve renamed them in your local file. To get the API to reflect only what’s now in fields.json, follow these steps:
-
Re-publish the module (or theme) to HubSpot
- If you’re using the CMS CLI, run hs upload <path-to-your-module> (or hs watch) to push your updated fields.json upstream.
- If you built the module in the Design Manager UI, open your module, click Actions → Download, overwrite your local fields.json, then Actions → Upload.
-
Clear the server cache
After you publish, HubSpot still holds a cached copy of the module schema. To clear it, append ?cacheBust=<timestamp> to your preview URLs (or call any API endpoint with that query string). For example:
GET https://api.hubapi.com/cms/v3/extensions/modules/{moduleId}/fields.json?cacheBust=1623498765
That cacheBust parameter forces HubSpot to reload your latest fields.json.
- Verify via the Fields API
Fetch the module’s fields directly to confirm only your new names exist:
curl \ -H “Authorization: Bearer YOUR_ACCESS_TOKEN” \ “https://api.hubapi.com/cms/v3/extensions/modules/{moduleId}/fields?cacheBust=$(date +%s)”
You should now see exactly the names and definitions in your fields.json, no extras.
- If you’re talking about CRM object properties instead
Remember that editing a local fields.json won’t change your CRM schema. You must use the Properties API to create, update, or delete custom properties. For example, to delete an old property:
curl -X DELETE \ -H “Authorization: Bearer YOUR_ACCESS_TOKEN” \ “https://api.hubapi.com/crm/v3/properties/contacts/old_property_name”
And to list only active (non-archived) properties:
curl \ -H “Authorization: Bearer YOUR_ACCESS_TOKEN” \ “https://api.hubapi.com/crm/v3/properties/contacts?archived=false”
TL;DR: Pushing your updated fields.json is just the first step. You must re-publish your module (or theme) and bust HubSpot’s cache before the Fields API will return only the fields you’ve defined. If you’re dealing with CRM properties instead, use the Properties API to manage what shows up.
Let me know if this helps, or if you have any other questions!
Was I able to help answer your question? Help the community by marking it as a solution.
| Brandon Woodruff Senior Software Developer @ PearagonStill have questions? Reach out at brandon@pearagon.com ![]() |
@09747 - Assuming that @BrandonWoodruff hasd not covered your topic, I’d like to better understand what you are looking for here. Would you mind expanding on “the content” and “the API” you are referencing in your question?
Steve


