I'm working on a little integration between our app and hubspot's api.
I'm actually working on how to delete contact in our hubspot's crm, and what I understood is that I need to make a batche of contact to delete using /crm/v3/objects/contacts/batch/create and then send the id of the freshly created batch using /crm/v3/objects/contacts/batch/archive
But for now, I don't clearly understand from the doc what I need to send to create the batche.
Do I need to pass every field of my contacts into the body of the request, or just the unique identifier ?
When using the HubSpot API to create a batch of contacts for deletion, you only need to include the unique identifiers of the contacts in the request body, rather than passing every field of the contacts.
you need to provide an array of objects, where each object represents a contact and includes the unique identifier of the contact.
Replace "CONTACT_ID_1", "CONTACT_ID_2", and so on with the actual unique identifiers of the contacts you want to delete.
Once you have created the batch using the /crm/v3/objects/contacts/batch/create endpoint and obtained the batch ID, you can then use the /crm/v3/objects/contacts/batch/archive endpoint to delete the contacts in the batch by providing the batch ID in the request.
When using the HubSpot API to create a batch of contacts for deletion, you only need to include the unique identifiers of the contacts in the request body, rather than passing every field of the contacts.
you need to provide an array of objects, where each object represents a contact and includes the unique identifier of the contact.
Replace "CONTACT_ID_1", "CONTACT_ID_2", and so on with the actual unique identifiers of the contacts you want to delete.
Once you have created the batch using the /crm/v3/objects/contacts/batch/create endpoint and obtained the batch ID, you can then use the /crm/v3/objects/contacts/batch/archive endpoint to delete the contacts in the batch by providing the batch ID in the request.