> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Hubspot Batch Read Record List Memberships: Inputs, Cost &

> Batch fetch HubSpot list memberships for many CRM records. Includes inputs, outputs, pricing notes, Deepline CLI examples, and GTM automation guidance.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=hubspot_batch_read_record_list_memberships:{"object_type_id":"{{object_type_id}}","record_ids":"{{record_ids}}"}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                     | Type     | Required | Default | Description                                             |
| ------------------------ | -------- | -------- | ------- | ------------------------------------------------------- |
| `payload.object_type_id` | `string` | Yes      |         | HubSpot object type ID, for example `0-1` for contacts. |
| `payload.record_ids`     | `array`  | Yes      |         | HubSpot record IDs to inspect for list memberships.     |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Fetch HubSpot list memberships for multiple CRM records in one request.",
    "properties": {
      "object_type_id": {
        "type": "string",
        "description": "HubSpot object type ID, for example `0-1` for contacts."
      },
      "record_ids": {
        "type": "array",
        "description": "HubSpot record IDs to inspect for list memberships.",
        "minItems": 1,
        "maxItems": 100,
        "items": {
          "type": "string"
        }
      }
    },
    "required": [
      "object_type_id",
      "record_ids"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name          | Type     | Required | Default | Description                                    |
| ------------- | -------- | -------- | ------- | ---------------------------------------------- |
| `result.data` | `record` | Yes      |         | Provider response payload.                     |
| `result.meta` | `record` | No       |         | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "additionalProperties": {}
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": {}
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute hubspot_batch_read_record_list_memberships --payload '{
  "object_type_id": "string",
  "record_ids": "array"
}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Provider API Context

<details>
  <summary>Show provider reference (optional)</summary>

  ````md theme={null}
  Source: https://developers.hubspot.com/docs/cms/start-building/features/memberships/overview Memberships is a feature that makes it possible to require visitors to have an account in order to access content. &lt;Accordion title="Supported products" icon="cubes"> &lt;SupportedProducts /> &lt;/Accordion> Memberships is a feature that makes it possible to require visitors to have an account in order to access content. The account system leverages the HubSpot CRM and CRM Lists together with the ability for a visitor to create a password for their account. Marketers can easily [create pages on their sites that only contacts on specific lists in the CRM can access](https://knowledge.hubspot.com/cms-pages-editor/control-audience-access-to-pages). You can additionally restrict access to [knowledge base articles](https://knowledge.hubspot.com/cms-pages-editor/control-audience-access-to-pages#set-up-membership-registration-for-your-knowledge-base) and [blogs](https://knowledge.hubspot.com/cms-pages-editor/control-audience-access-to-pages#set-up-membership-registration-for-your-blog) using memberships. ## Membership user flow When contacts are granted access to content, which can occur when they join lists or though manual assignment, they are sent an email to register for your website, where they set a password to access content they have permission to access. Imagine a gym, which wishes to allow visitors to register for classes and view the classes they have registered for. When a visitor registers for a class, the form submission creates a contact in the HubSpot CRM and that contact is added to a list based on the form submission, which is used to grant access to a "My Events" page. &lt;Frame> &lt;img alt="An example gym registration." /> &lt;/Frame> The visitor receives a membership registration email that allows them to create a password for their membership account. &lt;Frame> &lt;img alt="Registration form" /> &lt;/Frame> Now, when the visitors log in to their account, the user can log in to the private "My Events" page using the email and password they set. Because the visitor is logged in, the developer who created the private content can render data about the logged in contact using data from the CRM. &lt;Frame> &lt;img alt="A visitor uses their account to log in and see classes they registered for." /> &lt;/Frame> ## Membership HubL variables For some businesses, it may make sense to show different content based on if a user is signed in or not. There are HubL variables which developers can use to check to see if a contact is currently logged in on a website. The HubL variable [`request_contact.is_logged_in`](/cms/reference/hubl/variables#website-pages-variables) indicates if the current visitor is signed in to the website through memberships. It can be used within an `if` statement to conditionally render certain content, allowing you to individually cater your visitor's experience. ```hubl theme={null} {% if request_contact.is_logged_in %} You're signed in! {% else %} &lt;a href="https://developers.hubspot.com/docs/_hcms/mem/login">Log In&lt;/a> {% endif %} ``` If you want to display different content on the same page based on list membership, you can check the signed-in contacts list memberships using [`request_contact.list_memberships`](/cms/reference/hubl/variables#website-pages-variables) HubL variable, which returns a dict of list IDs the logged in contact is a member of. &lt;Info> To personalize content without using memberships, you can use the [contact variable](/cms/reference/hubl/variables#general-variables) if a visitor has submitted a form on your website. &lt;/Info> ## CRM object HubL functions In addition to general content displayed conditionally on a page, it’s possible to pull information about objects within your HubSpot account such as contacts, companies, deals, and products using the functions: * [CRM Associations](/cms/reference/hubl/functions#crm-associations) * [CRM Object](/cms/reference/hubl/functions#crm-object) * [CRM Objects](/cms/reference/hubl/functions#crm-objects) For security purposes, only product and marketing event objects can be retrieved on a publicly accessible page; to pull information about other object types, a page must be behind membership. ```hubl theme={null} {% if request_contact.is_logged_in %} {% set membership_contact = crm_object('contact', request.contact.contact_vid, 'firstname,lastname') %} Welcome back, {{ membership_contact.firstname }} {{ membership_contact.lastname }} {% else %} &lt;a href="https://developers.hubspot.com/docs/_hcms/mem/login">Log In&lt;/a> {% endif %} ``` ## Private blog posts with self-registration When you [enable self-registration for private blog content](https://knowledge.hubspot.com/blog/use-self-registration-for-private-blog-content), you can limit access to specific blog posts so that visitors must register to view them. On the blog listing page, posts enabled for self-registration will display with a lock icon when using the default blog listing module. &lt;Frame> &lt;img alt="locked-post-listing-page" /> &lt;/Frame> In the blog post, the content above the Read More separator will display, then prompt the user to log in to keep reading. Visitors can then sign up to read the rest of the blog post. &lt;Frame> &lt;img alt="blog-post-locked" /> &lt;/Frame> ### Customization with HubL If you're using HubSpot's default blog listing module, the lock icon styling is handled for you. However, if you want to build your own solution with HubL, you can use the [flag\_content\_for\_access\_check](/cms/reference/hubl/functions#flag-content-for-access-check) function to check whether or not a blog post is visible to the currently logged in visitor. If the user is not currently logged in, the function will check whether the blog post is private. When called, the function is replaced with the following attribute, which shows whether the visitor has access to the content: `hs-member-content-access=&lt;true/false>` When `true`, the content is private and cannot be viewed by a viewer who is not

  &lt;Note>
  Provider reference truncated for page speed. Use the provider's official docs for the full upstream reference.
  &lt;/Note>
  ````
</details>

## Cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.
* Billing mode: `no_bill`.
