How can I recreate a custom object after delete?

Correction: There is a way to do it without the customObjectId, found here! Phew!

https://api.hubapi.com/crm/v3/schemas/{objectType}?archived=true

Apparently the purge endpoint is deprecated.