Intercom.Contacts (intercom_elixir v2.0.1) View Source
Provides functionality for managing contacts.
See https://developers.intercom.com/intercom-api-reference/reference#contacts-model
Link to this section Summary
Functions
Adds a specific tag to a specific contact.
Archive one contact identified by the intercom id.
Create a new contact.
Retrieves a list of contacts with field
equal to value
.
Retrieves one contact identified by the intercom id.
Unarchive one contact identified by the intercom id.
Updates one contact identified by the intercom id.
Link to this section Functions
Specs
add_tag(String.t(), String.t()) :: Intercom.API.response()
Adds a specific tag to a specific contact.
Arguments:
contact_id
: The id generated by intercom for the contact.tag_id
: The id generated by intercom for the tag.
Returns {:ok, data, metadata}
or {:error, error_code, metadata}
.
Specs
archive(String.t()) :: Intercom.API.response()
Archive one contact identified by the intercom id.
Arguments:
contact_id
: The id generated by intercom for the contact.
Returns {:ok, data, metadata}
or {:error, error_code, metadata}
.
Specs
create(map()) :: Intercom.API.response()
Create a new contact.
Arguments:
params
: A map containing the fields of the user to be created. See https://developers.intercom.com/intercom-api-reference/reference#create-contact for parameters accepted by the intercom API.
Returns {:ok, data, metadata}
or {:error, error_code, metadata}
.
Specs
find_equal(String.t(), String.t()) :: Intercom.API.response()
Retrieves a list of contacts with field
equal to value
.
Arguments:
field
: The intercom field, see https://developers.intercom.com/intercom-api-reference/reference#search-for-contacts.value
: The value the intercom field must have to match.
Returns {:ok, data, metadata}
or {:error, error_code, metadata}
.
Specs
get(String.t()) :: Intercom.API.response()
Retrieves one contact identified by the intercom id.
Arguments:
contact_id
: The id generated by intercom for the contact.
Returns {:ok, data, metadata}
or {:error, error_code, metadata}
.
Specs
unarchive(String.t()) :: Intercom.API.response()
Unarchive one contact identified by the intercom id.
Arguments:
contact_id
: The id generated by intercom for the contact.
Returns {:ok, data, metadata}
or {:error, error_code, metadata}
.
Specs
update(String.t(), map()) :: Intercom.API.response()
Updates one contact identified by the intercom id.
Arguments:
contact_id
: The id generated by intercom for the contact.params
: A map containing the fields to update. See https://developers.intercom.com/intercom-api-reference/reference#update-contact for parameters accepted by the intercom API.
Returns {:ok, data, metadata}
or {:error, error_code, metadata}
.