Intercom¶
-
class
intercom.
Intercom
(app_id, api_key)¶ Create a Intercom service.
Variables: - app_id (str) – The APP identifier.
- api_key (str) – The API key.
Companies¶
-
Intercom.
companies
()¶ Return the resource corresponding to all companies.
-
Companies.
create
(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Companies.
get
(page=None, per_page=None)¶ Fetch all of the objects.
Variables: - page (int) – The page that should be returned. If left as None, first page are returned.
- per_page (int) – How many objects should be returned. The maximum is 500. If left as None, 500 objects are returned.
Company¶
-
Intercom.
company
(id)¶ Return the resource corresponding to a single company.
-
Company.
get
()¶ Fetch the company’s data.
-
Company.
users
()¶ Fetch the company’s users.
Events¶
-
Intercom.
events
()¶ Return the resource corresponding to all events.
-
Events.
create
(event_name, created_at, user_id=None, email=None, metadata=None)¶ Create a new Event object.
Variables: - event_name (str) – The name of the event that occurred.
- created_at (int) – The time the event occurred as a UTC Unix timestamp.
- user_id (int) – The user_id of the user which messages should be returned. Required if no email.
- email (str) – The email of the user which messages that should be returned. Required if no user_id.
- metadata (dict) – Optional metadata about the event.
Impressions¶
-
Intercom.
impressions
()¶ Return the resource corresponding to all impressions.
-
Impressions.
create
(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
MessageThread¶
-
Intercom.
message_thread
()¶ Return the resource corresponding to a single message thread.
-
MessageThread.
get
(thread_id, user_id=None, email=None)¶ Fetch all a single object.
Variables: - thread_id (int) – The thread_id of the message that should be returned.
- user_id (int) – The user_id of the user which message should be returned. Required if no email.
- email (str) – The email of the user which message that should be returned. Required if no user_id.
MessageThreads¶
-
Intercom.
message_threads
()¶ Return the resource corresponding to all message threads.
-
MessageThreads.
create
(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
MessageThreads.
get
(user_id=None, email=None)¶ Fetch all of the objects for the user.
Variables: - user_id (int) – The user_id of the user which messages should be returned. Required if no email.
- email (str) – The email of the user which messages that should be returned. Required if no user_id.
-
MessageThreads.
reply
(obj)¶ Reply to a message thread from an admin from a user
Users¶
-
Intercom.
users
()¶ Return the resource corresponding to all users.
-
Users.
create
(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Users.
get
(page=None, per_page=None)¶ Fetch all of the objects.
Variables: - page (int) – The page that should be returned. If left as None, first page are returned.
- per_page (int) – How many objects should be returned. The maximum is 500. If left as None, 500 objects are returned.
-
Users.
update
(obj)¶ Update this resource.
Variables: obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.