Im preparing a migration to Hubspot in a sandbox. There are a lot of trial and errors so I would sometime like to wipe all objects via code. Either by specifying an object type to "truncate" or by resetting the sandbox via API.
Is this even possible? So far I only saw some button in the GUI, and the batch archive endpoint.
In both cases, the deleted records move to a portal's recycling bin and can either be restored, if needed, or they will auto-delete after 90 days.
For the Contact object specifically, you can preform full GDPR deletion which will take effect immediately, but this doesn't apply to other objects such as Deals or Companies — Perform a GDPR delete in HubSpot