APIs & Integrations

ajinvise
Participant | Partenaire solutions Elite
Participant | Partenaire solutions Elite

Cannot delete meetings

Résolue

I am trying to delete meetings with the API. I created a bunch of meetings with endpoint

 

/crm/v3/objects/meetings

 

and stored away the IDs. Now I need to delete them but I can't get any of the examples to work.

I also tried going to a company and clicking a meetings "Copy Link" to extract a sample id to delete.

'https://app-eu1.hubspot.com/contacts/11111/company/111111/?engagement=123456789'

 

const id = '123456789'

const response = await hubspot().apiRequest({
    headers: {
        'Accept': 'application/json',
    },
    path: `/crm/v3/objects/meetings/${id}`,
    method: 'DELETE',
})

console.log(response) // 204 no content

 

Even though I get a successful response, the meeting is still there. My stored away ids does not seem to delete anything either. Maybe im confusing ids,  is meetingId equivalent to a engagementId?

It also seems it does not care if the thing to be deleted is actually deleted; I can put a non existing id like

111122223333344 and it will still give 204
 

Please help me with tips how to delete my list of ids. I am assuming I am missing something. 

0 Votes
1 Solution acceptée
ajinvise
Solution
Participant | Partenaire solutions Elite
Participant | Partenaire solutions Elite

Cannot delete meetings

Résolue

I finally solved it using axios

    const response = await axios.post(
      `https://api.hubapi.com/crm/v3/objects/meetings/batch/archive`,
      JSON.stringify({inputs: [{id: '123456789'}]}),
      {
        headers: {
          "accept": "application/json",
          "content-type": "application/json",
          "authorization": `Bearer ${env.HUBSPOT_PRIVATE_APP_TOKEN}`        
        },
      }
    )

 

Voir la solution dans l'envoi d'origine

0 Votes
1 Réponse
ajinvise
Solution
Participant | Partenaire solutions Elite
Participant | Partenaire solutions Elite

Cannot delete meetings

Résolue

I finally solved it using axios

    const response = await axios.post(
      `https://api.hubapi.com/crm/v3/objects/meetings/batch/archive`,
      JSON.stringify({inputs: [{id: '123456789'}]}),
      {
        headers: {
          "accept": "application/json",
          "content-type": "application/json",
          "authorization": `Bearer ${env.HUBSPOT_PRIVATE_APP_TOKEN}`        
        },
      }
    )

 

0 Votes