# CreateContact

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.CreateContact>

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

| Name                   | Description                                                                                                                                                                                |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ContactData : `String` | <p>Key-value pairs representing contact properties as a JSON string.</p><p><br>Default: <code>-</code><br>Example: <code>{ "email": "<john@example.com>", "firstname": "John" }</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                                                                                                                                  |
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| ValidateEmail : `Boolean`        | <p>Optional. Validate email format before sending. 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 create contact.</code></p>          |
| {% endtab %}                     |                                                                                                                                              |

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

| Name                 | Description                                                                                                                                         |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Success : `Boolean`  | <p>Indicates whether contact creation was successful.<br>Example: <code>true</code></p>                                                             |
| ContactId : `String` | <p>Unique Id of the created contact.<br>Example: <code>123456789</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-25

#### Changed

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