# GetContacts

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Unknown

Source code: <https://github.com/FrendsPlatform/Frends.HubSpot/tree/main/Frends.HubSpot.GetContacts>

{% tabs %}
{% tab title="Parameter: Input" %}

| Name                    | Description                                                                                                                                                                                                           |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| FilterQuery : `String`  | <p>Optional. Filter query to narrow search results in a simple expression format: <code>property operator 'value'</code></p><p><br>Default: <code>-</code><br>Example: <code>email eq '<test@example.com>'</code></p> |
| Properties : `String[]` | <p>Optional. Specific contact properties to retrieve.</p><p><br>Default: <code>-</code><br>Example: <code>new string\[] { "email", "firstname", "lastname", "company" }</code></p>                                    |
| Limit : `Int32`         | <p>Optional. Maximum number of contacts to return.</p><p><br>Default: <code>100</code><br>Example: <code>50</code></p>                                                                                                |
| After : `String`        | <p>Optional. Paging cursor for fetching the next page.</p><p><br>Default: <code>-</code><br>Example: <code>"MjAyMy0wMS0wMVQwMDowMDowMC4wMDAtMTI6MDA"</code></p>                                                       |
| {% endtab %}            |                                                                                                                                                                                                                       |

{% tab title="Parameter: Connection" %}

| Name                | Description                                                                                                                                      |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| 🗝ApiKey : `String` | <p>HubSpot Private App access token.</p><p><br>Default: <code>-</code><br>Example: <code>xxx-xxx-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</code></p> |
| BaseUrl : `String`  | <p>Base URL for the API.</p><p><br>Default: <code>-</code><br>Example: <code><https://api.hubapi.com>.</code></p>                                |
| {% endtab %}        |                                                                                                                                                  |

{% tab title="Parameter: Options" %}

| Name                             | Description                                                                                                                                 |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| IncludeArchived : `Boolean`      | <p>Optional. Whether to include archived records. Default is false.</p><p><br>Default: <code>False</code><br>Example: <code>true</code></p> |
| ThrowErrorOnFailure : `Boolean`  | <p>Whether to throw an error on failure. True by default.</p><p><br>Default: <code>True</code><br>Example: <code>false</code></p>           |
| ErrorMessageOnFailure : `String` | <p>Overrides the error message on failure.</p><p><br>Default: <code>-</code><br>Example: <code>Failed to retrieve contacts.</code></p>      |
| {% endtab %}                     |                                                                                                                                             |

{% tab title="Result: Result" %}

| Name                      | Description                                                                                                                                         |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Success : `Boolean`       | <p>Indicates if the operation completed successfully.<br>Example: <code>true</code></p>                                                             |
| Contacts : `JToken`       | <p>Array of contact objects.<br>Example: <code>\[{ "id": "1", "properties": { "email": "<test@example.com>", "firstname": "John" } }]</code></p>    |
| HasMore : `Boolean`       | <p>Whether there are more results to retrieve.<br>Example: <code>true</code></p>                                                                    |
| NextPageCursor : `String` | <p>Cursor for next page of results, if any.<br>Example: <code>"MjAyMy0wMS0wMVQwMDowMDowMC4wMDAtMTI6MDA"</code></p>                                  |
| Error : `Error`           | <p>Error that occurred during task execution.<br>Example: <code>object { string Message, object { Exception Exception } AdditionalInfo }</code></p> |
| {% endtab %}              |                                                                                                                                                     |

{% tab title="Changelog" %}

## Changelog

### \[1.0.0] - 2025-07-30

#### Added

* Initial implementation
  {% endtab %}
  {% endtabs %}
