All URIs are relative to https://zernio.com/api
| Method | HTTP request | Description |
|---|---|---|
| bulk_create_contacts | POST /v1/contacts/bulk | Bulk create contacts |
| create_contact | POST /v1/contacts | Create contact |
| delete_contact | DELETE /v1/contacts/{contactId} | Delete contact |
| get_contact | GET /v1/contacts/{contactId} | Get contact |
| get_contact_channels | GET /v1/contacts/{contactId}/channels | List channels for a contact |
| list_contacts | GET /v1/contacts | List contacts |
| update_contact | PATCH /v1/contacts/{contactId} | Update contact |
bulk_create_contacts(bulk_create_contacts_request)
Bulk create contacts
Import up to 1000 contacts at a time. Skips duplicates.
require 'time'
require 'late-sdk'
# setup authorization
Late.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Late::ContactsApi.new
bulk_create_contacts_request = Late::BulkCreateContactsRequest.new({profile_id: 'profile_id_example', account_id: 'account_id_example', platform: 'platform_example', contacts: [Late::BulkCreateContactsRequestContactsInner.new({name: 'name_example', platform_identifier: 'platform_identifier_example'})]}) # BulkCreateContactsRequest |
begin
# Bulk create contacts
result = api_instance.bulk_create_contacts(bulk_create_contacts_request)
p result
rescue Late::ApiError => e
puts "Error when calling ContactsApi->bulk_create_contacts: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> bulk_create_contacts_with_http_info(bulk_create_contacts_request)
begin
# Bulk create contacts
data, status_code, headers = api_instance.bulk_create_contacts_with_http_info(bulk_create_contacts_request)
p status_code # => 2xx
p headers # => { ... }
p data # => <BulkCreateContacts200Response>
rescue Late::ApiError => e
puts "Error when calling ContactsApi->bulk_create_contacts_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| bulk_create_contacts_request | BulkCreateContactsRequest |
- Content-Type: application/json
- Accept: application/json
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.
require 'time'
require 'late-sdk'
# setup authorization
Late.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Late::ContactsApi.new
create_contact_request = Late::CreateContactRequest.new({profile_id: 'profile_id_example', name: 'name_example'}) # CreateContactRequest |
begin
# Create contact
result = api_instance.create_contact(create_contact_request)
p result
rescue Late::ApiError => e
puts "Error when calling ContactsApi->create_contact: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> create_contact_with_http_info(create_contact_request)
begin
# Create contact
data, status_code, headers = api_instance.create_contact_with_http_info(create_contact_request)
p status_code # => 2xx
p headers # => { ... }
p data # => <CreateContact200Response>
rescue Late::ApiError => e
puts "Error when calling ContactsApi->create_contact_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| create_contact_request | CreateContactRequest |
- Content-Type: application/json
- Accept: application/json
delete_contact(contact_id)
Delete contact
Permanently deletes a contact and all associated channels.
require 'time'
require 'late-sdk'
# setup authorization
Late.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Late::ContactsApi.new
contact_id = 'contact_id_example' # String |
begin
# Delete contact
api_instance.delete_contact(contact_id)
rescue Late::ApiError => e
puts "Error when calling ContactsApi->delete_contact: #{e}"
endThis returns an Array which contains the response data (nil in this case), status code and headers.
<Array(nil, Integer, Hash)> delete_contact_with_http_info(contact_id)
begin
# Delete contact
data, status_code, headers = api_instance.delete_contact_with_http_info(contact_id)
p status_code # => 2xx
p headers # => { ... }
p data # => nil
rescue Late::ApiError => e
puts "Error when calling ContactsApi->delete_contact_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| contact_id | String |
nil (empty response body)
- Content-Type: Not defined
- Accept: application/json
get_contact(contact_id)
Get contact
Returns a contact with all associated messaging channels.
require 'time'
require 'late-sdk'
# setup authorization
Late.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Late::ContactsApi.new
contact_id = 'contact_id_example' # String |
begin
# Get contact
result = api_instance.get_contact(contact_id)
p result
rescue Late::ApiError => e
puts "Error when calling ContactsApi->get_contact: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_contact_with_http_info(contact_id)
begin
# Get contact
data, status_code, headers = api_instance.get_contact_with_http_info(contact_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <GetContact200Response>
rescue Late::ApiError => e
puts "Error when calling ContactsApi->get_contact_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| contact_id | String |
- Content-Type: Not defined
- Accept: application/json
get_contact_channels(contact_id)
List channels for a contact
Returns all messaging channels linked to a contact (e.g. Instagram DM, Telegram, WhatsApp).
require 'time'
require 'late-sdk'
# setup authorization
Late.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Late::ContactsApi.new
contact_id = 'contact_id_example' # String |
begin
# List channels for a contact
result = api_instance.get_contact_channels(contact_id)
p result
rescue Late::ApiError => e
puts "Error when calling ContactsApi->get_contact_channels: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_contact_channels_with_http_info(contact_id)
begin
# List channels for a contact
data, status_code, headers = api_instance.get_contact_channels_with_http_info(contact_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <GetContactChannels200Response>
rescue Late::ApiError => e
puts "Error when calling ContactsApi->get_contact_channels_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| contact_id | String |
- Content-Type: Not defined
- Accept: application/json
list_contacts(opts)
List contacts
List and search contacts for a profile. Supports filtering by tags, platform, subscription status, and full-text search.
require 'time'
require 'late-sdk'
# setup authorization
Late.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Late::ContactsApi.new
opts = {
profile_id: 'profile_id_example', # String | Filter by profile. Omit to list across all profiles
search: 'search_example', # String |
tag: 'tag_example', # String |
platform: 'instagram', # String |
is_subscribed: 'true', # String |
limit: 56, # Integer |
skip: 56 # Integer |
}
begin
# List contacts
result = api_instance.list_contacts(opts)
p result
rescue Late::ApiError => e
puts "Error when calling ContactsApi->list_contacts: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> list_contacts_with_http_info(opts)
begin
# List contacts
data, status_code, headers = api_instance.list_contacts_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <ListContacts200Response>
rescue Late::ApiError => e
puts "Error when calling ContactsApi->list_contacts_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| profile_id | String | Filter by profile. Omit to list across all profiles | [optional] |
| search | String | [optional] | |
| tag | String | [optional] | |
| platform | String | [optional] | |
| is_subscribed | String | [optional] | |
| limit | Integer | [optional][default to 50] | |
| skip | Integer | [optional][default to 0] |
- Content-Type: Not defined
- Accept: application/json
update_contact(contact_id, opts)
Update contact
Update one or more fields on a contact. Only provided fields are changed.
require 'time'
require 'late-sdk'
# setup authorization
Late.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Late::ContactsApi.new
contact_id = 'contact_id_example' # String |
opts = {
update_contact_request: Late::UpdateContactRequest.new # UpdateContactRequest |
}
begin
# Update contact
result = api_instance.update_contact(contact_id, opts)
p result
rescue Late::ApiError => e
puts "Error when calling ContactsApi->update_contact: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> update_contact_with_http_info(contact_id, opts)
begin
# Update contact
data, status_code, headers = api_instance.update_contact_with_http_info(contact_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <UpdateContact200Response>
rescue Late::ApiError => e
puts "Error when calling ContactsApi->update_contact_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| contact_id | String | ||
| update_contact_request | UpdateContactRequest | [optional] |
- Content-Type: application/json
- Accept: application/json