> For the complete documentation index, see [llms.txt](https://documentation.proto.cx/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.proto.cx/docs/developers/apis/customers-api.md).

# Customers API

{% hint style="warning" %}
Note that "customer" is a legacy term for an audience member, now referred to more generically as "people" or "persons" in the current platform and documentation.
{% endhint %}

### [**Get customer**](https://v3-api.proto.cx/api/platform/v1/docs#/v1/get_customer_v1_customers__subcompany_id__customer__provided_unique_id__get_customer_get)

{% code title="URL" overflow="wrap" %}

```
GET https://v3-api.proto.cx/api/platform/v1/customers/{subcompany_id}/customer/{provided_unique_id}/get-customer
```

{% endcode %}

{% code title="Returns" overflow="wrap" %}

```
A JSON dictionary of all customer information other than their associated custom field values. 
```

{% endcode %}

<table><thead><tr><th width="199">Parameters</th><th width="124">Data Type</th><th width="118" data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td>subcompany_id</td><td>string</td><td>true</td><td>subcompany_id from Proto</td></tr><tr><td>provided_unique_id</td><td>string</td><td>true</td><td>user's provided_unique_id</td></tr><tr><td>authorization</td><td></td><td>true</td><td></td></tr></tbody></table>

### [**Insert customer**](https://v3-api.proto.cx/api/platform/v1/docs#/v1/upsert_customer_v1_customers__subcompany_id__create_customer__provided_unique_id__put)

{% code title="URL" overflow="wrap" %}

```
PUT https://v3-api.proto.cx/api/platform/v1/customers/{subcompany_id}/create-customer/{provided_unique_id}
```

{% endcode %}

{% code title="Body" overflow="wrap" %}

```
{
  "external_customer_id": "string" (optional),
  "name": "string" (optional),
  "location": "string" (optional),
  "email": "string" (optional),
  "phone_number": "string" (optional),
  "avatar": "string" (optional)
}
```

{% endcode %}

{% code title="Returns" overflow="wrap" %}

```
A JSON dictionary of the created customer.
```

{% endcode %}

### [**Add tags**](https://v3-api.proto.cx/api/platform/v1/docs#/v1/add_customer_tags_v1_customers__subcompany_id__customer__provided_unique_id__add_tags_put)

{% code overflow="wrap" %}

```
PUT https://v3-api.proto.cx/api/platform/v1/customers/{subcompany_id}/customer/{provided_unique_id}/add-tags
```

{% endcode %}

{% hint style="warning" %}
Use **create\_if\_not\_exists** to also create any tags that do not exist before applying it to the customer.
{% endhint %}

### [**Add custom fields**](https://v3-api.proto.cx/api/platform/v1/docs#/v1/add_customer_custom_fields_v1_customers__subcompany_id__customer__provided_unique_id__add_custom_fields_put)

{% code overflow="wrap" %}

```
PUT https://v3-api.proto.cx/api/platform/v1/customers/{subcompany_id}/customer/{provided_unique_id}/add-custom-fields
```

{% endcode %}

{% hint style="warning" %}
One of **id** or **name** must be provided for each custom field element in the request body. The **id** of a custom field can be retrieved from listing or creating a new custom field.
{% endhint %}

***
