View Source Intercom.Contacts (intercom_elixir v3.0.0)

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

Link to this function

add_tag(contact_id, tag_id)

View Source
@spec 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}.

@spec 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}.

@spec create(map()) :: Intercom.API.response()

Create a new contact.

Arguments:

Returns {:ok, data, metadata} or {:error, error_code, metadata}.

Link to this function

find_equal(field, value)

View Source
@spec find_equal(String.t(), String.t()) :: Intercom.API.response()

Retrieves a list of contacts with field equal to value.

Arguments:

Returns {:ok, data, metadata} or {:error, error_code, metadata}.

@spec 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}.

@spec 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}.

Link to this function

update(contact_id, params)

View Source
@spec update(String.t(), map()) :: Intercom.API.response()

Updates one contact identified by the intercom id.

Arguments:

Returns {:ok, data, metadata} or {:error, error_code, metadata}.