# \ContactsApi
All URIs are relative to *https://zernio.com/api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**bulk_create_contacts**](ContactsApi.md#bulk_create_contacts) | **POST** /v1/contacts/bulk | Bulk create contacts
[**create_contact**](ContactsApi.md#create_contact) | **POST** /v1/contacts | Create contact
[**delete_contact**](ContactsApi.md#delete_contact) | **DELETE** /v1/contacts/{contactId} | Delete contact
[**get_contact**](ContactsApi.md#get_contact) | **GET** /v1/contacts/{contactId} | Get contact
[**get_contact_channels**](ContactsApi.md#get_contact_channels) | **GET** /v1/contacts/{contactId}/channels | List channels for a contact
[**list_contacts**](ContactsApi.md#list_contacts) | **GET** /v1/contacts | List contacts
[**update_contact**](ContactsApi.md#update_contact) | **PATCH** /v1/contacts/{contactId} | Update contact
## bulk_create_contacts
> models::BulkCreateContacts200Response bulk_create_contacts(bulk_create_contacts_request)
Bulk create contacts
Import up to 1000 contacts at a time. Skips duplicates, merging any new tags onto the existing contact. accountId is required whenever contacts carry a platformIdentifier (or a row-level accountId); platform is always derived from the resolved account, never used to decide whether channels are created, and a mismatched platform 404s as account not found. When accountId is set, each contact must carry a platformIdentifier; a row missing it is rejected individually (reported in errors[], HTTP 200), not a 400 for the whole import. On phone platforms (whatsapp, sms) the platformIdentifier is normalized to digits and a value that is not phone-shaped is rejected per contact and reported in errors[], not imported.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**bulk_create_contacts_request** | [**BulkCreateContactsRequest**](BulkCreateContactsRequest.md) | | [required] |
### Return type
[**models::BulkCreateContacts200Response**](bulkCreateContacts_200_response.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## create_contact
> models::CreateContact200Response create_contact(create_contact_request)
Create contact
Create a new contact. Optionally create a platform channel in the same request by providing accountId, platform, and platformIdentifier.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**create_contact_request** | [**CreateContactRequest**](CreateContactRequest.md) | | [required] |
### Return type
[**models::CreateContact200Response**](createContact_200_response.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## delete_contact
> delete_contact(contact_id)
Delete contact
Permanently deletes a contact and all associated channels.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**contact_id** | **String** | | [required] |
### Return type
(empty response body)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_contact
> models::GetContact200Response get_contact(contact_id)
Get contact
Returns a contact with all associated messaging channels.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**contact_id** | **String** | | [required] |
### Return type
[**models::GetContact200Response**](getContact_200_response.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_contact_channels
> models::GetContactChannels200Response get_contact_channels(contact_id)
List channels for a contact
Returns all messaging channels linked to a contact (e.g. Instagram DM, Telegram, WhatsApp).
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**contact_id** | **String** | | [required] |
### Return type
[**models::GetContactChannels200Response**](getContactChannels_200_response.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## list_contacts
> models::ListContacts200Response list_contacts(profile_id, account_id, search, tag, tags, platform, is_subscribed, limit, skip)
List contacts
List and search contacts for a profile. Supports filtering by tags, platform, subscription status, and text search on name, email and company.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**profile_id** | Option<**String**> | Filter by profile. Omit to list across all profiles. Matches the profile recorded on the contact itself, which is set when the contact is created and is independent of the profile its account currently belongs to. Filter by accountId to list a contact through its channel instead. | |
**account_id** | Option<**String**> | Filter by the SocialAccount that owns the contact channel. Contacts are resolved through their channels, so the profileId contact filter is not applied while accountId is set. A profileId sent alongside is still access-checked and still scopes the returned filters.tags list. | |
**search** | Option<**String**> | Case-insensitive substring match on the contact name, email and company. Phone numbers and other platform identifiers are not matched: they live on the contact channel, not on the contact. To reach a contact from an inbox webhook, use the conversation.contactId it already carries. | |
**tag** | Option<**String**> | | |
**tags** | Option<**String**> | Comma-separated tags, matches contacts carrying any of them | |
**platform** | Option<**String**> | | |
**is_subscribed** | Option<**String**> | | |
**limit** | Option<**i32**> | | |[default to 50]
**skip** | Option<**i32**> | | |[default to 0]
### Return type
[**models::ListContacts200Response**](listContacts_200_response.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## update_contact
> models::UpdateContact200Response update_contact(contact_id, update_contact_request)
Update contact
Update one or more fields on a contact. Only provided fields are changed.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**contact_id** | **String** | | [required] |
**update_contact_request** | Option<[**UpdateContactRequest**](UpdateContactRequest.md)> | | |
### Return type
[**models::UpdateContact200Response**](updateContact_200_response.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)