# Contacts

## Create Contact

<mark style="color:green;">`POST`</mark> `https://api.iphub.com.au/api/v1/contacts`

Creates a contact or updates an existing contact.

#### Query Parameters

| Name           | Type   | Description      |         |                                                                                                                 |
| -------------- | ------ | ---------------- | ------- | --------------------------------------------------------------------------------------------------------------- |
| updateExisting | string | <p>'phoneNumber' | 'email' | 'userId'<br><br>If a contact is found with the matching field above, it will be updated instead of created.</p> |

#### Headers

| Name          | Type   | Description                                                 |
| ------------- | ------ | ----------------------------------------------------------- |
| Authorization | string | Authentication token of the form \`bearer ${sessionToken}\` |

#### Request Body

| Name         | Type   | Description                                                            |
| ------------ | ------ | ---------------------------------------------------------------------- |
| firstName    | string | First Name                                                             |
| lastName     | string | Last Name                                                              |
| company      | string | Company                                                                |
| email        | string | Email                                                                  |
| phoneNumbers | array  | <p>Array of phone numbers eg)<br>\['+61404123456', '+61433222444']</p> |
| customFields | object | <p>Key Value object of custom fields<br>{'example': 'some\_value'}</p> |
| userId       | string | User ID in your database or CRM                                        |
| tags         | array  | Array of custom tags. This can be used to trigger flows.               |

{% tabs %}
{% tab title="200 " %}

```
{
    id: string
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.thinkpickle.com.au/api/contacts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
