# Custom code for v1 API (Lists)

**URL:** <https://community.hubspot.com/t/custom-code-for-v1-api-lists/62561>\
**Category:** Data Hub\
**Tags:** api\
**Created:** [August 8, 2022, 4:20pm UTC](https://community.hubspot.com/t/custom-code-for-v1-api-lists/62561 "2022-08-08T16:20:31Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Teun](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/teun/32/28739_2.png) [@Teun](https://community.hubspot.com/u/Teun)\
**Post date:** [August 9, 2022, 11:05am UTC](https://community.hubspot.com/t/custom-code-for-v1-api-lists/62561/2 "2022-08-09T11:05:59Z")

</div>

Hi @PBaxter ,

I went through the github of the NodeJS API, but I can not discover a .ts file for the lists. The [discovery](https://github.com/HubSpot/hubspot-api-nodejs/tree/master/src/discovery/crm) folder is my go to place to check for all the available functions. But lists simply seem to be missing NodeJS API.  
If you are familiar with [Axios](https://github.com/axios/axios), you should be able to use that instead. Here is an example:

```lia-code-sample
const axios = require('axios');

const listData = await axios({
 method: 'get',
 url: `https://api.hubapi.com/contacts/v1/lists/1`,
 headers: {
 'Authorization': `Bearer ${process.env.authtoken}`,
 'Content-Type': 'application/json'
 }
 }).then(async (response) => {
 console.log(response.data)
 return response.data
 }).catch((error) => {
 console.log(`Error while getting list data: ${error.response.data.message}`)
 return null
 })

```

---

_[View the full topic](https://community.hubspot.com/t/custom-code-for-v1-api-lists/62561)._
