# Contacts batch archive API is not working

**URL:** <https://community.hubspot.com/t/contacts-batch-archive-api-is-not-working/106464>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [May 4, 2024, 5:29am UTC](https://community.hubspot.com/t/contacts-batch-archive-api-is-not-working/106464 "2024-05-04T05:29:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![VKH2](https://avatars.discourse-cdn.com/v4/letter/v/e0b2c6/32.png) [@VKH2](https://community.hubspot.com/u/VKH2)\
**Post date:** [May 4, 2024, 5:29am UTC](https://community.hubspot.com/t/contacts-batch-archive-api-is-not-working/106464/1 "2024-05-04T05:29:35Z")

</div>

Hi,

We are using Hubspot Contacts batch archive API in one of our development. When we are using this API we are seeing unexpected error response and not able to understand the issue. Can anyone let me know what the issue is here. Please find below the screenshot of the API call for your reference.

 ![VKH2_0-1714800427985.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/7/97a8c719f3be6ba3ab4fba090b52c573b34ff9a0.png)

Thanks,

VKH2

---

<div class="post-metadata">

**Author:** ![SteveHTM](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stevehtm/32/22074_2.png) [@SteveHTM](https://community.hubspot.com/u/SteveHTM)\
**Post date:** [May 4, 2024, 5:07pm UTC](https://community.hubspot.com/t/contacts-batch-archive-api-is-not-working/106464/2 "2024-05-04T17:07:00Z")

</div>

@VKH2 - I’m not sure you can use the idProperty approach with this API. I only see documentation for this use of email etc. IDs for contact record read operations. You may have to use an array of cotact HubSpot ID strings.

Steve

---

<div class="post-metadata">

**Author:** ![VKH2](https://avatars.discourse-cdn.com/v4/letter/v/e0b2c6/32.png) [@VKH2](https://community.hubspot.com/u/VKH2)\
**Post date:** [May 4, 2024, 5:44pm UTC](https://community.hubspot.com/t/contacts-batch-archive-api-is-not-working/106464/3 "2024-05-04T17:44:53Z")

</div>

Hi Steve,

Thank you for the reply. I modified and tried with the same payload as mentioned in the official documentation but am still getting the same response. Not sure if the issue is in the way i am sending the payload. Can you let me know. Also please help me to understand the error response we are getting.

 ![VKH2_0-1714844433457.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/8/8/88f30032768737231414821a5f9ad236e164d275.png)

Thanks,

VKH2

---

<div class="post-metadata">

**Author:** ![SteveHTM](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stevehtm/32/22074_2.png) [@SteveHTM](https://community.hubspot.com/u/SteveHTM)\
**Post date:** [May 5, 2024, 2:17pm UTC](https://community.hubspot.com/t/contacts-batch-archive-api-is-not-working/106464/4 "2024-05-05T14:17:23Z")

</div>

I believe you need to use the numeric HubSpot oobject id string rather than the email address in the parameters.

Steve

---

<div class="post-metadata">

**Author:** ![VKH2](https://avatars.discourse-cdn.com/v4/letter/v/e0b2c6/32.png) [@VKH2](https://community.hubspot.com/u/VKH2)\
**Post date:** [May 6, 2024, 8:49am UTC](https://community.hubspot.com/t/contacts-batch-archive-api-is-not-working/106464/5 "2024-05-06T08:49:31Z")

</div>

Hi Steve,

Thanks for the reply. I see what you mean, we need to provide contact id for the contacts batch archive API to work.

But the payload with email was working earlier(attached below). _Can you let me know if there was a change in the api payload_. This payload has started breaking recently.

**payload : {“inputs”:[{“id”:“[test1@test.com](mailto:test1@test.com)”},{“id”:“[test2@test.com](mailto:test2@test.com)”}],“properties”:{}}**

Thanks,

VKH2
