# Archive contact by email

**URL:** <https://community.hubspot.com/t/archive-contact-by-email/72307>\
**Category:** APIs & Integrations\
**Created:** [January 5, 2023, 6:08pm UTC](https://community.hubspot.com/t/archive-contact-by-email/72307 "2023-01-05T18:08:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SCalderwood](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@SCalderwood](https://community.hubspot.com/u/SCalderwood)\
**Post date:** [January 5, 2023, 6:08pm UTC](https://community.hubspot.com/t/archive-contact-by-email/72307/1 "2023-01-05T18:08:59Z")

</div>

Is it possible to archive a contact by email?

Referring to:

[CRM API | Contacts (hubspot.com)](https://developers.hubspot.com/docs/api/crm/contacts)

**DELETE** /crm/v3/objects/contacts/{contactId}

This works in Ruby for an update:

`api_client.crm.contacts.basic_api.update(id_property: 'email', contact_id: "email@example.com, body: body)`

But does not work for archiving:

`api_client.crm.contacts.basic_api.archive(id_property: 'email', contact_id: "email@example.com")`

Error response from HubSpot API is

`Response body: {"status":"error","message":"Object not found. objectId are usually numeric.","correlationId":"a1f1f96d-9d1a-496e-a962-93aea9d0598b","context":{"id":["email@example.com"]},"category":"OBJECT_NOT_FOUND"}`

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [January 9, 2023, 6:38pm UTC](https://community.hubspot.com/t/archive-contact-by-email/72307/2 "2023-01-09T18:38:01Z")

</div>

Hi, @SCalderwood 👋 I can confirm this isn’t a feature. I tried using the v1 and v3 endpoints with no success. I also tried including the email and idProperty=email as a query param, but that did not work either.

Postman example of my request:

`DELETE https://api.hubapi.com/crm/v3/objects/contacts/jaycee3+test@gmail.com?archived=false&idProperty=email`

Response

```lia-code-sample
{
 "status": "error",
 "message": "Object not found. objectId are usually numeric.",
 "correlationId": "14449d10-99ef-4efd-9ee9-250bf6a70f0a",
 "context": {
 "id": [
 "jaycee3+test@gmail.com"
 ]
 },
 "category": "OBJECT_NOT_FOUND"
}

```

If you have a moment, adding your suggestion to the [Ideas Community](https://community.hubspot.com/t5/HubSpot-Ideas/idb-p/HubSpot_Ideas) and getting some upvotes will be very helpful in getting your suggestion in front of the Product team. If you add a link back to your Idea post, I’ll be sure to give it an upvote to help get the ball rolling.

Best,

Jaycee

---

<div class="post-metadata">

**Author:** ![SCalderwood](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@SCalderwood](https://community.hubspot.com/u/SCalderwood)\
**Post date:** [January 9, 2023, 6:47pm UTC](https://community.hubspot.com/t/archive-contact-by-email/72307/3 "2023-01-09T18:47:09Z")

</div>

Thanks, Jaycee! Here ya go: [HubSpot Community - Allow Archiving Contact By Email - HubSpot Community](https://community.hubspot.com/t5/HubSpot-Ideas/Allow-Archiving-Contact-By-Email/idi-p/738974#M132151)
