# Delete association label

**URL:** <https://community.hubspot.com/t/delete-association-label/126391>\
**Category:** APIs & Integrations\
**Tags:** developer-tools, sdk\
**Created:** [February 19, 2025, 2:49pm UTC](https://community.hubspot.com/t/delete-association-label/126391 "2025-02-19T14:49:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChristoV](https://avatars.discourse-cdn.com/v4/letter/c/e56c9b/32.png) [@ChristoV](https://community.hubspot.com/u/ChristoV)\
**Post date:** [February 19, 2025, 2:49pm UTC](https://community.hubspot.com/t/delete-association-label/126391/1 "2025-02-19T14:49:31Z")

</div>

I am attempting to delete an association label between companies and a custom entity.

From Postman, the following works successfully:

POST [https://api.hubapi.com/crm/v4/associations/2-122116974/0-2/batch/labels/archive](https://api.hubapi.com/crm/v4/associations/2-122116974/0-2/batch/labels/archive)

```lia-code-sample
{
 "inputs": [
 {
 "types": [
 {
 "associationCategory": "USER_DEFINED",
 "associationTypeId": 81
 }
 ],
 "from": {
 "id": "3123974637"
 },
 "to": {
 "id": "6003640801"
 }
 }
 ]
}

```

When I attemp to do this in NodeJS, I get a response of 204, but the code does not seem to have an effect:

```lia-code-sample
const hubspot = require('@hubspot/api-client');

const hubspotClient = new hubspot.Client({"accessToken":"YOUR_ACCESS_TOKEN"});

const BatchInputPublicAssociationMultiPost = { inputs: [{"types":[{"associationCategory":"HUBSPOT_DEFINED","associationTypeId":81}],"_from":{"id":"3123974637"},"to":{"id":"6003640801"}}] };
const fromObjectType = "2-122116974";
const toObjectType = "0-2";

try {
 const apiResponse = await hubspotClient.crm.associations.v4.batchApi.archiveLabels(fromObjectType, toObjectType, BatchInputPublicAssociationMultiPost);
 console.log(JSON.stringify(apiResponse, null, 2));
} catch (e) {
 e.message === 'HTTP request failed'
 ? console.error(JSON.stringify(e.response, null, 2))
 : console.error(e)
}

```

---

<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:** [February 19, 2025, 8:38pm UTC](https://community.hubspot.com/t/delete-association-label/126391/2 "2025-02-19T20:38:51Z")

</div>

@ChristoV - forgive me if I’m reading anything wrongly here, but in the Postman example the association ID is USER\_DEFINED - as you might expect, but in the JS its HUBSPOT\_DEFINED.

Hope this is helpful.

Steve

---

<div class="post-metadata">

**Author:** ![ChristoV](https://avatars.discourse-cdn.com/v4/letter/c/e56c9b/32.png) [@ChristoV](https://community.hubspot.com/u/ChristoV)\
**Post date:** [February 24, 2025, 5:52am UTC](https://community.hubspot.com/t/delete-association-label/126391/3 "2025-02-24T05:52:46Z")

</div>

Hi Steve,

Well spotted! Thank you. I completely missed this.
