Reference
January 30, 2026 ยท View on GitHub
Admins
client.admins.identify()
-
๐ Description
-
-
You can view the currently authorised admin along with the embedded app object (a "workspace" in legacy terminology).
๐ง Single Sign On
If you are building a custom "Log in with Intercom" flow for your site, and you call the
/meendpoint to identify the logged-in user, you should not accept any sign-ins from users with unverified email addresses as it poses a potential impersonation security risk.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.admins.identify()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.admins.away(...)
-
๐ Description
-
-
You can set an Admin as away for the Inbox.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.admins.away( admin_id=1, away_mode_enabled=True, away_mode_reassign=True, )
-
โ๏ธ Parameters
-
-
admin_id:
intโ The unique identifier of a given admin
-
away_mode_enabled:
boolโ Set to "true" to change the status of the admin to away.
-
away_mode_reassign:
boolโ Set to "true" to assign any new conversation replies to your default inbox.
-
away_status_reason_id:
typing.Optional[int]โ The unique identifier of the away status reason
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.admins.list_all_activity_logs(...)
-
๐ Description
-
-
You can get a log of activities by all admins in an app.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.admins.list_all_activity_logs( created_at_after="1677253093", created_at_before="1677861493", )
-
โ๏ธ Parameters
-
-
created_at_after:
strโ The start date that you request data for. It must be formatted as a UNIX timestamp.
-
created_at_before:
typing.Optional[str]โ The end date that you request data for. It must be formatted as a UNIX timestamp.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.admins.list()
-
๐ Description
-
-
You can fetch a list of admins for a given workspace.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.admins.list()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.admins.find(...)
-
๐ Description
-
-
You can retrieve the details of a single admin.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.admins.find( admin_id=1, )
-
โ๏ธ Parameters
-
-
admin_id:
intโ The unique identifier of a given admin
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
AI Content
client.ai_content.list_content_import_sources()
-
๐ Description
-
-
You can retrieve a list of all content import sources for a workspace.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.ai_content.list_content_import_sources()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.ai_content.create_content_import_source(...)
-
๐ Description
-
-
You can create a new content import source by sending a POST request to this endpoint.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.ai_content.create_content_import_source( url="https://www.example.com", )
-
โ๏ธ Parameters
-
-
url:
strโ The URL of the content import source.
-
status:
typing.Optional[CreateContentImportSourceRequestStatus]โ The status of the content import source.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.ai_content.get_content_import_source(...)
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.ai_content.get_content_import_source( source_id="source_id", )
-
โ๏ธ Parameters
-
-
source_id:
strโ The unique identifier for the content import source which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.ai_content.update_content_import_source(...)
-
๐ Description
-
-
You can update an existing content import source.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.ai_content.update_content_import_source( source_id="source_id", sync_behavior="api", url="https://www.example.com", )
-
โ๏ธ Parameters
-
-
source_id:
strโ The unique identifier for the content import source which is given by Intercom.
-
sync_behavior:
UpdateContentImportSourceRequestSyncBehaviorโ If you intend to create or update External Pages via the API, this should be set toapi. You can not change the value to or from api.
-
url:
strโ The URL of the content import source. This may only be different from the existing value if the sync behavior is API.
-
status:
typing.Optional[UpdateContentImportSourceRequestStatus]โ The status of the content import source.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.ai_content.delete_content_import_source(...)
-
๐ Description
-
-
You can delete a content import source by making a DELETE request this endpoint. This will also delete all external pages that were imported from this source.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.ai_content.delete_content_import_source( source_id="source_id", )
-
โ๏ธ Parameters
-
-
source_id:
strโ The unique identifier for the content import source which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.ai_content.list_external_pages()
-
๐ Description
-
-
You can retrieve a list of all external pages for a workspace.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.ai_content.list_external_pages()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.ai_content.create_external_page(...)
-
๐ Description
-
-
You can create a new external page by sending a POST request to this endpoint. If an external page already exists with the specified source_id and external_id, it will be updated instead.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.ai_content.create_external_page( title="Test", html="<html><body><h1>Test</h1></body></html>", url="https://www.example.com", source_id=44, external_id="abc1234", )
-
โ๏ธ Parameters
-
-
title:
strโ The title of the external page.
-
html:
strโ The body of the external page in HTML.
-
source_id:
intโ The unique identifier for the source of the external page which was given by Intercom. Every external page must be associated with a Content Import Source which represents the place it comes from and from which it inherits a default audience (configured in the UI). For a new source, make a POST request to the Content Import Source endpoint and an ID for the source will be returned in the response.
-
external_id:
strโ The identifier for the external page which was given by the source. Must be unique for the source.
-
url:
typing.Optional[str]โ The URL of the external page. This will be used by Fin to link end users to the page it based its answer on. When a URL is not present, Fin will not reference the source.
-
ai_agent_availability:
typing.Optional[bool]โ Whether the external page should be used to answer questions by AI Agent. Will not default when updating an existing external page.
-
ai_copilot_availability:
typing.Optional[bool]โ Whether the external page should be used to answer questions by AI Copilot. Will not default when updating an existing external page.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.ai_content.get_external_page(...)
-
๐ Description
-
-
You can retrieve an external page.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.ai_content.get_external_page( page_id="page_id", )
-
โ๏ธ Parameters
-
-
page_id:
strโ The unique identifier for the external page which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.ai_content.update_external_page(...)
-
๐ Description
-
-
You can update an existing external page (if it was created via the API).
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.ai_content.update_external_page( page_id="page_id", title="Test", html="<html><body><h1>Test</h1></body></html>", url="https://www.example.com", source_id=47, external_id="5678", )
-
โ๏ธ Parameters
-
-
page_id:
strโ The unique identifier for the external page which is given by Intercom.
-
title:
strโ The title of the external page.
-
html:
strโ The body of the external page in HTML.
-
url:
strโ The URL of the external page. This will be used by Fin to link end users to the page it based its answer on.
-
source_id:
intโ The unique identifier for the source of the external page which was given by Intercom. Every external page must be associated with a Content Import Source which represents the place it comes from and from which it inherits a default audience (configured in the UI). For a new source, make a POST request to the Content Import Source endpoint and an ID for the source will be returned in the response.
-
fin_availability:
typing.Optional[bool]โ Whether the external page should be used to answer questions by Fin.
-
external_id:
typing.Optional[str]โ The identifier for the external page which was given by the source. Must be unique for the source.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.ai_content.delete_external_page(...)
-
๐ Description
-
-
Sending a DELETE request for an external page will remove it from the content library UI and from being used for AI answers.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.ai_content.delete_external_page( page_id="page_id", )
-
โ๏ธ Parameters
-
-
page_id:
strโ The unique identifier for the external page which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Articles
client.articles.list(...)
-
๐ Description
-
-
You can fetch a list of all articles by making a GET request to
https://api.intercom.io/articles.๐ How are the articles sorted and ordered?
Articles will be returned in descending order on the
updated_atattribute. This means if you need to iterate through results then we'll show the most recently updated articles first.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) response = client.articles.list() for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
โ๏ธ Parameters
-
-
page:
typing.Optional[int]โ The page of results to fetch. Defaults to first page
-
per_page:
typing.Optional[int]โ How many results to display per page. Defaults to 15
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.articles.create(...)
-
๐ Description
-
-
You can create a new article by making a POST request to
https://api.intercom.io/articles.
-
๐ Usage
-
-
from intercom import CreateArticleRequest, Intercom client = Intercom( token="YOUR_TOKEN", ) client.articles.create( request=CreateArticleRequest( title="Thanks for everything", description="Description of the Article", body="Body of the Article", author_id=1295, state="published", ), )
-
โ๏ธ Parameters
-
-
request:
typing.Optional[CreateArticleRequest]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.articles.find(...)
-
๐ Description
-
-
You can fetch the details of a single article by making a GET request to
https://api.intercom.io/articles/<id>.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.articles.find( article_id=1, )
-
โ๏ธ Parameters
-
-
article_id:
intโ The unique identifier for the article which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.articles.update(...)
-
๐ Description
-
-
You can update the details of a single article by making a PUT request to
https://api.intercom.io/articles/<id>.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.articles.update( article_id=1, title="Christmas is here!", body="<p>New gifts in store for the jolly season</p>", )
-
โ๏ธ Parameters
-
-
article_id:
intโ The unique identifier for the article which is given by Intercom.
-
title:
typing.Optional[str]โ The title of the article.For multilingual articles, this will be the title of the default language's content.
-
description:
typing.Optional[str]โ The description of the article. For multilingual articles, this will be the description of the default language's content.
-
body:
typing.Optional[str]โ The content of the article. For multilingual articles, this will be the body of the default language's content.
-
author_id:
typing.Optional[int]โ The id of the author of the article. For multilingual articles, this will be the id of the author of the default language's content. Must be a teammate on the help center's workspace.
-
state:
typing.Optional[UpdateArticleRequestState]โ Whether the article will bepublishedor will be adraft. Defaults to draft. For multilingual articles, this will be the state of the default language's content.
-
parent_id:
typing.Optional[str]โ The id of the article's parent collection or section. An article without this field stands alone.
-
parent_type:
typing.Optional[str]โ The type of parent, which can either be acollectionorsection.
-
translated_content:
typing.Optional[ArticleTranslatedContent]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.articles.delete(...)
-
๐ Description
-
-
You can delete a single article by making a DELETE request to
https://api.intercom.io/articles/<id>.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.articles.delete( article_id=1, )
-
โ๏ธ Parameters
-
-
article_id:
intโ The unique identifier for the article which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.articles.search(...)
-
๐ Description
-
-
You can search for articles by making a GET request to
https://api.intercom.io/articles/search.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.articles.search( phrase="Getting started", state="published", help_center_id=1, highlight=True, )
-
โ๏ธ Parameters
-
-
phrase:
typing.Optional[str]โ The phrase within your articles to search for.
-
state:
typing.Optional[str]โ The state of the Articles returned. One ofpublished,draftorall.
-
help_center_id:
typing.Optional[int]โ The ID of the Help Center to search in.
-
highlight:
typing.Optional[bool]โ Return a highlighted version of the matching content within your articles. Refer to the response schema for more details.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Away Status Reasons
client.away_status_reasons.list_away_status_reasons()
-
๐ Description
-
-
Returns a list of all away status reasons configured for the workspace, including deleted ones.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.away_status_reasons.list_away_status_reasons()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Export
client.export.enqueue_a_new_reporting_data_export_job(...)
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.export.enqueue_a_new_reporting_data_export_job( dataset_id="conversation", attribute_ids=["conversation_id", "conversation_started_at"], start_time=1717490000, end_time=1717510000, )
-
โ๏ธ Parameters
-
-
dataset_id:
str
-
attribute_ids:
typing.Sequence[str]
-
start_time:
int
-
end_time:
int
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.export.list_available_datasets_and_attributes()
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.export.list_available_datasets_and_attributes()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Data Export
client.data_export.export_reporting_data(...)
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.data_export.export_reporting_data( job_identifier="job_identifier", app_id="app_id", client_id="client_id", )
-
โ๏ธ Parameters
-
-
job_identifier:
strโ Unique identifier of the job.
-
app_id:
strโ The Intercom defined code of the workspace the company is associated to.
-
client_id:
str
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.data_export.download_reporting_data_export(...)
-
๐ Description
-
-
Download the data from a completed reporting data export job.
Octet header required
You will have to specify the header Accept:
application/octet-streamwhen hitting this endpoint.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.data_export.download_reporting_data_export( job_identifier="job_identifier", app_id="app_id", )
-
โ๏ธ Parameters
-
-
job_identifier:
str
-
app_id:
str
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.data_export.create(...)
-
๐ Description
-
-
To create your export job, you need to send a
POSTrequest to the export endpointhttps://api.intercom.io/export/content/data.The only parameters you need to provide are the range of dates that you want exported.
๐ง Limit of one active job
You can only have one active job per workspace. You will receive a HTTP status code of 429 with the message Exceeded rate limit of 1 pending message data export jobs if you attempt to create a second concurrent job.
โ๏ธ Updated_at not included
It should be noted that the timeframe only includes messages sent during the time period and not messages that were only updated during this period. For example, if a message was updated yesterday but sent two days ago, you would need to set the created_at_after date before the message was sent to include that in your retrieval job.
๐ Date ranges are inclusive
Requesting data for 2018-06-01 until 2018-06-30 will get all data for those days including those specified - e.g. 2018-06-01 00:00:00 until 2018-06-30 23:59:99.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.data_export.create( created_at_after=1734519776, created_at_before=1734537776, )
-
โ๏ธ Parameters
-
-
created_at_after:
intโ The start date that you request data for. It must be formatted as a unix timestamp.
-
created_at_before:
intโ The end date that you request data for. It must be formatted as a unix timestamp.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.data_export.find(...)
-
๐ Description
-
-
You can view the status of your job by sending a
GETrequest to the URLhttps://api.intercom.io/export/content/data/{job_identifier}- the{job_identifier}is the value returned in the response when you first created the export job. More on it can be seen in the Export Job Model.๐ง Jobs expire after two days All jobs that have completed processing (and are thus available to download from the provided URL) will have an expiry limit of two days from when the export ob completed. After this, the data will no longer be available.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.data_export.find( job_identifier="job_identifier", )
-
โ๏ธ Parameters
-
-
job_identifier:
strโ job_identifier
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.data_export.cancel(...)
-
๐ Description
-
-
You can cancel your job
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.data_export.cancel( job_identifier="job_identifier", )
-
โ๏ธ Parameters
-
-
job_identifier:
strโ job_identifier
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.data_export.download(...)
-
๐ Description
-
-
When a job has a status of complete, and thus a filled download_url, you can download your data by hitting that provided URL, formatted like so: https://api.intercom.io/download/content/data/xyz1234.
Your exported message data will be streamed continuously back down to you in a gzipped CSV format.
๐ Octet header required
You will have to specify the header Accept:
application/octet-streamwhen hitting this endpoint.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.data_export.download( job_identifier="job_identifier", )
-
โ๏ธ Parameters
-
-
job_identifier:
strโ job_identifier
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
HelpCenters
client.help_centers.find(...)
-
๐ Description
-
-
You can fetch the details of a single Help Center by making a GET request to
https://api.intercom.io/help_center/help_center/<id>.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.help_centers.find( help_center_id=1, )
-
โ๏ธ Parameters
-
-
help_center_id:
intโ The unique identifier for the collection which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.help_centers.list(...)
-
๐ Description
-
-
You can list all Help Centers by making a GET request to
https://api.intercom.io/help_center/help_centers.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) response = client.help_centers.list() for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
โ๏ธ Parameters
-
-
page:
typing.Optional[int]โ The page of results to fetch. Defaults to first page
-
per_page:
typing.Optional[int]โ How many results to display per page. Defaults to 15
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Internal Articles
client.internal_articles.list_internal_articles()
-
๐ Description
-
-
You can fetch a list of all internal articles by making a GET request to
https://api.intercom.io/internal_articles.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.internal_articles.list_internal_articles()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.internal_articles.create_internal_article(...)
-
๐ Description
-
-
You can create a new internal article by making a POST request to
https://api.intercom.io/internal_articles.
-
๐ Usage
-
-
from intercom import CreateInternalArticleRequest, Intercom client = Intercom( token="YOUR_TOKEN", ) client.internal_articles.create_internal_article( request=CreateInternalArticleRequest( title="Thanks for everything", body="Body of the Internal Article", author_id=1295, owner_id=1295, ), )
-
โ๏ธ Parameters
-
-
request:
typing.Optional[CreateInternalArticleRequest]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.internal_articles.retrieve_internal_article(...)
-
๐ Description
-
-
You can fetch the details of a single internal article by making a GET request to
https://api.intercom.io/internal_articles/<id>.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.internal_articles.retrieve_internal_article( internal_article_id=1, )
-
โ๏ธ Parameters
-
-
internal_article_id:
intโ The unique identifier for the article which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.internal_articles.update_internal_article(...)
-
๐ Description
-
-
You can update the details of a single internal article by making a PUT request to
https://api.intercom.io/internal_articles/<id>.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.internal_articles.update_internal_article( internal_article_id=1, title="Christmas is here!", body="<p>New gifts in store for the jolly season</p>", )
-
โ๏ธ Parameters
-
-
internal_article_id:
intโ The unique identifier for the internal article which is given by Intercom.
-
title:
typing.Optional[str]โ The title of the article.
-
body:
typing.Optional[str]โ The content of the article.
-
author_id:
typing.Optional[int]โ The id of the author of the article.
-
owner_id:
typing.Optional[int]โ The id of the author of the article.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.internal_articles.delete_internal_article(...)
-
๐ Description
-
-
You can delete a single internal article by making a DELETE request to
https://api.intercom.io/internal_articles/<id>.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.internal_articles.delete_internal_article( internal_article_id=1, )
-
โ๏ธ Parameters
-
-
internal_article_id:
intโ The unique identifier for the internal article which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.internal_articles.search_internal_articles(...)
-
๐ Description
-
-
You can search for internal articles by making a GET request to
https://api.intercom.io/internal_articles/search.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.internal_articles.search_internal_articles( folder_id="folder_id", )
-
โ๏ธ Parameters
-
-
folder_id:
typing.Optional[str]โ The ID of the folder to search in.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
IP Allowlist
client.ip_allowlist.get_ip_allowlist()
-
๐ Description
-
-
Retrieve the current IP allowlist configuration for the workspace.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.ip_allowlist.get_ip_allowlist()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.ip_allowlist.update_ip_allowlist(...)
-
๐ Description
-
-
Update the IP allowlist configuration for the workspace.
{% admonition type="warning" name="Lockout Protection" %} The API will reject updates that would lock out the caller's IP address. Ensure your current IP is included in the allowlist when enabling the feature. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.ip_allowlist.update_ip_allowlist( enabled=True, ip_allowlist=["192.168.1.0/24", "10.0.0.1"], )
-
โ๏ธ Parameters
-
-
type:
typing.Optional[str]โ String representing the object's type. Always has the valueip_allowlist.
-
enabled:
typing.Optional[bool]โ Whether the IP allowlist is enabled for the workspace.
-
ip_allowlist:
typing.Optional[typing.Sequence[str]]List of allowed IP addresses and/or IP ranges in CIDR notation. Examples:
- Single IP:
192.168.0.1 - IP range:
192.168.0.1/24(allows 192.168.0.0 - 192.168.0.255)
- Single IP:
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Companies
client.companies.retrieve(...)
-
๐ Description
-
-
You can fetch a single company by passing in
company_idorname.https://api.intercom.io/companies?name={name}https://api.intercom.io/companies?company_id={company_id}You can fetch all companies and filter by
segment_idortag_idas a query parameter.https://api.intercom.io/companies?tag_id={tag_id}https://api.intercom.io/companies?segment_id={segment_id}
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.companies.retrieve( name="my company", company_id="12345", tag_id="678910", segment_id="98765", page=1, per_page=1, )
-
โ๏ธ Parameters
-
-
name:
typing.Optional[str]โ Thenameof the company to filter by.
-
company_id:
typing.Optional[str]โ Thecompany_idof the company to filter by.
-
tag_id:
typing.Optional[str]โ Thetag_idof the company to filter by.
-
segment_id:
typing.Optional[str]โ Thesegment_idof the company to filter by.
-
page:
typing.Optional[int]โ The page of results to fetch. Defaults to first page
-
per_page:
typing.Optional[int]โ How many results to display per page. Defaults to 15
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.companies.create_or_update(...)
-
๐ Description
-
-
You can create or update a company.
Companies will be only visible in Intercom when there is at least one associated user.
Companies are looked up via
company_idin aPOSTrequest, if not found viacompany_id, the new company will be created, if found, that company will be updated.{% admonition type="warning" name="Using
company_id" %} You can set a uniquecompany_idvalue when creating a company. However, it is not possible to updatecompany_id. Be sure to set a unique value once upon creation of the company. {% /admonition %}
-
๐ Usage
-
-
from intercom import CreateOrUpdateCompanyRequest, Intercom client = Intercom( token="YOUR_TOKEN", ) client.companies.create_or_update( request=CreateOrUpdateCompanyRequest(), )
-
โ๏ธ Parameters
-
-
request:
typing.Optional[CreateOrUpdateCompanyRequest]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.companies.find(...)
-
๐ Description
-
-
You can fetch a single company.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.companies.find( company_id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", )
-
โ๏ธ Parameters
-
-
company_id:
strโ The unique identifier for the company which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.companies.update(...)
-
๐ Description
-
-
You can update a single company using the Intercom provisioned
id.{% admonition type="warning" name="Using
company_id" %} When updating a company it is not possible to updatecompany_id. This can only be set once upon creation of the company. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom, UpdateCompanyRequestBody client = Intercom( token="YOUR_TOKEN", ) client.companies.update( company_id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", request=UpdateCompanyRequestBody(), )
-
โ๏ธ Parameters
-
-
company_id:
strโ The unique identifier for the company which is given by Intercom
-
request:
typing.Optional[UpdateCompanyRequestBody]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.companies.delete(...)
-
๐ Description
-
-
You can delete a single company.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.companies.delete( company_id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", )
-
โ๏ธ Parameters
-
-
company_id:
strโ The unique identifier for the company which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.companies.list_attached_contacts(...)
-
๐ Description
-
-
You can fetch a list of all contacts that belong to a company.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.companies.list_attached_contacts( company_id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", )
-
โ๏ธ Parameters
-
-
company_id:
strโ The unique identifier for the company which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.companies.list_attached_segments(...)
-
๐ Description
-
-
You can fetch a list of all segments that belong to a company.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.companies.list_attached_segments( company_id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", )
-
โ๏ธ Parameters
-
-
company_id:
strโ The unique identifier for the company which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.companies.list(...)
-
๐ Description
-
-
You can list companies. The company list is sorted by the
last_request_atfield and by default is ordered descending, most recently requested first.Note that the API does not include companies who have no associated users in list responses.
When using the Companies endpoint and the pages object to iterate through the returned companies, there is a limit of 10,000 Companies that can be returned. If you need to list or iterate on more than 10,000 Companies, please use the Scroll API. {% admonition type="warning" name="Pagination" %} You can use pagination to limit the number of results returned. The default is
20results per page. See the pagination section for more details on how to use thestarting_afterparam. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) response = client.companies.list( page=1, per_page=1, order="desc", ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
โ๏ธ Parameters
-
-
page:
typing.Optional[int]โ The page of results to fetch. Defaults to first page
-
per_page:
typing.Optional[int]โ How many results to return per page. Defaults to 15
-
order:
typing.Optional[str]โascordesc. Return the companies in ascending or descending order. Defaults to desc
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.companies.scroll(...)
-
๐ Description
-
-
The `list all companies` functionality does not work well for huge datasets, and can result in errors and performance problems when paging deeply. The Scroll API provides an efficient mechanism for iterating over all companies in a dataset.- Each app can only have 1 scroll open at a time. You'll get an error message if you try to have more than one open per app.
- If the scroll isn't used for 1 minute, it expires and calls with that scroll param will fail
- If the end of the scroll is reached, "companies" will be empty and the scroll parameter will expire
{% admonition type="info" name="Scroll Parameter" %} You can get the first page of companies by simply sending a GET request to the scroll endpoint. For subsequent requests you will need to use the scroll parameter from the response. {% /admonition %} {% admonition type="danger" name="Scroll network timeouts" %} Since scroll is often used on large datasets network errors such as timeouts can be encountered. When this occurs you will see a HTTP 500 error with the following message: "Request failed due to an internal network error. Please restart the scroll operation." If this happens, you will need to restart your scroll query: It is not possible to continue from a specific point when using scroll. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) response = client.companies.scroll( scroll_param="scroll_param", ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
โ๏ธ Parameters
-
-
scroll_param:
typing.Optional[str]โ
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.companies.attach_contact(...)
-
๐ Description
-
-
You can attach a company to a single contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.companies.attach_contact( contact_id="contact_id", company_id="123", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ The unique identifier for the contact which is given by Intercom
-
company_id:
strโ The unique identifier for the company which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.companies.detach_contact(...)
-
๐ Description
-
-
You can detach a company from a single contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.companies.detach_contact( contact_id="58a430d35458202d41b1e65b", company_id="58a430d35458202d41b1e65b", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ The unique identifier for the contact which is given by Intercom
-
company_id:
strโ The unique identifier for the company which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Contacts
client.contacts.list_attached_companies(...)
-
๐ Description
-
-
You can fetch a list of companies that are associated to a contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) response = client.contacts.list_attached_companies( contact_id="63a07ddf05a32042dffac965", page=1, per_page=1, ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
โ๏ธ Parameters
-
-
contact_id:
strโ The unique identifier for the contact which is given by Intercom
-
page:
typing.Optional[int]โ The page of results to fetch. Defaults to first page
-
per_page:
typing.Optional[int]โ How many results to display per page. Defaults to 15
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.contacts.list_attached_segments(...)
-
๐ Description
-
-
You can fetch a list of segments that are associated to a contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.contacts.list_attached_segments( contact_id="63a07ddf05a32042dffac965", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ The unique identifier for the contact which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.contacts.list_attached_subscriptions(...)
-
๐ Description
-
-
You can fetch a list of subscription types that are attached to a contact. These can be subscriptions that a user has 'opted-in' to or has 'opted-out' from, depending on the subscription type. This will return a list of Subscription Type objects that the contact is associated with.
The data property will show a combined list of:
1.Opt-out subscription types that the user has opted-out from. 2.Opt-in subscription types that the user has opted-in to receiving.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.contacts.list_attached_subscriptions( contact_id="63a07ddf05a32042dffac965", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ The unique identifier for the contact which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.contacts.attach_subscription(...)
-
๐ Description
-
-
You can add a specific subscription to a contact. In Intercom, we have two different subscription types based on user consent - opt-out and opt-in:
1.Attaching a contact to an opt-out subscription type will opt that user out from receiving messages related to that subscription type.
2.Attaching a contact to an opt-in subscription type will opt that user in to receiving messages related to that subscription type.
This will return a subscription type model for the subscription type that was added to the contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.contacts.attach_subscription( contact_id="63a07ddf05a32042dffac965", subscription_id="invalid_id", consent_type="opt_in", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ The unique identifier for the contact which is given by Intercom
-
subscription_id:
strโ The unique identifier for the subscription which is given by Intercom
-
consent_type:
strโ The consent_type of a subscription, opt_out or opt_in.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.contacts.detach_subscription(...)
-
๐ Description
-
-
You can remove a specific subscription from a contact. This will return a subscription type model for the subscription type that was removed from the contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.contacts.detach_subscription( contact_id="63a07ddf05a32042dffac965", subscription_id="37846", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ The unique identifier for the contact which is given by Intercom
-
subscription_id:
strโ The unique identifier for the subscription type which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.contacts.list_attached_tags(...)
-
๐ Description
-
-
You can fetch a list of all tags that are attached to a specific contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.contacts.list_attached_tags( contact_id="63a07ddf05a32042dffac965", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ The unique identifier for the contact which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.contacts.find(...)
-
๐ Description
-
-
You can fetch the details of a single contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.contacts.find( contact_id="63a07ddf05a32042dffac965", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ contact_id
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.contacts.update(...)
-
๐ Description
-
-
You can update an existing contact (ie. user or lead).
{% admonition type="info" %} This endpoint handles both contact updates and custom object associations.
See
update a contact with an association to a custom object instancein the request/response examples to see the custom object association format. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.contacts.update( contact_id="63a07ddf05a32042dffac965", custom_attributes={"order": ["21"]}, )
-
โ๏ธ Parameters
-
-
contact_id:
strโ id
-
role:
typing.Optional[str]โ The role of the contact.
-
external_id:
typing.Optional[str]โ A unique identifier for the contact which is given to Intercom
-
email:
typing.Optional[str]โ The contacts email
-
phone:
typing.Optional[str]โ The contacts phone
-
name:
typing.Optional[str]โ The contacts name
-
avatar:
typing.Optional[str]โ An image URL containing the avatar of a contact
-
signed_up_at:
typing.Optional[int]โ The time specified for when a contact signed up
-
last_seen_at:
typing.Optional[int]โ The time when the contact was last seen (either where the Intercom Messenger was installed or when specified manually)
-
owner_id:
typing.Optional[int]โ The id of an admin that has been assigned account ownership of the contact
-
unsubscribed_from_emails:
typing.Optional[bool]โ Whether the contact is unsubscribed from emails
-
custom_attributes:
typing.Optional[typing.Dict[str, typing.Any]]โ The custom attributes which are set for the contact
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.contacts.delete(...)
-
๐ Description
-
-
You can delete a single contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.contacts.delete( contact_id="contact_id", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ contact_id
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.contacts.merge_lead_in_user(...)
-
๐ Description
-
-
You can merge a contact with a
roleofleadinto a contact with aroleofuser.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.contacts.merge_lead_in_user( lead_id="6762f0d51bb69f9f2193bb7f", contact_id="6762f0d51bb69f9f2193bb80", )
-
โ๏ธ Parameters
-
-
lead_id:
typing.Optional[str]โ The unique identifier for the contact to merge away from. Must be a lead.
-
contact_id:
typing.Optional[str]โ The unique identifier for the contact to merge into. Must be a user.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.contacts.search(...)
-
๐ Description
-
-
You can search for multiple contacts by the value of their attributes in order to fetch exactly who you want.
To search for contacts, you need to send a
POSTrequest tohttps://api.intercom.io/contacts/search.This will accept a query object in the body which will define your filters in order to search for contacts.
{% admonition type="warning" name="Optimizing search queries" %} Search queries can be complex, so optimizing them can help the performance of your search. Use the
ANDandORoperators to combine multiple filters to get the exact results you need and utilize pagination to limit the number of results returned. The default is50results per page. See the pagination section for more details on how to use thestarting_afterparam. {% /admonition %}Contact Creation Delay
If a contact has recently been created, there is a possibility that it will not yet be available when searching. This means that it may not appear in the response. This delay can take a few minutes. If you need to be instantly notified it is recommended to use webhooks and iterate to see if they match your search filters.
Nesting & Limitations
You can nest these filters in order to get even more granular insights that pinpoint exactly what you need. Example: (1 OR 2) AND (3 OR 4). There are some limitations to the amount of multiple's there can be:
- There's a limit of max 2 nested filters
- There's a limit of max 15 filters for each AND or OR group
Searching for Timestamp Fields
All timestamp fields (created_at, updated_at etc.) are indexed as Dates for Contact Search queries; Datetime queries are not currently supported. This means you can only query for timestamp fields by day - not hour, minute or second. For example, if you search for all Contacts with a created_at value greater (>) than 1577869200 (the UNIX timestamp for January 1st, 2020 9:00 AM), that will be interpreted as 1577836800 (January 1st, 2020 12:00 AM). The search results will then include Contacts created from January 2nd, 2020 12:00 AM onwards. If you'd like to get contacts created on January 1st, 2020 you should search with a created_at value equal (=) to 1577836800 (January 1st, 2020 12:00 AM). This behaviour applies only to timestamps used in search queries. The search results will still contain the full UNIX timestamp and be sorted accordingly.
Accepted Fields
Most key listed as part of the Contacts Model are searchable, whether writeable or not. The value you search for has to match the accepted type, otherwise the query will fail (ie. as
created_ataccepts a date, thevaluecannot be a string such as"foorbar").Field Type id String role String
Accepts user or leadname String avatar String owner_id Integer email String email_domain String phone String external_id String created_at Date (UNIX Timestamp) signed_up_at Date (UNIX Timestamp) updated_at Date (UNIX Timestamp) last_seen_at Date (UNIX Timestamp) last_contacted_at Date (UNIX Timestamp) last_replied_at Date (UNIX Timestamp) last_email_opened_at Date (UNIX Timestamp) last_email_clicked_at Date (UNIX Timestamp) language_override String browser String browser_language String os String location.country String location.region String location.city String unsubscribed_from_emails Boolean marked_email_as_spam Boolean has_hard_bounced Boolean ios_last_seen_at Date (UNIX Timestamp) ios_app_version String ios_device String ios_app_device String ios_os_version String ios_app_name String ios_sdk_version String android_last_seen_at Date (UNIX Timestamp) android_app_version String android_device String android_app_name String andoid_sdk_version String segment_id String tag_id String custom_attributes.{attribute_name} String Accepted Operators
{% admonition type="warning" name="Searching based on
created_at" %} You cannot use the<=or>=operators to search bycreated_at. {% /admonition %}The table below shows the operators you can use to define how you want to search for the value. The operator should be put in as a string (
"="). The operator has to be compatible with the field's type (eg. you cannot search with>for a given string value as it's only compatible for integer's and dates).Operator Valid Types Description = All Equals != All Doesn't Equal IN All In
Shortcut forORqueries
Values must be in ArrayNIN All Not In
Shortcut forOR !queries
Values must be in Array> Integer
Date (UNIX Timestamp)Greater than < Integer
Date (UNIX Timestamp)Lower than ~ String Contains !~ String Doesn't Contain ^ String Starts With $ String Ends With
-
๐ Usage
-
-
from intercom import ( Intercom, MultipleFilterSearchRequest, SingleFilterSearchRequest, StartingAfterPaging, ) client = Intercom( token="YOUR_TOKEN", ) response = client.contacts.search( query=MultipleFilterSearchRequest( operator="AND", value=[ SingleFilterSearchRequest( field="created_at", operator=">", value="1306054154", ) ], ), pagination=StartingAfterPaging( per_page=5, ), ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
โ๏ธ Parameters
-
-
query:
SearchRequestQuery
-
pagination:
typing.Optional[StartingAfterPaging]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.contacts.list(...)
-
๐ Description
-
-
You can fetch a list of all contacts (ie. users or leads) in your workspace. {% admonition type="warning" name="Pagination" %} You can use pagination to limit the number of results returned. The default is
50results per page. See the pagination section for more details on how to use thestarting_afterparam. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) response = client.contacts.list() for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
โ๏ธ Parameters
-
-
page:
typing.Optional[int]โ The page of results to fetch. Defaults to first page
-
per_page:
typing.Optional[int]โ How many results to display per page. Defaults to 15
-
starting_after:
typing.Optional[str]โ String used to get the next page of conversations.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.contacts.create(...)
-
๐ Description
-
-
You can create a new contact (ie. user or lead).
-
๐ Usage
-
-
from intercom import CreateContactRequestWithEmail, Intercom client = Intercom( token="YOUR_TOKEN", ) client.contacts.create( request=CreateContactRequestWithEmail( email="joebloggs@intercom.io", ), )
-
โ๏ธ Parameters
-
-
request:
CreateContactRequest
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.contacts.show_contact_by_external_id(...)
-
๐ Description
-
-
You can fetch the details of a single contact by external ID. Note that this endpoint only supports users and not leads.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.contacts.show_contact_by_external_id( external_id="cdd29344-5e0c-4ef0-ac56-f9ba2979bc27", )
-
โ๏ธ Parameters
-
-
external_id:
strโ The external ID of the user that you want to retrieve
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.contacts.archive(...)
-
๐ Description
-
-
You can archive a single contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.contacts.archive( contact_id="63a07ddf05a32042dffac965", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ contact_id
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.contacts.unarchive(...)
-
๐ Description
-
-
You can unarchive a single contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.contacts.unarchive( contact_id="63a07ddf05a32042dffac965", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ contact_id
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.contacts.block_contact(...)
-
๐ Description
-
-
Block a single contact.
Note: conversations of the contact will also be archived during the process.
More details in FAQ How do I block Inbox spam?
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.contacts.block_contact( contact_id="63a07ddf05a32042dffac965", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ contact_id
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Notes
client.notes.list(...)
-
๐ Description
-
-
You can fetch a list of notes that are associated to a contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) response = client.notes.list( contact_id="contact_id", ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
โ๏ธ Parameters
-
-
contact_id:
strโ The unique identifier of a contact.
-
page:
typing.Optional[int]โ The page of results to fetch. Defaults to first page
-
per_page:
typing.Optional[int]โ How many results to display per page. Defaults to 15
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.notes.create(...)
-
๐ Description
-
-
You can add a note to a single contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.notes.create( contact_id="123", body="Hello", admin_id="123", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ The unique identifier of a given contact.
-
body:
strโ The text of the note.
-
admin_id:
typing.Optional[str]โ The unique identifier of a given admin.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.notes.find(...)
-
๐ Description
-
-
You can fetch the details of a single note.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.notes.find( note_id=1, )
-
โ๏ธ Parameters
-
-
note_id:
intโ The unique identifier of a given note
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Tags
client.tags.tag_contact(...)
-
๐ Description
-
-
You can tag a specific contact. This will return a tag object for the tag that was added to the contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.tags.tag_contact( contact_id="63a07ddf05a32042dffac965", tag_id="123", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ The unique identifier for the contact which is given by Intercom
-
tag_id:
strโ The unique identifier for the tag which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.tags.untag_contact(...)
-
๐ Description
-
-
You can remove tag from a specific contact. This will return a tag object for the tag that was removed from the contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.tags.untag_contact( contact_id="63a07ddf05a32042dffac965", tag_id="7522907", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ The unique identifier for the contact which is given by Intercom
-
tag_id:
strโ The unique identifier for the tag which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.tags.tag_conversation(...)
-
๐ Description
-
-
You can tag a specific conversation. This will return a tag object for the tag that was added to the conversation.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.tags.tag_conversation( conversation_id="64619700005694", tag_id="7522907", admin_id="780", )
-
โ๏ธ Parameters
-
-
conversation_id:
strโ conversation_id
-
tag_id:
strโ The unique identifier for the tag which is given by Intercom
-
admin_id:
strโ The unique identifier for the admin which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.tags.untag_conversation(...)
-
๐ Description
-
-
You can remove tag from a specific conversation. This will return a tag object for the tag that was removed from the conversation.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.tags.untag_conversation( conversation_id="64619700005694", tag_id="7522907", admin_id="123", )
-
โ๏ธ Parameters
-
-
conversation_id:
strโ conversation_id
-
tag_id:
strโ tag_id
-
admin_id:
strโ The unique identifier for the admin which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.tags.list()
-
๐ Description
-
-
You can fetch a list of all tags for a given workspace.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.tags.list()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.tags.create(...)
-
๐ Description
-
-
You can use this endpoint to perform the following operations:
1. Create a new tag: You can create a new tag by passing in the tag name as specified in "Create or Update Tag Request Payload" described below.
2. Update an existing tag: You can update an existing tag by passing the id of the tag as specified in "Create or Update Tag Request Payload" described below.
3. Tag Companies: You can tag single company or a list of companies. You can tag a company by passing in the tag name and the company details as specified in "Tag Company Request Payload" described below. Also, if the tag doesn't exist then a new one will be created automatically.
4. Untag Companies: You can untag a single company or a list of companies. You can untag a company by passing in the tag id and the company details as specified in "Untag Company Request Payload" described below.
5. Tag Multiple Users: You can tag a list of users. You can tag the users by passing in the tag name and the user details as specified in "Tag Users Request Payload" described below.
Each operation will return a tag object.
-
๐ Usage
-
-
from intercom import ( Intercom, TagMultipleUsersRequest, TagMultipleUsersRequestUsersItem, ) client = Intercom( token="YOUR_TOKEN", ) client.tags.create( request=TagMultipleUsersRequest( name="test", users=[ TagMultipleUsersRequestUsersItem( id="123", ) ], ), )
-
โ๏ธ Parameters
-
-
request:
TagsCreateRequestBody
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.tags.find(...)
-
๐ Description
-
-
You can fetch the details of tags that are on the workspace by their id. This will return a tag object.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.tags.find( tag_id="123", )
-
โ๏ธ Parameters
-
-
tag_id:
strโ The unique identifier of a given tag
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.tags.delete(...)
-
๐ Description
-
-
You can delete the details of tags that are on the workspace by passing in the id.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.tags.delete( tag_id="123", )
-
โ๏ธ Parameters
-
-
tag_id:
strโ The unique identifier of a given tag
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.tags.tag_ticket(...)
-
๐ Description
-
-
You can tag a specific ticket. This will return a tag object for the tag that was added to the ticket.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.tags.tag_ticket( ticket_id="64619700005694", tag_id="7522907", admin_id="780", )
-
โ๏ธ Parameters
-
-
ticket_id:
strโ ticket_id
-
tag_id:
strโ The unique identifier for the tag which is given by Intercom
-
admin_id:
strโ The unique identifier for the admin which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.tags.untag_ticket(...)
-
๐ Description
-
-
You can remove tag from a specific ticket. This will return a tag object for the tag that was removed from the ticket.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.tags.untag_ticket( ticket_id="64619700005694", tag_id="7522907", admin_id="123", )
-
โ๏ธ Parameters
-
-
ticket_id:
strโ ticket_id
-
tag_id:
strโ The unique identifier for the tag which is given by Intercom
-
admin_id:
strโ The unique identifier for the admin which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Conversations
client.conversations.list(...)
-
๐ Description
-
-
You can fetch a list of all conversations.
You can optionally request the result page size and the cursor to start after to fetch the result. {% admonition type="warning" name="Pagination" %} You can use pagination to limit the number of results returned. The default is
20results per page. See the pagination section for more details on how to use thestarting_afterparam. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) response = client.conversations.list( per_page=1, starting_after="starting_after", ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
โ๏ธ Parameters
-
-
per_page:
typing.Optional[int]โ How many results per page
-
starting_after:
typing.Optional[str]โ String used to get the next page of conversations.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.conversations.create(...)
-
๐ Description
-
-
You can create a conversation that has been initiated by a contact (ie. user or lead). The conversation can be an in-app message only.
{% admonition type="info" name="Sending for visitors" %} You can also send a message from a visitor by specifying their
user_idoridvalue in thefromfield, along with atypefield value ofcontact. This visitor will be automatically converted to a contact with a lead role once the conversation is created. {% /admonition %}This will return the Message model that has been created.
-
๐ Usage
-
-
from intercom import Intercom from intercom.conversations import CreateConversationRequestFrom client = Intercom( token="YOUR_TOKEN", ) client.conversations.create( from_=CreateConversationRequestFrom( type="user", id="123_doesnt_exist", ), body="Hello there", )
-
โ๏ธ Parameters
-
-
from_:
CreateConversationRequestFrom
-
body:
strโ The content of the message. HTML is not supported.
-
created_at:
typing.Optional[int]โ The time the conversation was created as a UTC Unix timestamp. If not provided, the current time will be used. This field is only recommneded for migrating past conversations from another source into Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.conversations.find(...)
-
๐ Description
-
-
You can fetch the details of a single conversation.
This will return a single Conversation model with all its conversation parts.
{% admonition type="warning" name="Hard limit of 500 parts" %} The maximum number of conversation parts that can be returned via the API is 500. If you have more than that we will return the 500 most recent conversation parts. {% /admonition %}
For AI agent conversation metadata, please note that you need to have the agent enabled in your workspace, which is a paid feature.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.conversations.find( conversation_id="123", display_as="plaintext", include_translations=True, )
-
โ๏ธ Parameters
-
-
conversation_id:
strโ The id of the conversation to target
-
display_as:
typing.Optional[str]โ Set to plaintext to retrieve conversation messages in plain text.
-
include_translations:
typing.Optional[bool]โ If set to true, conversation parts will be translated to the detected language of the conversation.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.conversations.update(...)
-
๐ Description
-
-
You can update an existing conversation.
{% admonition type="info" name="Replying and other actions" %} If you want to reply to a coveration or take an action such as assign, unassign, open, close or snooze, take a look at the reply and manage endpoints. {% /admonition %}
{% admonition type="info" %} This endpoint handles both conversation updates and custom object associations.
See
update a conversation with an association to a custom object instancein the request/response examples to see the custom object association format. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.conversations.update( conversation_id="conversation_id", display_as="plaintext", read=True, title="new conversation title", custom_attributes={"issue_type": "Billing", "priority": "High"}, )
-
โ๏ธ Parameters
-
-
conversation_id:
strโ The id of the conversation to target
-
display_as:
typing.Optional[str]โ Set to plaintext to retrieve conversation messages in plain text.
-
read:
typing.Optional[bool]โ Mark a conversation as read within Intercom.
-
title:
typing.Optional[str]โ The title given to the conversation
-
custom_attributes:
typing.Optional[CustomAttributes]
-
company_id:
typing.Optional[str]โ The ID of the company that the conversation is associated with. The unique identifier for the company which is given by Intercom. Set to nil to remove company.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.conversations.delete_conversation(...)
-
๐ Description
-
-
You can delete a single conversation.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.conversations.delete_conversation( conversation_id=1, )
-
โ๏ธ Parameters
-
-
conversation_id:
intโ id
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.conversations.search(...)
-
๐ Description
-
-
You can search for multiple conversations by the value of their attributes in order to fetch exactly which ones you want.
To search for conversations, you need to send a
POSTrequest tohttps://api.intercom.io/conversations/search.This will accept a query object in the body which will define your filters in order to search for conversations. {% admonition type="warning" name="Optimizing search queries" %} Search queries can be complex, so optimizing them can help the performance of your search. Use the
ANDandORoperators to combine multiple filters to get the exact results you need and utilize pagination to limit the number of results returned. The default is20results per page and maximum is150. See the pagination section for more details on how to use thestarting_afterparam. {% /admonition %}Nesting & Limitations
You can nest these filters in order to get even more granular insights that pinpoint exactly what you need. Example: (1 OR 2) AND (3 OR 4). There are some limitations to the amount of multiple's there can be:
- There's a limit of max 2 nested filters
- There's a limit of max 15 filters for each AND or OR group
Accepted Fields
Most keys listed in the conversation model are searchable, whether writeable or not. The value you search for has to match the accepted type, otherwise the query will fail (ie. as
created_ataccepts a date, thevaluecannot be a string such as"foorbar"). Thesource.bodyfield is unique as the search will not be performed against the entire value, but instead against every element of the value separately. For example, when searching for a conversation with a"I need support"body - the query should contain a=operator with the value"support"for such conversation to be returned. A query with a=operator and a"need support"value will not yield a result.Field Type id String created_at Date (UNIX timestamp) updated_at Date (UNIX timestamp) source.type String
Accepted fields areconversation,email,facebook,instagram,phone_call,phone_switch,push,sms,twitterandwhatsapp.source.id String source.delivered_as String source.subject String source.body String source.author.id String source.author.type String source.author.name String source.author.email String source.url String contact_ids String teammate_ids String admin_assignee_id String team_assignee_id String channel_initiated String open Boolean read Boolean state String waiting_since Date (UNIX timestamp) snoozed_until Date (UNIX timestamp) tag_ids String priority String statistics.time_to_assignment Integer statistics.time_to_admin_reply Integer statistics.time_to_first_close Integer statistics.time_to_last_close Integer statistics.median_time_to_reply Integer statistics.first_contact_reply_at Date (UNIX timestamp) statistics.first_assignment_at Date (UNIX timestamp) statistics.first_admin_reply_at Date (UNIX timestamp) statistics.first_close_at Date (UNIX timestamp) statistics.last_assignment_at Date (UNIX timestamp) statistics.last_assignment_admin_reply_at Date (UNIX timestamp) statistics.last_contact_reply_at Date (UNIX timestamp) statistics.last_admin_reply_at Date (UNIX timestamp) statistics.last_close_at Date (UNIX timestamp) statistics.last_closed_by_id String statistics.count_reopens Integer statistics.count_assignments Integer statistics.count_conversation_parts Integer conversation_rating.requested_at Date (UNIX timestamp) conversation_rating.replied_at Date (UNIX timestamp) conversation_rating.score Integer conversation_rating.remark String conversation_rating.contact_id String conversation_rating.admin_d String ai_agent_participated Boolean ai_agent.resolution_state String ai_agent.last_answer_type String ai_agent.rating Integer ai_agent.rating_remark String ai_agent.source_type String ai_agent.source_title String Accepted Operators
The table below shows the operators you can use to define how you want to search for the value. The operator should be put in as a string (
"="). The operator has to be compatible with the field's type (eg. you cannot search with>for a given string value as it's only compatible for integer's and dates).Operator Valid Types Description = All Equals != All Doesn't Equal IN All In Shortcut for ORqueries Values most be in ArrayNIN All Not In Shortcut for OR !queries Values must be in Array> Integer Date (UNIX Timestamp) Greater (or equal) than < Integer Date (UNIX Timestamp) Lower (or equal) than ~ String Contains !~ String Doesn't Contain ^ String Starts With $ String Ends With
-
๐ Usage
-
-
from intercom import ( Intercom, MultipleFilterSearchRequest, SingleFilterSearchRequest, StartingAfterPaging, ) client = Intercom( token="YOUR_TOKEN", ) response = client.conversations.search( query=MultipleFilterSearchRequest( operator="AND", value=[ SingleFilterSearchRequest( field="created_at", operator=">", value="1306054154", ) ], ), pagination=StartingAfterPaging( per_page=5, ), ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
โ๏ธ Parameters
-
-
query:
SearchRequestQuery
-
pagination:
typing.Optional[StartingAfterPaging]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.conversations.reply(...)
-
๐ Description
-
-
You can reply to a conversation with a message from an admin or on behalf of a contact, or with a note for admins.
-
๐ Usage
-
-
from intercom import ContactReplyIntercomUserIdRequest, Intercom client = Intercom( token="YOUR_TOKEN", ) client.conversations.reply( conversation_id='123 or "last"', request=ContactReplyIntercomUserIdRequest( body="Thanks again :)", intercom_user_id="6762f1571bb69f9f2193bbbb", ), )
-
โ๏ธ Parameters
-
-
conversation_id:
strโ The Intercom provisioned identifier for the conversation or the string "last" to reply to the last part of the conversation
-
request:
ReplyConversationRequest
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.conversations.manage(...)
-
๐ Description
-
-
For managing conversations you can:
- Close a conversation
- Snooze a conversation to reopen on a future date
- Open a conversation which is
snoozedorclosed - Assign a conversation to an admin and/or team.
-
๐ Usage
-
-
from intercom import Intercom from intercom.conversations import ConversationsManageRequestBody_Close client = Intercom( token="YOUR_TOKEN", ) client.conversations.manage( conversation_id="123", request=ConversationsManageRequestBody_Close( admin_id="12345", ), )
-
โ๏ธ Parameters
-
-
conversation_id:
strโ The identifier for the conversation as given by Intercom.
-
request:
ConversationsManageRequestBody
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.conversations.attach_contact_as_admin(...)
-
๐ Description
-
-
You can add participants who are contacts to a conversation, on behalf of either another contact or an admin.
{% admonition type="warning" name="Contacts without an email" %} If you add a contact via the email parameter and there is no user/lead found on that workspace with he given email, then we will create a new contact with
roleset tolead. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom from intercom.conversations import ( AttachContactToConversationRequestCustomerIntercomUserId, ) client = Intercom( token="YOUR_TOKEN", ) client.conversations.attach_contact_as_admin( conversation_id="123", admin_id="12345", customer=AttachContactToConversationRequestCustomerIntercomUserId( intercom_user_id="6762f19e1bb69f9f2193bbd5", ), )
-
โ๏ธ Parameters
-
-
conversation_id:
strโ The identifier for the conversation as given by Intercom.
-
admin_id:
typing.Optional[str]โ Theidof the admin who is adding the new participant.
-
customer:
typing.Optional[AttachContactToConversationRequestCustomer]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.conversations.detach_contact_as_admin(...)
-
๐ Description
-
-
You can add participants who are contacts to a conversation, on behalf of either another contact or an admin.
{% admonition type="warning" name="Contacts without an email" %} If you add a contact via the email parameter and there is no user/lead found on that workspace with he given email, then we will create a new contact with
roleset tolead. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.conversations.detach_contact_as_admin( conversation_id="123", contact_id="123", admin_id="5017690", )
-
โ๏ธ Parameters
-
-
conversation_id:
strโ The identifier for the conversation as given by Intercom.
-
contact_id:
strโ The identifier for the contact as given by Intercom.
-
admin_id:
strโ Theidof the admin who is performing the action.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.conversations.redact_conversation_part(...)
-
๐ Description
-
-
You can redact a conversation part or the source message of a conversation (as seen in the source object).
{% admonition type="info" name="Redacting parts and messages" %} If you are redacting a conversation part, it must have a
body. If you are redacting a source message, it must have been created by a contact. We will return aconversation_part_not_redactableerror if these criteria are not met. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom, RedactConversationRequest_ConversationPart client = Intercom( token="YOUR_TOKEN", ) client.conversations.redact_conversation_part( request=RedactConversationRequest_ConversationPart( conversation_id="really_123_doesnt_exist", conversation_part_id="really_123_doesnt_exist", ), )
-
โ๏ธ Parameters
-
-
request:
RedactConversationRequest
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.conversations.convert_to_ticket(...)
-
๐ Description
-
-
You can convert a conversation to a ticket.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.conversations.convert_to_ticket( conversation_id=1, ticket_type_id="54", )
-
โ๏ธ Parameters
-
-
conversation_id:
intโ The id of the conversation to target
-
ticket_type_id:
strโ The ID of the type of ticket you want to convert the conversation to
-
attributes:
typing.Optional[TicketRequestCustomAttributes]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.conversations.run_assignment_rules(...)
-
๐ Description
-
-
{% admonition type="danger" name="Deprecation of Run Assignment Rules" %} Run assignment rules is now deprecated in version 2.12 and future versions and will be permanently removed on December 31, 2026. After this date, any requests made to this endpoint will fail. {% /admonition %} You can let a conversation be automatically assigned following assignment rules. {% admonition type="warning" name="When using workflows" %} It is not possible to use this endpoint with Workflows. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.conversations.run_assignment_rules( conversation_id="123", )
-
โ๏ธ Parameters
-
-
conversation_id:
strโ The identifier for the conversation as given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Custom Channel Events
client.custom_channel_events.notify_new_conversation(...)
-
๐ Description
-
-
Notifies Intercom that a new conversation was created in your custom channel/platform. This triggers conversation creation and workflow automations within Intercom for your custom channel integration.
Note: This endpoint is currently under managed availability. Please reach out to your accounts team to discuss access and tailored, hands-on support.
-
๐ Usage
-
-
from intercom import CustomChannelContact, Intercom client = Intercom( token="YOUR_TOKEN", ) client.custom_channel_events.notify_new_conversation( event_id="event_id", external_conversation_id="external_conversation_id", contact=CustomChannelContact( type="user", external_id="external_id", ), )
-
โ๏ธ Parameters
-
-
event_id:
strโ Unique identifier for the event.
-
external_conversation_id:
strโ Identifier for the conversation in your application.
-
contact:
CustomChannelContact
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.custom_channel_events.notify_new_message(...)
-
๐ Description
-
-
Notifies Intercom that a new message was sent in a conversation on your custom channel/platform. This allows Intercom to process the message and trigger any relevant workflow automations.
Note: This endpoint is currently under managed availability. Please reach out to your accounts team to discuss access and tailored, hands-on support.
-
๐ Usage
-
-
from intercom import CustomChannelContact, Intercom client = Intercom( token="YOUR_TOKEN", ) client.custom_channel_events.notify_new_message( body="body", event_id="event_id", external_conversation_id="external_conversation_id", contact=CustomChannelContact( type="user", external_id="external_id", ), )
-
โ๏ธ Parameters
-
-
body:
strโ The message content sent by the user.
-
event_id:
strโ Unique identifier for the event.
-
external_conversation_id:
strโ Identifier for the conversation in your application.
-
contact:
CustomChannelContact
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.custom_channel_events.notify_quick_reply_selected(...)
-
๐ Description
-
-
Notifies Intercom that a user selected a quick reply option in your custom channel/platform. This allows Intercom to process the response and trigger any relevant workflow automations.
Note: This endpoint is currently under managed availability. Please reach out to your accounts team to discuss access and tailored, hands-on support.
-
๐ Usage
-
-
from intercom import CustomChannelContact, Intercom client = Intercom( token="YOUR_TOKEN", ) client.custom_channel_events.notify_quick_reply_selected( event_id="evt_67890", external_conversation_id="conv_13579", contact=CustomChannelContact( type="user", external_id="user_003", name="Alice Example", email="alice@example.com", ), quick_reply_option_id="1234", )
-
โ๏ธ Parameters
-
-
quick_reply_option_id:
strโ Id of the selected quick reply option.
-
event_id:
strโ Unique identifier for the event.
-
external_conversation_id:
strโ Identifier for the conversation in your application.
-
contact:
CustomChannelContact
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.custom_channel_events.notify_attribute_collected(...)
-
๐ Description
-
-
Notifies Intercom that a user provided a response to an attribute collector in your custom channel/platform. This allows Intercom to process the attribute and trigger any relevant workflow automations.
Note: This endpoint is currently under managed availability. Please reach out to your accounts team to discuss access and tailored, hands-on support.
-
๐ Usage
-
-
from intercom import CustomChannelAttribute, CustomChannelContact, Intercom client = Intercom( token="YOUR_TOKEN", ) client.custom_channel_events.notify_attribute_collected( attribute=CustomChannelAttribute( id="id", value="value", ), event_id="event_id", external_conversation_id="external_conversation_id", contact=CustomChannelContact( type="user", external_id="external_id", ), )
-
โ๏ธ Parameters
-
-
attribute:
CustomChannelAttribute
-
event_id:
strโ Unique identifier for the event.
-
external_conversation_id:
strโ Identifier for the conversation in your application.
-
contact:
CustomChannelContact
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Custom Object Instances
client.custom_object_instances.get_custom_object_instances_by_external_id(...)
-
๐ Description
-
-
Fetch a Custom Object Instance by external_id.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.custom_object_instances.get_custom_object_instances_by_external_id( custom_object_type_identifier="Order", external_id="external_id", )
-
โ๏ธ Parameters
-
-
custom_object_type_identifier:
strโ The unique identifier of the custom object type that defines the structure of the custom object instance.
-
external_id:
str
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.custom_object_instances.create_custom_object_instances(...)
-
๐ Description
-
-
Create or update a custom object instance
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.custom_object_instances.create_custom_object_instances( custom_object_type_identifier="Order", external_id="123", external_created_at=1392036272, external_updated_at=1392036272, custom_attributes={ "order_number": "ORDER-12345", "total_amount": "custom_attributes", }, )
-
โ๏ธ Parameters
-
-
custom_object_type_identifier:
strโ The unique identifier of the custom object type that defines the structure of the custom object instance.
-
external_id:
typing.Optional[str]โ A unique identifier for the Custom Object instance in the external system it originated from.
-
external_created_at:
typing.Optional[int]โ The time when the Custom Object instance was created in the external system it originated from.
-
external_updated_at:
typing.Optional[int]โ The time when the Custom Object instance was last updated in the external system it originated from.
-
custom_attributes:
typing.Optional[typing.Dict[str, typing.Optional[str]]]โ The custom attributes which are set for the Custom Object instance.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.custom_object_instances.delete_custom_object_instances_by_id(...)
-
๐ Description
-
-
Delete a single Custom Object instance by external_id.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.custom_object_instances.delete_custom_object_instances_by_id( custom_object_type_identifier="Order", external_id="external_id", )
-
โ๏ธ Parameters
-
-
custom_object_type_identifier:
strโ The unique identifier of the custom object type that defines the structure of the custom object instance.
-
external_id:
str
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.custom_object_instances.get_custom_object_instances_by_id(...)
-
๐ Description
-
-
Fetch a Custom Object Instance by id.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.custom_object_instances.get_custom_object_instances_by_id( custom_object_type_identifier="Order", custom_object_instance_id="custom_object_instance_id", )
-
โ๏ธ Parameters
-
-
custom_object_type_identifier:
strโ The unique identifier of the custom object type that defines the structure of the custom object instance.
-
custom_object_instance_id:
strโ The id or external_id of the custom object instance
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.custom_object_instances.delete_custom_object_instances_by_external_id(...)
-
๐ Description
-
-
Delete a single Custom Object instance using the Intercom defined id.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.custom_object_instances.delete_custom_object_instances_by_external_id( custom_object_type_identifier="Order", custom_object_instance_id="custom_object_instance_id", )
-
โ๏ธ Parameters
-
-
custom_object_type_identifier:
strโ The unique identifier of the custom object type that defines the structure of the custom object instance.
-
custom_object_instance_id:
strโ The Intercom defined id of the custom object instance
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Data Attributes
client.data_attributes.list(...)
-
๐ Description
-
-
You can fetch a list of all data attributes belonging to a workspace for contacts, companies or conversations.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.data_attributes.list( model="contact", include_archived=True, )
-
โ๏ธ Parameters
-
-
model:
typing.Optional[DataAttributesListRequestModel]โ Specify the data attribute model to return.
-
include_archived:
typing.Optional[bool]โ Include archived attributes in the list. By default we return only non archived data attributes.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.data_attributes.create(...)
-
๐ Description
-
-
You can create a data attributes for a
contactor acompany.
-
๐ Usage
-
-
from intercom import ( CreateDataAttributeRequestOptions, CreateDataAttributeRequestOptionsOptionsItem, Intercom, ) client = Intercom( token="YOUR_TOKEN", ) client.data_attributes.create( request=CreateDataAttributeRequestOptions( options=[ CreateDataAttributeRequestOptionsOptionsItem( value="1-10", ) ], ), )
-
โ๏ธ Parameters
-
-
request:
CreateDataAttributeRequest
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.data_attributes.update(...)
-
๐ Description
-
-
You can update a data attribute.
๐ง Updating the data type is not possible
It is currently a dangerous action to execute changing a data attribute's type via the API. You will need to update the type via the UI instead.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.data_attributes.update( data_attribute_id=1, request={"description": "Trying to archieve", "archived": True}, )
-
โ๏ธ Parameters
-
-
data_attribute_id:
intโ The data attribute id
-
request:
UpdateDataAttributeRequestBody
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Events
client.events.list(...)
-
๐ Description
-
-
๐ง
Please note that you can only 'list' events that are less than 90 days old. Event counts and summaries will still include your events older than 90 days but you cannot 'list' these events individually if they are older than 90 days
The events belonging to a customer can be listed by sending a GET request to
https://api.intercom.io/eventswith a user or lead identifier along with atypeparameter. The identifier parameter can be one ofuser_id,emailorintercom_user_id. Thetypeparameter value must beuser.https://api.intercom.io/events?type=user&user_id={user_id}https://api.intercom.io/events?type=user&email={email}https://api.intercom.io/events?type=user&intercom_user_id={id}(this call can be used to list leads)
The
emailparameter value should be url encoded when sending.You can optionally define the result page size as well with the
per_pageparameter.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.events.list( user_id="user_id", intercom_user_id="intercom_user_id", email="email", type="type", summary=True, per_page=1, )
-
โ๏ธ Parameters
-
-
type:
strโ The value must be user
-
user_id:
typing.Optional[str]โ user_id query parameter
-
intercom_user_id:
typing.Optional[str]โ intercom_user_id query parameter
-
email:
typing.Optional[str]โ email query parameter
-
summary:
typing.Optional[bool]โ summary flag
-
per_page:
typing.Optional[int]โ How many results to display per page. Defaults to 15
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.events.create(...)
-
๐ Description
-
-
You will need an Access Token that has write permissions to send Events. Once you have a key you can submit events via POST to the Events resource, which is located at https://api.intercom.io/events, or you can send events using one of the client libraries. When working with the HTTP API directly a client should send the event with a
Content-Typeofapplication/json.When using the JavaScript API, adding the code to your app makes the Events API available. Once added, you can submit an event using the
trackEventmethod. This will associate the event with the Lead or currently logged-in user or logged-out visitor/lead and send it to Intercom. The final parameter is a map that can be used to send optional metadata about the event.With the Ruby client you pass a hash describing the event to
Intercom::Event.create, or call thetrack_usermethod directly on the current user object (e.g.user.track_event).NB: For the JSON object types, please note that we do not currently support nested JSON structure.
Type Description Example String The value is a JSON String "source":"desktop"Number The value is a JSON Number "load": 3.67Date The key ends with the String _dateand the value is a Unix timestamp, assumed to be in the UTC timezone."contact_date": 1392036272Link The value is a HTTP or HTTPS URI. "article": "https://example.org/ab1de.html"Rich Link The value is a JSON object that contains urlandvaluekeys."article": {"url": "https://example.org/ab1de.html", "value":"the dude abides"}Monetary Amount The value is a JSON object that contains amountandcurrencykeys. Theamountkey is a positive integer representing the amount in cents. The price in the example to the right denotes โฌ349.99."price": {"amount": 34999, "currency": "eur"}Lead Events
When submitting events for Leads, you will need to specify the Lead's
id.Metadata behaviour
- We currently limit the number of tracked metadata keys to 10 per event. Once the quota is reached, we ignore any further keys we receive. The first 10 metadata keys are determined by the order in which they are sent in with the event.
- It is not possible to change the metadata keys once the event has been sent. A new event will need to be created with the new keys and you can archive the old one.
- There might be up to 24 hrs delay when you send a new metadata for an existing event.
Event de-duplication
The API may detect and ignore duplicate events. Each event is uniquely identified as a combination of the following data - the Workspace identifier, the Contact external identifier, the Data Event name and the Data Event created time. As a result, it is strongly recommended to send a second granularity Unix timestamp in the
created_atfield.Duplicated events are responded to using the normal
202 Acceptedcode - an error is not thrown, however repeat requests will be counted against any rate limit that is in place.HTTP API Responses
- Successful responses to submitted events return
202 Acceptedwith an empty body. - Unauthorised access will be rejected with a
401 Unauthorizedor403 Forbiddenresponse code. - Events sent about users that cannot be found will return a
404 Not Found. - Event lists containing duplicate events will have those duplicates ignored.
- Server errors will return a
500response code and may contain an error message in the body.
-
๐ Usage
-
-
from intercom import CreateDataEventRequestWithId, Intercom client = Intercom( token="YOUR_TOKEN", ) client.events.create( request=CreateDataEventRequestWithId( id="8a88a590-e1c3-41e2-a502-e0649dbf721c", event_name="invited-friend", created_at=1671028894, ), )
-
โ๏ธ Parameters
-
-
request:
CreateDataEventRequest
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.events.summaries(...)
-
๐ Description
-
-
Create event summaries for a user. Event summaries are used to track the number of times an event has occurred, the first time it occurred and the last time it occurred.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.events.summaries()
-
โ๏ธ Parameters
-
-
user_id:
typing.Optional[str]โ Your identifier for the user.
-
event_summaries:
typing.Optional[CreateDataEventSummariesRequestEventSummaries]โ A list of event summaries for the user. Each event summary should contain the event name, the time the event occurred, and the number of times the event occurred. The event name should be a past tense 'verb-noun' combination, to improve readability, for exampleupdated-plan.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Jobs
client.jobs.status(...)
-
๐ Description
-
-
Retrieve the status of job execution.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.jobs.status( job_id="job_id", )
-
โ๏ธ Parameters
-
-
job_id:
strโ The unique identifier for the job which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Messages
client.messages.create(...)
-
๐ Description
-
-
You can create a message that has been initiated by an admin. The conversation can be either an in-app message or an email.
๐ง Sending for visitors
There can be a short delay between when a contact is created and when a contact becomes available to be messaged through the API. A 404 Not Found error will be returned in this case.
This will return the Message model that has been created.
๐ง Retrieving Associated Conversations
As this is a message, there will be no conversation present until the contact responds. Once they do, you will have to search for a contact's conversations with the id of the message.
-
๐ Usage
-
-
from intercom import ( CreateMessageRequest_Email, CreateMessageRequestFrom, CreateMessageRequestTo, Intercom, ) client = Intercom( token="YOUR_TOKEN", ) client.messages.create( request=CreateMessageRequest_Email( subject="Thanks for everything", body="Hello there", template="plain", from_=CreateMessageRequestFrom( id=394051, ), to=CreateMessageRequestTo( type="user", id="536e564f316c83104c000020", ), ), )
-
โ๏ธ Parameters
-
-
request:
typing.Optional[CreateMessageRequest]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Segments
client.segments.list(...)
-
๐ Description
-
-
You can fetch a list of all segments.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.segments.list( include_count=True, )
-
โ๏ธ Parameters
-
-
include_count:
typing.Optional[bool]โ It includes the count of contacts that belong to each segment.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.segments.find(...)
-
๐ Description
-
-
You can fetch the details of a single segment.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.segments.find( segment_id="123", )
-
โ๏ธ Parameters
-
-
segment_id:
strโ The unique identified of a given segment.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Subscription Types
client.subscription_types.list()
-
๐ Description
-
-
You can list all subscription types. A list of subscription type objects will be returned.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.subscription_types.list()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
PhoneCallRedirects
client.phone_call_redirects.create(...)
-
๐ Description
-
-
You can use the API to deflect phone calls to the Intercom Messenger. Calling this endpoint will send an SMS with a link to the Messenger to the phone number specified.
If custom attributes are specified, they will be added to the user or lead's custom data attributes.
-
๐ Usage
-
-
from intercom import CreatePhoneSwitchRequest, Intercom client = Intercom( token="YOUR_TOKEN", ) client.phone_call_redirects.create( request=CreatePhoneSwitchRequest( phone="+40241100100", custom_attributes={"issue_type": "Billing", "priority": "High"}, ), )
-
โ๏ธ Parameters
-
-
request:
typing.Optional[CreatePhoneSwitchRequest]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Calls
client.calls.list_calls(...)
-
๐ Description
-
-
Retrieve a paginated list of calls.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.calls.list_calls( page=1, per_page=1, )
-
โ๏ธ Parameters
-
-
page:
typing.Optional[int]โ The page of results to fetch. Defaults to first page
-
per_page:
typing.Optional[int]โ How many results to display per page. Defaults to 25. Max 25.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.calls.show_call(...)
-
๐ Description
-
-
Retrieve a single call by id.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.calls.show_call( call_id="call_id", )
-
โ๏ธ Parameters
-
-
call_id:
strโ The id of the call to retrieve
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.calls.show_call_recording(...)
-
๐ Description
-
-
Redirects to a signed URL for the call's recording if it exists.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.calls.show_call_recording( call_id="call_id", )
-
โ๏ธ Parameters
-
-
call_id:
strโ The id of the call
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.calls.show_call_transcript(...)
-
๐ Description
-
-
Returns the transcript for the specified call as a downloadable text file.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.calls.show_call_transcript( call_id="call_id", )
-
โ๏ธ Parameters
-
-
call_id:
strโ The id of the call
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.calls.list_calls_with_transcripts(...)
-
๐ Description
-
-
Retrieve calls by a list of conversation ids and include transcripts when available. A maximum of 20
conversation_idscan be provided. If none are provided or more than 20 are provided, a 400 error is returned.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.calls.list_calls_with_transcripts( conversation_ids=["64619700005694", "64619700005695"], )
-
โ๏ธ Parameters
-
-
conversation_ids:
typing.Sequence[str]โ A list of conversation ids to fetch calls for. Maximum 20.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Teams
client.teams.list()
-
๐ Description
-
-
This will return a list of team objects for the App.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.teams.list()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.teams.find(...)
-
๐ Description
-
-
You can fetch the details of a single team, containing an array of admins that belong to this team.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.teams.find( team_id="123", )
-
โ๏ธ Parameters
-
-
team_id:
strโ The unique identifier of a given team.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Ticket States
client.ticket_states.list_ticket_states()
-
๐ Description
-
-
You can get a list of all ticket states for a workspace.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.ticket_states.list_ticket_states()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Ticket Types
client.ticket_types.list()
-
๐ Description
-
-
You can get a list of all ticket types for a workspace.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.ticket_types.list()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.ticket_types.create(...)
-
๐ Description
-
-
You can create a new ticket type.
๐ Creating ticket types.
Every ticket type will be created with two default attributes: default_title and default_description. For the
iconpropery, use an emoji from Twemoji Cheatsheet
-
๐ Usage
-
-
from intercom import CreateTicketTypeRequest, Intercom client = Intercom( token="YOUR_TOKEN", ) client.ticket_types.create( request=CreateTicketTypeRequest( name="Customer Issue", description="Customer Report Template", category="Customer", icon="๐๏ธ", ), )
-
โ๏ธ Parameters
-
-
request:
typing.Optional[CreateTicketTypeRequest]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.ticket_types.get(...)
-
๐ Description
-
-
You can fetch the details of a single ticket type.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.ticket_types.get( ticket_type_id="ticket_type_id", )
-
โ๏ธ Parameters
-
-
ticket_type_id:
strโ The unique identifier for the ticket type which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.ticket_types.update(...)
-
๐ Description
-
-
You can update a ticket type.
๐ Updating a ticket type.
For the
iconpropery, use an emoji from Twemoji Cheatsheet
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.ticket_types.update( ticket_type_id="ticket_type_id", name="Bug Report 2", )
-
โ๏ธ Parameters
-
-
ticket_type_id:
strโ The unique identifier for the ticket type which is given by Intercom.
-
name:
typing.Optional[str]โ The name of the ticket type.
-
description:
typing.Optional[str]โ The description of the ticket type.
-
category:
typing.Optional[UpdateTicketTypeRequestCategory]โ Category of the Ticket Type.
-
icon:
typing.Optional[str]โ The icon of the ticket type.
-
archived:
typing.Optional[bool]โ The archived status of the ticket type.
-
is_internal:
typing.Optional[bool]โ Whether the tickets associated with this ticket type are intended for internal use only or will be shared with customers. This is currently a limited attribute.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Tickets
client.tickets.reply(...)
-
๐ Description
-
-
You can reply to a ticket with a message from an admin or on behalf of a contact, or with a note for admins.
-
๐ Usage
-
-
from intercom import ContactReplyTicketIntercomUserIdRequest, Intercom client = Intercom( token="YOUR_TOKEN", ) client.tickets.reply( ticket_id="123", request=ContactReplyTicketIntercomUserIdRequest( body="Thanks again :)", intercom_user_id="6762f2971bb69f9f2193bc49", ), )
-
โ๏ธ Parameters
-
-
ticket_id:
str
-
request:
TicketsReplyRequestBody
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.tickets.create(...)
-
๐ Description
-
-
You can create a new ticket.
-
๐ Usage
-
-
from intercom import CreateTicketRequestContactsItemId, Intercom client = Intercom( token="YOUR_TOKEN", ) client.tickets.create( ticket_type_id="1234", contacts=[ CreateTicketRequestContactsItemId( id="6762f2d81bb69f9f2193bc54", ) ], )
-
โ๏ธ Parameters
-
-
ticket_type_id:
strโ The ID of the type of ticket you want to create
-
contacts:
typing.Sequence[CreateTicketRequestContactsItem]โ The list of contacts (users or leads) affected by this ticket. Currently only one is allowed
-
skip_notifications:
typing.Optional[bool]โ Option to disable notifications when a Ticket is created.
-
conversation_to_link_id:
typing.Optional[str]The ID of the conversation you want to link to the ticket. Here are the valid ways of linking two tickets:
- conversation | back-office ticket
- customer tickets | non-shared back-office ticket
- conversation | tracker ticket
- customer ticket | tracker ticket
-
company_id:
typing.Optional[str]โ The ID of the company that the ticket is associated with. The unique identifier for the company which is given by Intercom
-
created_at:
typing.Optional[int]โ The time the ticket was created. If not provided, the current time will be used.
-
assignment:
typing.Optional[CreateTicketRequestAssignment]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.tickets.enqueue_create_ticket(...)
-
๐ Description
-
-
Enqueues ticket creation for asynchronous processing, returning if the job was enqueued successfully to be processed. We attempt to perform a best-effort validation on inputs before tasks are enqueued. If the given parameters are incorrect, we won't enqueue the job.
-
๐ Usage
-
-
from intercom import CreateTicketRequestContactsItemId, Intercom client = Intercom( token="YOUR_TOKEN", ) client.tickets.enqueue_create_ticket( ticket_type_id="1234", contacts=[ CreateTicketRequestContactsItemId( id="6762f2d81bb69f9f2193bc54", ) ], )
-
โ๏ธ Parameters
-
-
ticket_type_id:
strโ The ID of the type of ticket you want to create
-
contacts:
typing.Sequence[CreateTicketRequestContactsItem]โ The list of contacts (users or leads) affected by this ticket. Currently only one is allowed
-
skip_notifications:
typing.Optional[bool]โ Option to disable notifications when a Ticket is created.
-
conversation_to_link_id:
typing.Optional[str]The ID of the conversation you want to link to the ticket. Here are the valid ways of linking two tickets:
- conversation | back-office ticket
- customer tickets | non-shared back-office ticket
- conversation | tracker ticket
- customer ticket | tracker ticket
-
company_id:
typing.Optional[str]โ The ID of the company that the ticket is associated with. The unique identifier for the company which is given by Intercom
-
created_at:
typing.Optional[int]โ The time the ticket was created. If not provided, the current time will be used.
-
assignment:
typing.Optional[CreateTicketRequestAssignment]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.tickets.get(...)
-
๐ Description
-
-
You can fetch the details of a single ticket.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.tickets.get( ticket_id="ticket_id", )
-
โ๏ธ Parameters
-
-
ticket_id:
strโ The unique identifier for the ticket which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.tickets.update(...)
-
๐ Description
-
-
You can update a ticket.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.tickets.update( ticket_id="ticket_id", ticket_state_id="123", )
-
โ๏ธ Parameters
-
-
ticket_id:
strโ The unique identifier for the ticket which is given by Intercom
-
ticket_attributes:
typing.Optional[typing.Dict[str, typing.Any]]โ The attributes set on the ticket.
-
ticket_state_id:
typing.Optional[str]โ The ID of the ticket state associated with the ticket type.
-
company_id:
typing.Optional[str]โ The ID of the company that the ticket is associated with. The unique identifier for the company which is given by Intercom. Set to nil to remove company.
-
open:
typing.Optional[bool]โ Specify if a ticket is open. Set to false to close a ticket. Closing a ticket will also unsnooze it.
-
is_shared:
typing.Optional[bool]โ Specify whether the ticket is visible to users.
-
snoozed_until:
typing.Optional[int]โ The time you want the ticket to reopen.
-
admin_id:
typing.Optional[int]โ The ID of the admin performing ticket update. Needed for workflows execution and attributing actions to specific admins.
-
assignee_id:
typing.Optional[str]โ The ID of the admin or team to which the ticket is assigned. Set this 0 to unassign it.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.tickets.delete_ticket(...)
-
๐ Description
-
-
You can delete a ticket using the Intercom provided ID.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.tickets.delete_ticket( ticket_id="ticket_id", )
-
โ๏ธ Parameters
-
-
ticket_id:
strโ The unique identifier for the ticket which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.tickets.search(...)
-
๐ Description
-
-
You can search for multiple tickets by the value of their attributes in order to fetch exactly which ones you want.
To search for tickets, you send a
POSTrequest tohttps://api.intercom.io/tickets/search.This will accept a query object in the body which will define your filters. {% admonition type="warning" name="Optimizing search queries" %} Search queries can be complex, so optimizing them can help the performance of your search. Use the
ANDandORoperators to combine multiple filters to get the exact results you need and utilize pagination to limit the number of results returned. The default is20results per page. See the pagination section for more details on how to use thestarting_afterparam. {% /admonition %}Nesting & Limitations
You can nest these filters in order to get even more granular insights that pinpoint exactly what you need. Example: (1 OR 2) AND (3 OR 4). There are some limitations to the amount of multiples there can be:
- There's a limit of max 2 nested filters
- There's a limit of max 15 filters for each AND or OR group
Accepted Fields
Most keys listed as part of the Ticket model are searchable, whether writeable or not. The value you search for has to match the accepted type, otherwise the query will fail (ie. as
created_ataccepts a date, thevaluecannot be a string such as"foobar"). Thesource.bodyfield is unique as the search will not be performed against the entire value, but instead against every element of the value separately. For example, when searching for a conversation with a"I need support"body - the query should contain a=operator with the value"support"for such conversation to be returned. A query with a=operator and a"need support"value will not yield a result.Field Type id String created_at Date (UNIX timestamp) updated_at Date (UNIX timestamp) title String description String category String ticket_type_id String contact_ids String teammate_ids String admin_assignee_id String team_assignee_id String open Boolean state String snoozed_until Date (UNIX timestamp) ticket_attribute.{id} String or Boolean or Date (UNIX timestamp) or Float or Integer {% admonition type="info" name="Searching by Category" %} When searching for tickets by the
categoryfield, specific terms must be used instead of the category names:- For Customer category tickets, use the term
request. - For Back-office category tickets, use the term
task. - For Tracker category tickets, use the term
tracker. {% /admonition %}
Accepted Operators
{% admonition type="info" name="Searching based on
created_at" %} You may use the<=or>=operators to search bycreated_at. {% /admonition %}The table below shows the operators you can use to define how you want to search for the value. The operator should be put in as a string (
"="). The operator has to be compatible with the field's type (eg. you cannot search with>for a given string value as it's only compatible for integer's and dates).Operator Valid Types Description = All Equals != All Doesn't Equal IN All In Shortcut for ORqueries Values most be in ArrayNIN All Not In Shortcut for OR !queries Values must be in Array> Integer Date (UNIX Timestamp) Greater (or equal) than < Integer Date (UNIX Timestamp) Lower (or equal) than ~ String Contains !~ String Doesn't Contain ^ String Starts With $ String Ends With
-
๐ Usage
-
-
from intercom import ( Intercom, MultipleFilterSearchRequest, SingleFilterSearchRequest, StartingAfterPaging, ) client = Intercom( token="YOUR_TOKEN", ) response = client.tickets.search( query=MultipleFilterSearchRequest( operator="AND", value=[ SingleFilterSearchRequest( field="created_at", operator=">", value="1306054154", ) ], ), pagination=StartingAfterPaging( per_page=5, ), ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
โ๏ธ Parameters
-
-
query:
SearchRequestQuery
-
pagination:
typing.Optional[StartingAfterPaging]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Visitors
client.visitors.find(...)
-
๐ Description
-
-
You can fetch the details of a single visitor.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.visitors.find( user_id="user_id", )
-
โ๏ธ Parameters
-
-
user_id:
strโ The user_id of the Visitor you want to retrieve.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.visitors.update(...)
-
๐ Description
-
-
Sending a PUT request to
/visitorswill result in an update of an existing Visitor.Option 1. You can update a visitor by passing in the
user_idof the visitor in the Request body.Option 2. You can update a visitor by passing in the
idof the visitor in the Request body.
-
๐ Usage
-
-
from intercom import Intercom, UpdateVisitorRequestWithUserId client = Intercom( token="YOUR_TOKEN", ) client.visitors.update( request=UpdateVisitorRequestWithUserId( user_id="fail", name="Christian Fail", ), )
-
โ๏ธ Parameters
-
-
request:
UpdateVisitorRequest
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.visitors.merge_to_contact(...)
-
๐ Description
-
-
You can merge a Visitor to a Contact of role type
leadoruser.๐ What happens upon a visitor being converted?
If the User exists, then the Visitor will be merged into it, the Visitor deleted and the User returned. If the User does not exist, the Visitor will be converted to a User, with the User identifiers replacing it's Visitor identifiers.
-
๐ Usage
-
-
from intercom import Intercom from intercom.visitors import UserWithId, VisitorWithUserId client = Intercom( token="YOUR_TOKEN", ) client.visitors.merge_to_contact( type="user", user=UserWithId( id="8a88a590-e1c3-41e2-a502-e0649dbf721c", email="foo@bar.com", ), visitor=VisitorWithUserId( user_id="3ecf64d0-9ed1-4e9f-88e1-da7d6e6782f3", ), )
-
โ๏ธ Parameters
-
-
type:
strโ Represents the role of the Contact model. Acceptsleadoruser.
-
user:
ConvertVisitorRequestUserโ The unique identifiers retained after converting or merging.
-
visitor:
ConvertVisitorRequestVisitorโ The unique identifiers to convert a single Visitor.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
HelpCenters Collections
client.help_centers.collections.list(...)
-
๐ Description
-
-
You can fetch a list of all collections by making a GET request to
https://api.intercom.io/help_center/collections.Collections will be returned in descending order on the
updated_atattribute. This means if you need to iterate through results then we'll show the most recently updated collections first.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) response = client.help_centers.collections.list() for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
โ๏ธ Parameters
-
-
page:
typing.Optional[int]โ The page of results to fetch. Defaults to first page
-
per_page:
typing.Optional[int]โ How many results to display per page. Defaults to 15
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.help_centers.collections.create(...)
-
๐ Description
-
-
You can create a new collection by making a POST request to
https://api.intercom.io/help_center/collections.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.help_centers.collections.create( name="collection 51", description="Missing required parameter", )
-
โ๏ธ Parameters
-
-
name:
strโ The name of the collection. For multilingual collections, this will be the name of the default language's content.
-
description:
typing.Optional[str]โ The description of the collection. For multilingual collections, this will be the description of the default language's content.
-
translated_content:
typing.Optional[GroupTranslatedContent]
-
parent_id:
typing.Optional[str]โ The id of the parent collection. Ifnullthen it will be created as the first level collection.
-
help_center_id:
typing.Optional[int]โ The id of the help center where the collection will be created. Ifnullthen it will be created in the default help center.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.help_centers.collections.find(...)
-
๐ Description
-
-
You can fetch the details of a single collection by making a GET request to
https://api.intercom.io/help_center/collections/<id>.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.help_centers.collections.find( collection_id=1, )
-
โ๏ธ Parameters
-
-
collection_id:
intโ The unique identifier for the collection which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.help_centers.collections.update(...)
-
๐ Description
-
-
You can update the details of a single collection by making a PUT request to
https://api.intercom.io/collections/<id>.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.help_centers.collections.update( collection_id=1, name="Update collection name", )
-
โ๏ธ Parameters
-
-
collection_id:
intโ The unique identifier for the collection which is given by Intercom.
-
name:
typing.Optional[str]โ The name of the collection. For multilingual collections, this will be the name of the default language's content.
-
description:
typing.Optional[str]โ The description of the collection. For multilingual collections, this will be the description of the default language's content.
-
translated_content:
typing.Optional[GroupTranslatedContent]
-
parent_id:
typing.Optional[str]โ The id of the parent collection. Ifnullthen it will be updated as the first level collection.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.help_centers.collections.delete(...)
-
๐ Description
-
-
You can delete a single collection by making a DELETE request to
https://api.intercom.io/collections/<id>.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.help_centers.collections.delete( collection_id=1, )
-
โ๏ธ Parameters
-
-
collection_id:
intโ The unique identifier for the collection which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
News Items
client.news.items.list()
-
๐ Description
-
-
You can fetch a list of all news items
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.news.items.list()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.news.items.create(...)
-
๐ Description
-
-
You can create a news item
-
๐ Usage
-
-
from intercom import Intercom from intercom.news import NewsfeedAssignment client = Intercom( token="YOUR_TOKEN", ) client.news.items.create( title="Halloween is here!", body="<p>New costumes in store for this spooky season</p>", sender_id=991267834, state="live", deliver_silently=True, labels=["Product", "Update", "New"], reactions=["๐", "๐ "], newsfeed_assignments=[ NewsfeedAssignment( newsfeed_id=53, published_at=1664638214, ) ], )
-
โ๏ธ Parameters
-
-
title:
strโ The title of the news item.
-
sender_id:
intโ The id of the sender of the news item. Must be a teammate on the workspace.
-
body:
typing.Optional[str]โ The news item body, which may contain HTML.
-
state:
typing.Optional[NewsItemRequestState]โ News items will not be visible to your users in the assigned newsfeeds until they are set live.
-
deliver_silently:
typing.Optional[bool]โ When set totrue, the news item will appear in the messenger newsfeed without showing a notification badge.
-
labels:
typing.Optional[typing.Sequence[str]]โ Label names displayed to users to categorize the news item.
-
reactions:
typing.Optional[typing.Sequence[typing.Optional[str]]]โ Ordered list of emoji reactions to the news item. When empty, reactions are disabled.
-
newsfeed_assignments:
typing.Optional[typing.Sequence[NewsfeedAssignment]]โ A list of newsfeed_assignments to assign to the specified newsfeed.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.news.items.find(...)
-
๐ Description
-
-
You can fetch the details of a single news item.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.news.items.find( news_item_id=1, )
-
โ๏ธ Parameters
-
-
news_item_id:
intโ The unique identifier for the news item which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.news.items.update(...)
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.news.items.update( news_item_id=1, title="Christmas is here!", body="<p>New gifts in store for the jolly season</p>", sender_id=991267848, reactions=["๐", "๐"], )
-
โ๏ธ Parameters
-
-
news_item_id:
intโ The unique identifier for the news item which is given by Intercom.
-
title:
strโ The title of the news item.
-
sender_id:
intโ The id of the sender of the news item. Must be a teammate on the workspace.
-
body:
typing.Optional[str]โ The news item body, which may contain HTML.
-
state:
typing.Optional[NewsItemRequestState]โ News items will not be visible to your users in the assigned newsfeeds until they are set live.
-
deliver_silently:
typing.Optional[bool]โ When set totrue, the news item will appear in the messenger newsfeed without showing a notification badge.
-
labels:
typing.Optional[typing.Sequence[str]]โ Label names displayed to users to categorize the news item.
-
reactions:
typing.Optional[typing.Sequence[typing.Optional[str]]]โ Ordered list of emoji reactions to the news item. When empty, reactions are disabled.
-
newsfeed_assignments:
typing.Optional[typing.Sequence[NewsfeedAssignment]]โ A list of newsfeed_assignments to assign to the specified newsfeed.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.news.items.delete(...)
-
๐ Description
-
-
You can delete a single news item.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.news.items.delete( news_item_id=1, )
-
โ๏ธ Parameters
-
-
news_item_id:
intโ The unique identifier for the news item which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
News Feeds
client.news.feeds.list_items(...)
-
๐ Description
-
-
You can fetch a list of all news items that are live on a given newsfeed
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.news.feeds.list_items( newsfeed_id="123", )
-
โ๏ธ Parameters
-
-
newsfeed_id:
strโ The unique identifier for the news feed item which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.news.feeds.list()
-
๐ Description
-
-
You can fetch a list of all newsfeeds
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.news.feeds.list()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.news.feeds.find(...)
-
๐ Description
-
-
You can fetch the details of a single newsfeed
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.news.feeds.find( newsfeed_id="123", )
-
โ๏ธ Parameters
-
-
newsfeed_id:
strโ The unique identifier for the news feed item which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
TicketTypes Attributes
client.ticket_types.attributes.create(...)
-
๐ Description
-
-
You can create a new attribute for a ticket type.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.ticket_types.attributes.create( ticket_type_id="ticket_type_id", name="Attribute Title", description="Attribute Description", data_type="string", required_to_create=False, )
-
โ๏ธ Parameters
-
-
ticket_type_id:
strโ The unique identifier for the ticket type which is given by Intercom.
-
name:
strโ The name of the ticket type attribute
-
description:
strโ The description of the attribute presented to the teammate or contact
-
data_type:
CreateTicketTypeAttributeRequestDataTypeโ The data type of the attribute
-
required_to_create:
typing.Optional[bool]โ Whether the attribute is required to be filled in when teammates are creating the ticket in Inbox.
-
required_to_create_for_contacts:
typing.Optional[bool]โ Whether the attribute is required to be filled in when contacts are creating the ticket in Messenger.
-
visible_on_create:
typing.Optional[bool]โ Whether the attribute is visible to teammates when creating a ticket in Inbox.
-
visible_to_contacts:
typing.Optional[bool]โ Whether the attribute is visible to contacts when creating a ticket in Messenger.
-
multiline:
typing.Optional[bool]โ Whether the attribute allows multiple lines of text (only applicable to string attributes)
-
list_items:
typing.Optional[str]โ A comma delimited list of items for the attribute value (only applicable to list attributes)
-
allow_multiple_values:
typing.Optional[bool]โ Whether the attribute allows multiple files to be attached to it (only applicable to file attributes)
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.ticket_types.attributes.update(...)
-
๐ Description
-
-
You can update an existing attribute for a ticket type.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.ticket_types.attributes.update( ticket_type_id="ticket_type_id", attribute_id="attribute_id", description="New Attribute Description", )
-
โ๏ธ Parameters
-
-
ticket_type_id:
strโ The unique identifier for the ticket type which is given by Intercom.
-
attribute_id:
strโ The unique identifier for the ticket type attribute which is given by Intercom.
-
name:
typing.Optional[str]โ The name of the ticket type attribute
-
description:
typing.Optional[str]โ The description of the attribute presented to the teammate or contact
-
required_to_create:
typing.Optional[bool]โ Whether the attribute is required to be filled in when teammates are creating the ticket in Inbox.
-
required_to_create_for_contacts:
typing.Optional[bool]โ Whether the attribute is required to be filled in when contacts are creating the ticket in Messenger.
-
visible_on_create:
typing.Optional[bool]โ Whether the attribute is visible to teammates when creating a ticket in Inbox.
-
visible_to_contacts:
typing.Optional[bool]โ Whether the attribute is visible to contacts when creating a ticket in Messenger.
-
multiline:
typing.Optional[bool]โ Whether the attribute allows multiple lines of text (only applicable to string attributes)
-
list_items:
typing.Optional[str]โ A comma delimited list of items for the attribute value (only applicable to list attributes)
-
allow_multiple_values:
typing.Optional[bool]โ Whether the attribute allows multiple files to be attached to it (only applicable to file attributes)
-
archived:
typing.Optional[bool]โ Whether the attribute should be archived and not shown during creation of the ticket (it will still be present on previously created tickets)
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Admins
client.unstable.admins.identify_admin()
-
๐ Description
-
-
You can view the currently authorised admin along with the embedded app object (a "workspace" in legacy terminology).
๐ง Single Sign On
If you are building a custom "Log in with Intercom" flow for your site, and you call the
/meendpoint to identify the logged-in user, you should not accept any sign-ins from users with unverified email addresses as it poses a potential impersonation security risk.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.admins.identify_admin()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.admins.set_away_admin(...)
-
๐ Description
-
-
You can set an Admin as away for the Inbox.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.admins.set_away_admin( id=1, away_mode_enabled=True, away_mode_reassign=True, )
-
โ๏ธ Parameters
-
-
id:
intโ The unique identifier of a given admin
-
away_mode_enabled:
boolโ Set to "true" to change the status of the admin to away.
-
away_mode_reassign:
boolโ Set to "true" to assign any new conversation replies to your default inbox.
-
away_status_reason_id:
typing.Optional[int]โ The unique identifier of the away status reason
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.admins.list_activity_logs(...)
-
๐ Description
-
-
You can get a log of activities by all admins in an app.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.admins.list_activity_logs( created_at_after="1677253093", created_at_before="1677861493", )
-
โ๏ธ Parameters
-
-
created_at_after:
strโ The start date that you request data for. It must be formatted as a UNIX timestamp.
-
created_at_before:
typing.Optional[str]โ The end date that you request data for. It must be formatted as a UNIX timestamp.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.admins.list_admins()
-
๐ Description
-
-
You can fetch a list of admins for a given workspace.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.admins.list_admins()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.admins.retrieve_admin(...)
-
๐ Description
-
-
You can retrieve the details of a single admin.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.admins.retrieve_admin( id=1, )
-
โ๏ธ Parameters
-
-
id:
intโ The unique identifier of a given admin
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
AI Content
client.unstable.ai_content.list_content_import_sources()
-
๐ Description
-
-
You can retrieve a list of all content import sources for a workspace.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.ai_content.list_content_import_sources()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.ai_content.create_content_import_source(...)
-
๐ Description
-
-
You can create a new content import source by sending a POST request to this endpoint.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.ai_content.create_content_import_source( url="https://www.example.com", )
-
โ๏ธ Parameters
-
-
url:
strโ The URL of the content import source.
-
status:
typing.Optional[CreateContentImportSourceRequestStatus]โ The status of the content import source.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.ai_content.get_content_import_source(...)
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.ai_content.get_content_import_source( id="id", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier for the content import source which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.ai_content.update_content_import_source(...)
-
๐ Description
-
-
You can update an existing content import source.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.ai_content.update_content_import_source( id="id", sync_behavior="api", url="https://www.example.com", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier for the content import source which is given by Intercom.
-
sync_behavior:
UpdateContentImportSourceRequestSyncBehaviorโ If you intend to create or update External Pages via the API, this should be set toapi. You can not change the value to or from api.
-
url:
strโ The URL of the content import source. This may only be different from the existing value if the sync behavior is API.
-
status:
typing.Optional[UpdateContentImportSourceRequestStatus]โ The status of the content import source.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.ai_content.delete_content_import_source(...)
-
๐ Description
-
-
You can delete a content import source by making a DELETE request this endpoint. This will also delete all external pages that were imported from this source.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.ai_content.delete_content_import_source( id="id", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier for the content import source which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.ai_content.list_external_pages()
-
๐ Description
-
-
You can retrieve a list of all external pages for a workspace.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.ai_content.list_external_pages()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.ai_content.create_external_page(...)
-
๐ Description
-
-
You can create a new external page by sending a POST request to this endpoint. If an external page already exists with the specified source_id and external_id, it will be updated instead.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.ai_content.create_external_page( title="Test", html="<html><body><h1>Test</h1></body></html>", url="https://www.example.com", source_id=44, external_id="abc1234", )
-
โ๏ธ Parameters
-
-
title:
strโ The title of the external page.
-
html:
strโ The body of the external page in HTML.
-
source_id:
intโ The unique identifier for the source of the external page which was given by Intercom. Every external page must be associated with a Content Import Source which represents the place it comes from and from which it inherits a default audience (configured in the UI). For a new source, make a POST request to the Content Import Source endpoint and an ID for the source will be returned in the response.
-
external_id:
strโ The identifier for the external page which was given by the source. Must be unique for the source.
-
url:
typing.Optional[str]โ The URL of the external page. This will be used by Fin to link end users to the page it based its answer on. When a URL is not present, Fin will not reference the source.
-
ai_agent_availability:
typing.Optional[bool]โ Whether the external page should be used to answer questions by AI Agent. Will not default when updating an existing external page.
-
ai_copilot_availability:
typing.Optional[bool]โ Whether the external page should be used to answer questions by AI Copilot. Will not default when updating an existing external page.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.ai_content.get_external_page(...)
-
๐ Description
-
-
You can retrieve an external page.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.ai_content.get_external_page( id="id", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier for the external page which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.ai_content.update_external_page(...)
-
๐ Description
-
-
You can update an existing external page (if it was created via the API).
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.ai_content.update_external_page( id="id", title="Test", html="<html><body><h1>Test</h1></body></html>", url="https://www.example.com", source_id=47, external_id="5678", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier for the external page which is given by Intercom.
-
title:
strโ The title of the external page.
-
html:
strโ The body of the external page in HTML.
-
url:
strโ The URL of the external page. This will be used by Fin to link end users to the page it based its answer on.
-
source_id:
intโ The unique identifier for the source of the external page which was given by Intercom. Every external page must be associated with a Content Import Source which represents the place it comes from and from which it inherits a default audience (configured in the UI). For a new source, make a POST request to the Content Import Source endpoint and an ID for the source will be returned in the response.
-
fin_availability:
typing.Optional[bool]โ Whether the external page should be used to answer questions by Fin.
-
external_id:
typing.Optional[str]โ The identifier for the external page which was given by the source. Must be unique for the source.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.ai_content.delete_external_page(...)
-
๐ Description
-
-
Sending a DELETE request for an external page will remove it from the content library UI and from being used for AI answers.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.ai_content.delete_external_page( id="id", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier for the external page which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Articles
client.unstable.articles.list_articles()
-
๐ Description
-
-
You can fetch a list of all articles by making a GET request to
https://api.intercom.io/articles.๐ How are the articles sorted and ordered?
Articles will be returned in descending order on the
updated_atattribute. This means if you need to iterate through results then we'll show the most recently updated articles first.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.articles.list_articles()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.articles.create_article(...)
-
๐ Description
-
-
You can create a new article by making a POST request to
https://api.intercom.io/articles.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.articles.create_article( request={"key": "value"}, )
-
โ๏ธ Parameters
-
-
request:
typing.Any
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.articles.retrieve_article(...)
-
๐ Description
-
-
You can fetch the details of a single article by making a GET request to
https://api.intercom.io/articles/<id>.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.articles.retrieve_article( id=1, )
-
โ๏ธ Parameters
-
-
id:
intโ The unique identifier for the article which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.articles.delete_article(...)
-
๐ Description
-
-
You can delete a single article by making a DELETE request to
https://api.intercom.io/articles/<id>.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.articles.delete_article( id=1, )
-
โ๏ธ Parameters
-
-
id:
intโ The unique identifier for the article which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.articles.search_articles(...)
-
๐ Description
-
-
You can search for articles by making a GET request to
https://api.intercom.io/articles/search.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.articles.search_articles( phrase="Getting started", state="published", help_center_id=1, highlight=True, )
-
โ๏ธ Parameters
-
-
phrase:
typing.Optional[str]โ The phrase within your articles to search for.
-
state:
typing.Optional[str]โ The state of the Articles returned. One ofpublished,draftorall.
-
help_center_id:
typing.Optional[int]โ The ID of the Help Center to search in.
-
highlight:
typing.Optional[bool]โ Return a highlighted version of the matching content within your articles. Refer to the response schema for more details.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Away Status Reasons
client.unstable.away_status_reasons.list_away_status_reasons()
-
๐ Description
-
-
Returns a list of all away status reasons configured for the workspace, including deleted ones.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.away_status_reasons.list_away_status_reasons()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Unstable Export
client.unstable.export.enqueue_a_new_reporting_data_export_job(...)
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.export.enqueue_a_new_reporting_data_export_job( dataset_id="conversation", attribute_ids=["conversation_id", "conversation_started_at"], start_time=1717490000, end_time=1717510000, )
-
โ๏ธ Parameters
-
-
dataset_id:
str
-
attribute_ids:
typing.Sequence[str]
-
start_time:
int
-
end_time:
int
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.export.list_available_datasets_and_attributes()
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.export.list_available_datasets_and_attributes()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Help Center
client.unstable.help_center.list_all_collections()
-
๐ Description
-
-
You can fetch a list of all collections by making a GET request to
https://api.intercom.io/help_center/collections.Collections will be returned in descending order on the
updated_atattribute. This means if you need to iterate through results then we'll show the most recently updated collections first.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.help_center.list_all_collections()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.help_center.create_collection(...)
-
๐ Description
-
-
You can create a new collection by making a POST request to
https://api.intercom.io/help_center/collections.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.help_center.create_collection( name="collection 51", description="Missing required parameter", )
-
โ๏ธ Parameters
-
-
name:
strโ The name of the collection. For multilingual collections, this will be the name of the default language's content.
-
description:
typing.Optional[str]โ The description of the collection. For multilingual collections, this will be the description of the default language's content.
-
translated_content:
typing.Optional[GroupTranslatedContent]
-
parent_id:
typing.Optional[str]โ The id of the parent collection. Ifnullthen it will be created as the first level collection.
-
help_center_id:
typing.Optional[int]โ The id of the help center where the collection will be created. Ifnullthen it will be created in the default help center.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.help_center.retrieve_collection(...)
-
๐ Description
-
-
You can fetch the details of a single collection by making a GET request to
https://api.intercom.io/help_center/collections/<id>.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.help_center.retrieve_collection( id=1, )
-
โ๏ธ Parameters
-
-
id:
intโ The unique identifier for the collection which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.help_center.update_collection(...)
-
๐ Description
-
-
You can update the details of a single collection by making a PUT request to
https://api.intercom.io/collections/<id>.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.help_center.update_collection( id=1, name="Update collection name", )
-
โ๏ธ Parameters
-
-
id:
intโ The unique identifier for the collection which is given by Intercom.
-
name:
typing.Optional[str]โ The name of the collection. For multilingual collections, this will be the name of the default language's content.
-
description:
typing.Optional[str]โ The description of the collection. For multilingual collections, this will be the description of the default language's content.
-
translated_content:
typing.Optional[GroupTranslatedContent]
-
parent_id:
typing.Optional[str]โ The id of the parent collection. Ifnullthen it will be updated as the first level collection.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.help_center.delete_collection(...)
-
๐ Description
-
-
You can delete a single collection by making a DELETE request to
https://api.intercom.io/collections/<id>.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.help_center.delete_collection( id=1, )
-
โ๏ธ Parameters
-
-
id:
intโ The unique identifier for the collection which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.help_center.retrieve_help_center(...)
-
๐ Description
-
-
You can fetch the details of a single Help Center by making a GET request to
https://api.intercom.io/help_center/help_center/<id>.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.help_center.retrieve_help_center( id=1, )
-
โ๏ธ Parameters
-
-
id:
intโ The unique identifier for the collection which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.help_center.list_help_centers()
-
๐ Description
-
-
You can list all Help Centers by making a GET request to
https://api.intercom.io/help_center/help_centers.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.help_center.list_help_centers()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Internal Articles
client.unstable.internal_articles.list_internal_articles()
-
๐ Description
-
-
You can fetch a list of all internal articles by making a GET request to
https://api.intercom.io/internal_articles.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.internal_articles.list_internal_articles()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.internal_articles.create_internal_article(...)
-
๐ Description
-
-
You can create a new internal article by making a POST request to
https://api.intercom.io/internal_articles.
-
๐ Usage
-
-
from intercom import Intercom from intercom.unstable import CreateInternalArticleRequest client = Intercom( token="YOUR_TOKEN", ) client.unstable.internal_articles.create_internal_article( request=CreateInternalArticleRequest( title="Thanks for everything", body="Body of the Internal Article", author_id=1295, owner_id=1295, ), )
-
โ๏ธ Parameters
-
-
request:
typing.Optional[CreateInternalArticleRequest]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.internal_articles.retrieve_internal_article(...)
-
๐ Description
-
-
You can fetch the details of a single internal article by making a GET request to
https://api.intercom.io/internal_articles/<id>.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.internal_articles.retrieve_internal_article( id=1, )
-
โ๏ธ Parameters
-
-
id:
intโ The unique identifier for the article which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.internal_articles.update_internal_article(...)
-
๐ Description
-
-
You can update the details of a single internal article by making a PUT request to
https://api.intercom.io/internal_articles/<id>.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.internal_articles.update_internal_article( id=1, title="Christmas is here!", body="<p>New gifts in store for the jolly season</p>", )
-
โ๏ธ Parameters
-
-
id:
intโ The unique identifier for the internal article which is given by Intercom.
-
title:
typing.Optional[str]โ The title of the article.
-
body:
typing.Optional[str]โ The content of the article.
-
author_id:
typing.Optional[int]โ The id of the author of the article.
-
owner_id:
typing.Optional[int]โ The id of the author of the article.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.internal_articles.delete_internal_article(...)
-
๐ Description
-
-
You can delete a single internal article by making a DELETE request to
https://api.intercom.io/internal_articles/<id>.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.internal_articles.delete_internal_article( id=1, )
-
โ๏ธ Parameters
-
-
id:
intโ The unique identifier for the internal article which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.internal_articles.search_internal_articles(...)
-
๐ Description
-
-
You can search for internal articles by making a GET request to
https://api.intercom.io/internal_articles/search.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.internal_articles.search_internal_articles( folder_id="folder_id", )
-
โ๏ธ Parameters
-
-
folder_id:
typing.Optional[str]โ The ID of the folder to search in.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Companies
client.unstable.companies.retrieve_company(...)
-
๐ Description
-
-
You can fetch a single company by passing in
company_idorname.https://api.intercom.io/companies?name={name}https://api.intercom.io/companies?company_id={company_id}You can fetch all companies and filter by
segment_idortag_idas a query parameter.https://api.intercom.io/companies?tag_id={tag_id}https://api.intercom.io/companies?segment_id={segment_id}
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.companies.retrieve_company( name="my company", company_id="12345", tag_id="678910", segment_id="98765", page=1, per_page=1, )
-
โ๏ธ Parameters
-
-
name:
typing.Optional[str]โ Thenameof the company to filter by.
-
company_id:
typing.Optional[str]โ Thecompany_idof the company to filter by.
-
tag_id:
typing.Optional[str]โ Thetag_idof the company to filter by.
-
segment_id:
typing.Optional[str]โ Thesegment_idof the company to filter by.
-
page:
typing.Optional[int]โ The page of results to fetch. Defaults to first page
-
per_page:
typing.Optional[int]โ How many results to display per page. Defaults to 15
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.companies.create_or_update_company(...)
-
๐ Description
-
-
You can create or update a company.
Companies will be only visible in Intercom when there is at least one associated user.
Companies are looked up via
company_idin aPOSTrequest, if not found viacompany_id, the new company will be created, if found, that company will be updated.{% admonition type="warning" name="Using
company_id" %} You can set a uniquecompany_idvalue when creating a company. However, it is not possible to updatecompany_id. Be sure to set a unique value once upon creation of the company. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.companies.create_or_update_company( request={"key": "value"}, )
-
โ๏ธ Parameters
-
-
request:
typing.Any
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.companies.retrieve_a_company_by_id(...)
-
๐ Description
-
-
You can fetch a single company.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.companies.retrieve_a_company_by_id( id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier for the company which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.companies.update_company(...)
-
๐ Description
-
-
You can update a single company using the Intercom provisioned
id.{% admonition type="warning" name="Using
company_id" %} When updating a company it is not possible to updatecompany_id. This can only be set once upon creation of the company. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.companies.update_company( id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier for the company which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.companies.delete_company(...)
-
๐ Description
-
-
You can delete a single company.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.companies.delete_company( id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier for the company which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.companies.list_attached_contacts(...)
-
๐ Description
-
-
You can fetch a list of all contacts that belong to a company.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.companies.list_attached_contacts( id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier for the company which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.companies.list_attached_segments_for_companies(...)
-
๐ Description
-
-
You can fetch a list of all segments that belong to a company.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.companies.list_attached_segments_for_companies( id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier for the company which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.companies.list_all_companies(...)
-
๐ Description
-
-
You can list companies. The company list is sorted by the
last_request_atfield and by default is ordered descending, most recently requested first.Note that the API does not include companies who have no associated users in list responses.
When using the Companies endpoint and the pages object to iterate through the returned companies, there is a limit of 10,000 Companies that can be returned. If you need to list or iterate on more than 10,000 Companies, please use the Scroll API. {% admonition type="warning" name="Pagination" %} You can use pagination to limit the number of results returned. The default is
20results per page. See the pagination section for more details on how to use thestarting_afterparam. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.companies.list_all_companies( page=1, per_page=1, order="desc", )
-
โ๏ธ Parameters
-
-
page:
typing.Optional[int]โ The page of results to fetch. Defaults to first page
-
per_page:
typing.Optional[int]โ How many results to return per page. Defaults to 15
-
order:
typing.Optional[str]โascordesc. Return the companies in ascending or descending order. Defaults to desc
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.companies.scroll_over_all_companies(...)
-
๐ Description
-
-
The `list all companies` functionality does not work well for huge datasets, and can result in errors and performance problems when paging deeply. The Scroll API provides an efficient mechanism for iterating over all companies in a dataset.- Each app can only have 1 scroll open at a time. You'll get an error message if you try to have more than one open per app.
- If the scroll isn't used for 1 minute, it expires and calls with that scroll param will fail
- If the end of the scroll is reached, "companies" will be empty and the scroll parameter will expire
{% admonition type="info" name="Scroll Parameter" %} You can get the first page of companies by simply sending a GET request to the scroll endpoint. For subsequent requests you will need to use the scroll parameter from the response. {% /admonition %} {% admonition type="danger" name="Scroll network timeouts" %} Since scroll is often used on large datasets network errors such as timeouts can be encountered. When this occurs you will see a HTTP 500 error with the following message: "Request failed due to an internal network error. Please restart the scroll operation." If this happens, you will need to restart your scroll query: It is not possible to continue from a specific point when using scroll. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.companies.scroll_over_all_companies( scroll_param="scroll_param", )
-
โ๏ธ Parameters
-
-
scroll_param:
typing.Optional[str]โ
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.companies.attach_contact_to_a_company(...)
-
๐ Description
-
-
You can attach a company to a single contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.companies.attach_contact_to_a_company( id="id", company_id="123", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier for the contact which is given by Intercom
-
company_id:
strโ The unique identifier for the company which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.companies.detach_contact_from_a_company(...)
-
๐ Description
-
-
You can detach a company from a single contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.companies.detach_contact_from_a_company( contact_id="58a430d35458202d41b1e65b", id="58a430d35458202d41b1e65b", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ The unique identifier for the contact which is given by Intercom
-
id:
strโ The unique identifier for the company which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Notes
client.unstable.notes.list_company_notes(...)
-
๐ Description
-
-
You can fetch a list of notes that are associated to a company.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.notes.list_company_notes( id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier for the company which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.notes.list_notes(...)
-
๐ Description
-
-
You can fetch a list of notes that are associated to a contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.notes.list_notes( id=1, )
-
โ๏ธ Parameters
-
-
id:
intโ The unique identifier of a contact.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.notes.create_note(...)
-
๐ Description
-
-
You can add a note to a single contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.notes.create_note( id=1, body="Hello", contact_id="123", admin_id="123", )
-
โ๏ธ Parameters
-
-
id:
intโ The unique identifier of a given contact.
-
body:
strโ The text of the note.
-
contact_id:
typing.Optional[str]โ The unique identifier of a given contact.
-
admin_id:
typing.Optional[str]โ The unique identifier of a given admin.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.notes.retrieve_note(...)
-
๐ Description
-
-
You can fetch the details of a single note.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.notes.retrieve_note( id=1, )
-
โ๏ธ Parameters
-
-
id:
intโ The unique identifier of a given note
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Contacts
client.unstable.contacts.list_companies_for_a_contact(...)
-
๐ Description
-
-
You can fetch a list of companies that are associated to a contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.contacts.list_companies_for_a_contact( id="63a07ddf05a32042dffac965", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier for the contact which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.contacts.list_segments_for_a_contact(...)
-
๐ Description
-
-
You can fetch a list of segments that are associated to a contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.contacts.list_segments_for_a_contact( contact_id="63a07ddf05a32042dffac965", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ The unique identifier for the contact which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.contacts.list_subscriptions_for_a_contact(...)
-
๐ Description
-
-
You can fetch a list of subscription types that are attached to a contact. These can be subscriptions that a user has 'opted-in' to or has 'opted-out' from, depending on the subscription type. This will return a list of Subscription Type objects that the contact is associated with.
The data property will show a combined list of:
1.Opt-out subscription types that the user has opted-out from. 2.Opt-in subscription types that the user has opted-in to receiving.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.contacts.list_subscriptions_for_a_contact( contact_id="63a07ddf05a32042dffac965", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ The unique identifier for the contact which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.contacts.list_tags_for_a_contact(...)
-
๐ Description
-
-
You can fetch a list of all tags that are attached to a specific contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.contacts.list_tags_for_a_contact( contact_id="63a07ddf05a32042dffac965", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ The unique identifier for the contact which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.contacts.show_contact(...)
-
๐ Description
-
-
You can fetch the details of a single contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.contacts.show_contact( id="63a07ddf05a32042dffac965", )
-
โ๏ธ Parameters
-
-
id:
strโ id
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.contacts.update_contact(...)
-
๐ Description
-
-
You can update an existing contact (ie. user or lead).
{% admonition type="info" %} This endpoint handles both contact updates and custom object associations.
See
update a contact with an association to a custom object instancein the request/response examples to see the custom object association format. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.contacts.update_contact( id="63a07ddf05a32042dffac965", custom_attributes={"order": ["21"]}, )
-
โ๏ธ Parameters
-
-
id:
strโ id
-
role:
typing.Optional[str]โ The role of the contact.
-
external_id:
typing.Optional[str]โ A unique identifier for the contact which is given to Intercom
-
email:
typing.Optional[str]โ The contacts email
-
phone:
typing.Optional[str]โ The contacts phone
-
name:
typing.Optional[str]โ The contacts name
-
avatar:
typing.Optional[str]โ An image URL containing the avatar of a contact
-
signed_up_at:
typing.Optional[int]โ The time specified for when a contact signed up
-
last_seen_at:
typing.Optional[int]โ The time when the contact was last seen (either where the Intercom Messenger was installed or when specified manually)
-
owner_id:
typing.Optional[int]โ The id of an admin that has been assigned account ownership of the contact
-
unsubscribed_from_emails:
typing.Optional[bool]โ Whether the contact is unsubscribed from emails
-
language_override:
typing.Optional[str]โ A preferred language setting for the contact, used by Intercom as the language of Fin and the Messenger even if their browser has a different setting. Supports ISO 639-1 two-letter language codes. If an unsupported code is supplied, the field will be set to null.
-
custom_attributes:
typing.Optional[typing.Dict[str, typing.Any]]โ The custom attributes which are set for the contact
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.contacts.delete_contact(...)
-
๐ Description
-
-
You can delete a single contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.contacts.delete_contact( id="id", )
-
โ๏ธ Parameters
-
-
id:
strโ id
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.contacts.merge_contact(...)
-
๐ Description
-
-
You can merge a contact with a
roleofleadinto a contact with aroleofuser.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.contacts.merge_contact( from_="6762f0d51bb69f9f2193bb7f", into="6762f0d51bb69f9f2193bb80", )
-
โ๏ธ Parameters
-
-
from_:
typing.Optional[str]โ The unique identifier for the contact to merge away from. Must be a lead.
-
into:
typing.Optional[str]โ The unique identifier for the contact to merge into. Must be a user.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.contacts.search_contacts(...)
-
๐ Description
-
-
You can search for multiple contacts by the value of their attributes in order to fetch exactly who you want.
To search for contacts, you need to send a
POSTrequest tohttps://api.intercom.io/contacts/search.This will accept a query object in the body which will define your filters in order to search for contacts.
{% admonition type="warning" name="Optimizing search queries" %} Search queries can be complex, so optimizing them can help the performance of your search. Use the
ANDandORoperators to combine multiple filters to get the exact results you need and utilize pagination to limit the number of results returned. The default is50results per page. See the pagination section for more details on how to use thestarting_afterparam. {% /admonition %}Contact Creation Delay
If a contact has recently been created, there is a possibility that it will not yet be available when searching. This means that it may not appear in the response. This delay can take a few minutes. If you need to be instantly notified it is recommended to use webhooks and iterate to see if they match your search filters.
Nesting & Limitations
You can nest these filters in order to get even more granular insights that pinpoint exactly what you need. Example: (1 OR 2) AND (3 OR 4). There are some limitations to the amount of multiple's there can be:
- There's a limit of max 2 nested filters
- There's a limit of max 15 filters for each AND or OR group
Searching for Timestamp Fields
All timestamp fields (created_at, updated_at etc.) are indexed as Dates for Contact Search queries; Datetime queries are not currently supported. This means you can only query for timestamp fields by day - not hour, minute or second. For example, if you search for all Contacts with a created_at value greater (>) than 1577869200 (the UNIX timestamp for January 1st, 2020 9:00 AM), that will be interpreted as 1577836800 (January 1st, 2020 12:00 AM). The search results will then include Contacts created from January 2nd, 2020 12:00 AM onwards. If you'd like to get contacts created on January 1st, 2020 you should search with a created_at value equal (=) to 1577836800 (January 1st, 2020 12:00 AM). This behaviour applies only to timestamps used in search queries. The search results will still contain the full UNIX timestamp and be sorted accordingly.
Accepted Fields
Most key listed as part of the Contacts Model are searchable, whether writeable or not. The value you search for has to match the accepted type, otherwise the query will fail (ie. as
created_ataccepts a date, thevaluecannot be a string such as"foorbar").Field Type id String role String
Accepts user or leadname String avatar String owner_id Integer email String email_domain String phone String formatted_phone String external_id String created_at Date (UNIX Timestamp) signed_up_at Date (UNIX Timestamp) updated_at Date (UNIX Timestamp) last_seen_at Date (UNIX Timestamp) last_contacted_at Date (UNIX Timestamp) last_replied_at Date (UNIX Timestamp) last_email_opened_at Date (UNIX Timestamp) last_email_clicked_at Date (UNIX Timestamp) language_override String browser String browser_language String os String location.country String location.region String location.city String unsubscribed_from_emails Boolean marked_email_as_spam Boolean has_hard_bounced Boolean ios_last_seen_at Date (UNIX Timestamp) ios_app_version String ios_device String ios_app_device String ios_os_version String ios_app_name String ios_sdk_version String android_last_seen_at Date (UNIX Timestamp) android_app_version String android_device String android_app_name String andoid_sdk_version String segment_id String tag_id String custom_attributes.{attribute_name} String Accepted Operators
{% admonition type="warning" name="Searching based on
created_at" %} You cannot use the<=or>=operators to search bycreated_at. {% /admonition %}The table below shows the operators you can use to define how you want to search for the value. The operator should be put in as a string (
"="). The operator has to be compatible with the field's type (eg. you cannot search with>for a given string value as it's only compatible for integer's and dates).Operator Valid Types Description = All Equals != All Doesn't Equal IN All In
Shortcut forORqueries
Values must be in ArrayNIN All Not In
Shortcut forOR !queries
Values must be in Array> Integer
Date (UNIX Timestamp)Greater than < Integer
Date (UNIX Timestamp)Lower than ~ String Contains !~ String Doesn't Contain ^ String Starts With $ String Ends With
-
๐ Usage
-
-
from intercom import Intercom from intercom.unstable import ( MultipleFilterSearchRequest, SingleFilterSearchRequest, StartingAfterPaging, ) client = Intercom( token="YOUR_TOKEN", ) client.unstable.contacts.search_contacts( query=MultipleFilterSearchRequest( operator="AND", value=[ SingleFilterSearchRequest( field="created_at", operator=">", value="1306054154", ) ], ), pagination=StartingAfterPaging( per_page=5, ), )
-
โ๏ธ Parameters
-
-
query:
SearchRequestQuery
-
pagination:
typing.Optional[StartingAfterPaging]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.contacts.list_contacts()
-
๐ Description
-
-
You can fetch a list of all contacts (ie. users or leads) in your workspace. {% admonition type="warning" name="Pagination" %} You can use pagination to limit the number of results returned. The default is
50results per page. See the pagination section for more details on how to use thestarting_afterparam. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.contacts.list_contacts()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.contacts.create_contact(...)
-
๐ Description
-
-
You can create a new contact (ie. user or lead).
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.contacts.create_contact( request={"email": "joebloggs@intercom.io"}, )
-
โ๏ธ Parameters
-
-
request:
CreateContactRequestTwo
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.contacts.show_contact_by_external_id(...)
-
๐ Description
-
-
You can fetch the details of a single contact by external ID. Note that this endpoint only supports users and not leads.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.contacts.show_contact_by_external_id( external_id="cdd29344-5e0c-4ef0-ac56-f9ba2979bc27", )
-
โ๏ธ Parameters
-
-
external_id:
strโ The external ID of the user that you want to retrieve
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.contacts.archive_contact(...)
-
๐ Description
-
-
You can archive a single contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.contacts.archive_contact( id="63a07ddf05a32042dffac965", )
-
โ๏ธ Parameters
-
-
id:
strโ id
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.contacts.unarchive_contact(...)
-
๐ Description
-
-
You can unarchive a single contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.contacts.unarchive_contact( id="63a07ddf05a32042dffac965", )
-
โ๏ธ Parameters
-
-
id:
strโ id
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.contacts.block_contact(...)
-
๐ Description
-
-
Block a single contact.
Note: conversations of the contact will also be archived during the process.
More details in FAQ How do I block Inbox spam?
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.contacts.block_contact( id="63a07ddf05a32042dffac965", )
-
โ๏ธ Parameters
-
-
id:
strโ id
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Subscription Types
client.unstable.subscription_types.attach_subscription_type_to_contact(...)
-
๐ Description
-
-
You can add a specific subscription to a contact. In Intercom, we have two different subscription types based on user consent - opt-out and opt-in:
1.Attaching a contact to an opt-out subscription type will opt that user out from receiving messages related to that subscription type.
2.Attaching a contact to an opt-in subscription type will opt that user in to receiving messages related to that subscription type.
This will return a subscription type model for the subscription type that was added to the contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.subscription_types.attach_subscription_type_to_contact( contact_id="63a07ddf05a32042dffac965", id="invalid_id", consent_type="opt_in", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ The unique identifier for the contact which is given by Intercom
-
id:
strโ The unique identifier for the subscription which is given by Intercom
-
consent_type:
strโ The consent_type of a subscription, opt_out or opt_in.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.subscription_types.detach_subscription_type_to_contact(...)
-
๐ Description
-
-
You can remove a specific subscription from a contact. This will return a subscription type model for the subscription type that was removed from the contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.subscription_types.detach_subscription_type_to_contact( contact_id="63a07ddf05a32042dffac965", id="37846", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ The unique identifier for the contact which is given by Intercom
-
id:
strโ The unique identifier for the subscription type which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.subscription_types.list_subscription_types()
-
๐ Description
-
-
You can list all subscription types. A list of subscription type objects will be returned.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.subscription_types.list_subscription_types()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Tags
client.unstable.tags.attach_tag_to_contact(...)
-
๐ Description
-
-
You can tag a specific contact. This will return a tag object for the tag that was added to the contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.tags.attach_tag_to_contact( contact_id="63a07ddf05a32042dffac965", id="123", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ The unique identifier for the contact which is given by Intercom
-
id:
strโ The unique identifier for the tag which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.tags.detach_tag_from_contact(...)
-
๐ Description
-
-
You can remove tag from a specific contact. This will return a tag object for the tag that was removed from the contact.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.tags.detach_tag_from_contact( contact_id="63a07ddf05a32042dffac965", id="7522907", )
-
โ๏ธ Parameters
-
-
contact_id:
strโ The unique identifier for the contact which is given by Intercom
-
id:
strโ The unique identifier for the tag which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.tags.attach_tag_to_conversation(...)
-
๐ Description
-
-
You can tag a specific conversation. This will return a tag object for the tag that was added to the conversation.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.tags.attach_tag_to_conversation( conversation_id="64619700005694", id="7522907", admin_id="780", )
-
โ๏ธ Parameters
-
-
conversation_id:
strโ conversation_id
-
id:
strโ The unique identifier for the tag which is given by Intercom
-
admin_id:
strโ The unique identifier for the admin which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.tags.detach_tag_from_conversation(...)
-
๐ Description
-
-
You can remove tag from a specific conversation. This will return a tag object for the tag that was removed from the conversation.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.tags.detach_tag_from_conversation( conversation_id="64619700005694", id="7522907", admin_id="123", )
-
โ๏ธ Parameters
-
-
conversation_id:
strโ conversation_id
-
id:
strโ id
-
admin_id:
strโ The unique identifier for the admin which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.tags.list_tags()
-
๐ Description
-
-
You can fetch a list of all tags for a given workspace.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.tags.list_tags()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.tags.create_tag(...)
-
๐ Description
-
-
You can use this endpoint to perform the following operations:
1. Create a new tag: You can create a new tag by passing in the tag name as specified in "Create or Update Tag Request Payload" described below.
2. Update an existing tag: You can update an existing tag by passing the id of the tag as specified in "Create or Update Tag Request Payload" described below.
3. Tag Companies: You can tag single company or a list of companies. You can tag a company by passing in the tag name and the company details as specified in "Tag Company Request Payload" described below. Also, if the tag doesn't exist then a new one will be created automatically.
4. Untag Companies: You can untag a single company or a list of companies. You can untag a company by passing in the tag id and the company details as specified in "Untag Company Request Payload" described below.
5. Tag Multiple Users: You can tag a list of users. You can tag the users by passing in the tag name and the user details as specified in "Tag Users Request Payload" described below.
Each operation will return a tag object.
-
๐ Usage
-
-
from intercom import Intercom from intercom.unstable import ( TagMultipleUsersRequest, TagMultipleUsersRequestUsersItem, ) client = Intercom( token="YOUR_TOKEN", ) client.unstable.tags.create_tag( request=TagMultipleUsersRequest( name="test", users=[ TagMultipleUsersRequestUsersItem( id="123", ) ], ), )
-
โ๏ธ Parameters
-
-
request:
CreateTagRequestBody
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.tags.find_tag(...)
-
๐ Description
-
-
You can fetch the details of tags that are on the workspace by their id. This will return a tag object.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.tags.find_tag( id="123", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier of a given tag
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.tags.delete_tag(...)
-
๐ Description
-
-
You can delete the details of tags that are on the workspace by passing in the id.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.tags.delete_tag( id="123", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier of a given tag
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.tags.attach_tag_to_ticket(...)
-
๐ Description
-
-
You can tag a specific ticket. This will return a tag object for the tag that was added to the ticket.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.tags.attach_tag_to_ticket( ticket_id="64619700005694", id="7522907", admin_id="780", )
-
โ๏ธ Parameters
-
-
ticket_id:
strโ ticket_id
-
id:
strโ The unique identifier for the tag which is given by Intercom
-
admin_id:
strโ The unique identifier for the admin which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.tags.detach_tag_from_ticket(...)
-
๐ Description
-
-
You can remove tag from a specific ticket. This will return a tag object for the tag that was removed from the ticket.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.tags.detach_tag_from_ticket( ticket_id="64619700005694", id="7522907", admin_id="123", )
-
โ๏ธ Parameters
-
-
ticket_id:
strโ ticket_id
-
id:
strโ The unique identifier for the tag which is given by Intercom
-
admin_id:
strโ The unique identifier for the admin which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Conversations
client.unstable.conversations.list_conversations(...)
-
๐ Description
-
-
You can fetch a list of all conversations.
You can optionally request the result page size and the cursor to start after to fetch the result. {% admonition type="warning" name="Pagination" %} You can use pagination to limit the number of results returned. The default is
20results per page. See the pagination section for more details on how to use thestarting_afterparam. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.conversations.list_conversations( per_page=1, starting_after="starting_after", )
-
โ๏ธ Parameters
-
-
per_page:
typing.Optional[int]โ How many results per page
-
starting_after:
typing.Optional[str]โ String used to get the next page of conversations.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.conversations.create_conversation(...)
-
๐ Description
-
-
You can create a conversation that has been initiated by a contact (ie. user or lead). The conversation can be an in-app message only.
{% admonition type="info" name="Sending for visitors" %} You can also send a message from a visitor by specifying their
user_idoridvalue in thefromfield, along with atypefield value ofcontact. This visitor will be automatically converted to a contact with a lead role once the conversation is created. {% /admonition %}This will return the Message model that has been created.
-
๐ Usage
-
-
from intercom import Intercom from intercom.unstable.conversations import CreateConversationRequestFrom client = Intercom( token="YOUR_TOKEN", ) client.unstable.conversations.create_conversation( from_=CreateConversationRequestFrom( type="user", id="123_doesnt_exist", ), body="Hello there", )
-
โ๏ธ Parameters
-
-
from_:
CreateConversationRequestFrom
-
body:
strโ The content of the message. HTML is not supported.
-
created_at:
typing.Optional[int]โ The time the conversation was created as a UTC Unix timestamp. If not provided, the current time will be used. This field is only recommneded for migrating past conversations from another source into Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.conversations.retrieve_conversation(...)
-
๐ Description
-
-
You can fetch the details of a single conversation.
This will return a single Conversation model with all its conversation parts.
{% admonition type="warning" name="Hard limit of 500 parts" %} The maximum number of conversation parts that can be returned via the API is 500. If you have more than that we will return the 500 most recent conversation parts. {% /admonition %}
For AI agent conversation metadata, please note that you need to have the agent enabled in your workspace, which is a paid feature.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.conversations.retrieve_conversation( id=1, display_as="plaintext", include_translations=True, )
-
โ๏ธ Parameters
-
-
id:
intโ The id of the conversation to target
-
display_as:
typing.Optional[str]โ Set to plaintext to retrieve conversation messages in plain text. This affects both the body and subject fields.
-
include_translations:
typing.Optional[bool]โ If set to true, conversation parts will be translated to the detected language of the conversation.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.conversations.update_conversation(...)
-
๐ Description
-
-
You can update an existing conversation.
{% admonition type="info" name="Replying and other actions" %} If you want to reply to a coveration or take an action such as assign, unassign, open, close or snooze, take a look at the reply and manage endpoints. {% /admonition %}
{% admonition type="info" %} This endpoint handles both conversation updates and custom object associations.
See
update a conversation with an association to a custom object instancein the request/response examples to see the custom object association format. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.conversations.update_conversation( id=1, display_as="plaintext", read=True, title="new conversation title", custom_attributes={"issue_type": "Billing", "priority": "High"}, )
-
โ๏ธ Parameters
-
-
id:
intโ The id of the conversation to target
-
display_as:
typing.Optional[str]โ Set to plaintext to retrieve conversation messages in plain text. This affects both the body and subject fields.
-
read:
typing.Optional[bool]โ Mark a conversation as read within Intercom.
-
title:
typing.Optional[str]โ The title given to the conversation
-
custom_attributes:
typing.Optional[CustomAttributes]
-
company_id:
typing.Optional[str]โ The ID of the company that the conversation is associated with. The unique identifier for the company which is given by Intercom. Set to nil to remove company.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.conversations.delete_conversation(...)
-
๐ Description
-
-
You can delete a single conversation.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.conversations.delete_conversation( id=1, )
-
โ๏ธ Parameters
-
-
id:
intโ id
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.conversations.search_conversations(...)
-
๐ Description
-
-
You can search for multiple conversations by the value of their attributes in order to fetch exactly which ones you want.
To search for conversations, you need to send a
POSTrequest tohttps://api.intercom.io/conversations/search.This will accept a query object in the body which will define your filters in order to search for conversations. {% admonition type="warning" name="Optimizing search queries" %} Search queries can be complex, so optimizing them can help the performance of your search. Use the
ANDandORoperators to combine multiple filters to get the exact results you need and utilize pagination to limit the number of results returned. The default is20results per page and maximum is150. See the pagination section for more details on how to use thestarting_afterparam. {% /admonition %}Nesting & Limitations
You can nest these filters in order to get even more granular insights that pinpoint exactly what you need. Example: (1 OR 2) AND (3 OR 4). There are some limitations to the amount of multiple's there can be:
- There's a limit of max 2 nested filters
- There's a limit of max 15 filters for each AND or OR group
Accepted Fields
Most keys listed in the conversation model are searchable, whether writeable or not. The value you search for has to match the accepted type, otherwise the query will fail (ie. as
created_ataccepts a date, thevaluecannot be a string such as"foorbar"). Thesource.bodyfield is unique as the search will not be performed against the entire value, but instead against every element of the value separately. For example, when searching for a conversation with a"I need support"body - the query should contain a=operator with the value"support"for such conversation to be returned. A query with a=operator and a"need support"value will not yield a result.Field Type id String created_at Date (UNIX timestamp) updated_at Date (UNIX timestamp) source.type String
Accepted fields areconversation,email,facebook,instagram,phone_call,phone_switch,push,sms,twitterandwhatsapp.source.id String source.delivered_as String source.subject String source.body String source.author.id String source.author.type String source.author.name String source.author.email String source.url String contact_ids String teammate_ids String admin_assignee_id String team_assignee_id String channel_initiated String open Boolean read Boolean state String waiting_since Date (UNIX timestamp) snoozed_until Date (UNIX timestamp) tag_ids String priority String statistics.time_to_assignment Integer statistics.time_to_admin_reply Integer statistics.time_to_first_close Integer statistics.time_to_last_close Integer statistics.median_time_to_reply Integer statistics.first_contact_reply_at Date (UNIX timestamp) statistics.first_assignment_at Date (UNIX timestamp) statistics.first_admin_reply_at Date (UNIX timestamp) statistics.first_close_at Date (UNIX timestamp) statistics.last_assignment_at Date (UNIX timestamp) statistics.last_assignment_admin_reply_at Date (UNIX timestamp) statistics.last_contact_reply_at Date (UNIX timestamp) statistics.last_admin_reply_at Date (UNIX timestamp) statistics.last_close_at Date (UNIX timestamp) statistics.last_closed_by_id String statistics.count_reopens Integer statistics.count_assignments Integer statistics.count_conversation_parts Integer conversation_rating.requested_at Date (UNIX timestamp) conversation_rating.replied_at Date (UNIX timestamp) conversation_rating.score Integer conversation_rating.remark String conversation_rating.contact_id String conversation_rating.admin_d String ai_agent_participated Boolean ai_agent.resolution_state String ai_agent.last_answer_type String ai_agent.rating Integer ai_agent.rating_remark String ai_agent.source_type String ai_agent.source_title String Accepted Operators
The table below shows the operators you can use to define how you want to search for the value. The operator should be put in as a string (
"="). The operator has to be compatible with the field's type (eg. you cannot search with>for a given string value as it's only compatible for integer's and dates).Operator Valid Types Description = All Equals != All Doesn't Equal IN All In Shortcut for ORqueries Values most be in ArrayNIN All Not In Shortcut for OR !queries Values must be in Array> Integer Date (UNIX Timestamp) Greater (or equal) than < Integer Date (UNIX Timestamp) Lower (or equal) than ~ String Contains !~ String Doesn't Contain ^ String Starts With $ String Ends With
-
๐ Usage
-
-
from intercom import Intercom from intercom.unstable import ( MultipleFilterSearchRequest, SingleFilterSearchRequest, StartingAfterPaging, ) client = Intercom( token="YOUR_TOKEN", ) client.unstable.conversations.search_conversations( query=MultipleFilterSearchRequest( operator="AND", value=[ SingleFilterSearchRequest( field="created_at", operator=">", value="1306054154", ) ], ), pagination=StartingAfterPaging( per_page=5, ), )
-
โ๏ธ Parameters
-
-
query:
SearchRequestQuery
-
pagination:
typing.Optional[StartingAfterPaging]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.conversations.reply_conversation(...)
-
๐ Description
-
-
You can reply to a conversation with a message from an admin or on behalf of a contact, or with a note for admins.
-
๐ Usage
-
-
from intercom import Intercom from intercom.unstable import ContactReplyIntercomUserIdRequest client = Intercom( token="YOUR_TOKEN", ) client.unstable.conversations.reply_conversation( id='123 or "last"', request=ContactReplyIntercomUserIdRequest( body="Thanks again :)", intercom_user_id="6762f1661bb69f9f2193bbbf", ), )
-
โ๏ธ Parameters
-
-
id:
strโ The Intercom provisioned identifier for the conversation or the string "last" to reply to the last part of the conversation
-
request:
ReplyConversationRequestBody
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.conversations.manage_conversation(...)
-
๐ Description
-
-
For managing conversations you can:
- Close a conversation
- Snooze a conversation to reopen on a future date
- Open a conversation which is
snoozedorclosed - Assign a conversation to an admin and/or team.
-
๐ Usage
-
-
from intercom import Intercom from intercom.unstable.conversations import ManageConversationRequestBody_Close client = Intercom( token="YOUR_TOKEN", ) client.unstable.conversations.manage_conversation( id="123", request=ManageConversationRequestBody_Close( admin_id="12345", ), )
-
โ๏ธ Parameters
-
-
id:
strโ The identifier for the conversation as given by Intercom.
-
request:
ManageConversationRequestBody
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.conversations.attach_contact_to_conversation(...)
-
๐ Description
-
-
You can add participants who are contacts to a conversation, on behalf of either another contact or an admin.
{% admonition type="warning" name="Contacts without an email" %} If you add a contact via the email parameter and there is no user/lead found on that workspace with he given email, then we will create a new contact with
roleset tolead. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom from intercom.unstable.conversations import ( AttachContactToConversationRequestCustomerIntercomUserId, ) client = Intercom( token="YOUR_TOKEN", ) client.unstable.conversations.attach_contact_to_conversation( id="123", admin_id="12345", customer=AttachContactToConversationRequestCustomerIntercomUserId( intercom_user_id="6762f19e1bb69f9f2193bbd5", ), )
-
โ๏ธ Parameters
-
-
id:
strโ The identifier for the conversation as given by Intercom.
-
admin_id:
typing.Optional[str]โ Theidof the admin who is adding the new participant.
-
customer:
typing.Optional[AttachContactToConversationRequestCustomer]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.conversations.detach_contact_from_conversation(...)
-
๐ Description
-
-
You can add participants who are contacts to a conversation, on behalf of either another contact or an admin.
{% admonition type="warning" name="Contacts without an email" %} If you add a contact via the email parameter and there is no user/lead found on that workspace with he given email, then we will create a new contact with
roleset tolead. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.conversations.detach_contact_from_conversation( conversation_id="123", contact_id="123", admin_id="5017690", )
-
โ๏ธ Parameters
-
-
conversation_id:
strโ The identifier for the conversation as given by Intercom.
-
contact_id:
strโ The identifier for the contact as given by Intercom.
-
admin_id:
strโ Theidof the admin who is performing the action.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.conversations.list_handling_events(...)
-
๐ Description
-
-
List all pause/resume events for a conversation. These events track when teammates paused or resumed handling a conversation.
Requires the
read_conversationsOAuth scope.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.conversations.list_handling_events( id="123", )
-
โ๏ธ Parameters
-
-
id:
strโ The identifier for the conversation as given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.conversations.redact_conversation(...)
-
๐ Description
-
-
You can redact a conversation part or the source message of a conversation (as seen in the source object).
{% admonition type="info" name="Redacting parts and messages" %} If you are redacting a conversation part, it must have a
body. If you are redacting a source message, it must have been created by a contact. We will return aconversation_part_not_redactableerror if these criteria are not met. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom from intercom.unstable import RedactConversationRequest_ConversationPart client = Intercom( token="YOUR_TOKEN", ) client.unstable.conversations.redact_conversation( request=RedactConversationRequest_ConversationPart( conversation_id="really_123_doesnt_exist", conversation_part_id="really_123_doesnt_exist", ), )
-
โ๏ธ Parameters
-
-
request:
RedactConversationRequest
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.conversations.convert_conversation_to_ticket(...)
-
๐ Description
-
-
You can convert a conversation to a ticket.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.conversations.convert_conversation_to_ticket( id=1, ticket_type_id="54", )
-
โ๏ธ Parameters
-
-
id:
intโ The id of the conversation to target
-
ticket_type_id:
strโ The ID of the type of ticket you want to convert the conversation to
-
attributes:
typing.Optional[TicketRequestCustomAttributes]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Unstable CustomChannelEvents
client.unstable.custom_channel_events.notify_new_conversation(...)
-
๐ Description
-
-
Notifies Intercom that a new conversation was created in your custom channel/platform. This triggers conversation creation and workflow automations within Intercom for your custom channel integration.
Note: This endpoint is currently under managed availability. Please reach out to your accounts team to discuss access and tailored, hands-on support.
-
๐ Usage
-
-
from intercom import Intercom from intercom.unstable import CustomChannelContact client = Intercom( token="YOUR_TOKEN", ) client.unstable.custom_channel_events.notify_new_conversation( event_id="evt_12345", external_conversation_id="conv_67890", contact=CustomChannelContact( type="user", external_id="user_001", name="Jane Doe", email="jane.doe@example.com", ), )
-
โ๏ธ Parameters
-
-
event_id:
strโ Unique identifier for the event.
-
external_conversation_id:
strโ Identifier for the conversation in your application.
-
contact:
CustomChannelContact
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.custom_channel_events.notify_new_message(...)
-
๐ Description
-
-
Notifies Intercom that a new message was sent in a conversation on your custom channel/platform. This allows Intercom to process the message and trigger any relevant workflow automations.
Note: This endpoint is currently under managed availability. Please reach out to your accounts team to discuss access and tailored, hands-on support.
-
๐ Usage
-
-
from intercom import Intercom from intercom.unstable import CustomChannelContact client = Intercom( token="YOUR_TOKEN", ) client.unstable.custom_channel_events.notify_new_message( event_id="evt_54321", external_conversation_id="conv_98765", contact=CustomChannelContact( type="user", external_id="user_002", name="John Smith", email="john.smith@example.com", ), body="Hello, I need help with my order.", )
-
โ๏ธ Parameters
-
-
body:
strโ The message content sent by the user.
-
event_id:
strโ Unique identifier for the event.
-
external_conversation_id:
strโ Identifier for the conversation in your application.
-
contact:
CustomChannelContact
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.custom_channel_events.notify_quick_reply_selected(...)
-
๐ Description
-
-
Notifies Intercom that a user selected a quick reply option in your custom channel/platform. This allows Intercom to process the response and trigger any relevant workflow automations.
Note: This endpoint is currently under managed availability. Please reach out to your accounts team to discuss access and tailored, hands-on support.
-
๐ Usage
-
-
from intercom import Intercom from intercom.unstable import CustomChannelContact client = Intercom( token="YOUR_TOKEN", ) client.unstable.custom_channel_events.notify_quick_reply_selected( event_id="evt_67890", external_conversation_id="conv_13579", contact=CustomChannelContact( type="user", external_id="user_003", name="Alice Example", email="alice@example.com", ), quick_reply_option_id="1234", )
-
โ๏ธ Parameters
-
-
quick_reply_option_id:
strโ Id of the selected quick reply option.
-
event_id:
strโ Unique identifier for the event.
-
external_conversation_id:
strโ Identifier for the conversation in your application.
-
contact:
CustomChannelContact
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.custom_channel_events.notify_attribute_collected(...)
-
๐ Description
-
-
Notifies Intercom that a user provided a response to an attribute collector in your custom channel/platform. This allows Intercom to process the attribute and trigger any relevant workflow automations.
Note: This endpoint is currently under managed availability. Please reach out to your accounts team to discuss access and tailored, hands-on support.
-
๐ Usage
-
-
from intercom import Intercom from intercom.unstable import CustomChannelAttribute, CustomChannelContact client = Intercom( token="YOUR_TOKEN", ) client.unstable.custom_channel_events.notify_attribute_collected( event_id="evt_24680", external_conversation_id="conv_11223", contact=CustomChannelContact( type="user", external_id="user_004", name="Bob Example", email="bob@example.com", ), attribute=CustomChannelAttribute( id="shipping_address", value="123 Main St, Springfield", ), )
-
โ๏ธ Parameters
-
-
attribute:
CustomChannelAttribute
-
event_id:
strโ Unique identifier for the event.
-
external_conversation_id:
strโ Identifier for the conversation in your application.
-
contact:
CustomChannelContact
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Custom Object Instances
client.unstable.custom_object_instances.get_custom_object_instances_by_external_id(...)
-
๐ Description
-
-
Fetch a Custom Object Instance by external_id.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.custom_object_instances.get_custom_object_instances_by_external_id( custom_object_type_identifier="Order", external_id="external_id", )
-
โ๏ธ Parameters
-
-
custom_object_type_identifier:
strโ The unique identifier of the custom object type that defines the structure of the custom object instance.
-
external_id:
str
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.custom_object_instances.create_custom_object_instances(...)
-
๐ Description
-
-
Create or update a custom object instance
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.custom_object_instances.create_custom_object_instances( custom_object_type_identifier="Order", external_id="123", external_created_at=1392036272, external_updated_at=1392036272, custom_attributes={ "order_number": "ORDER-12345", "total_amount": "custom_attributes", }, )
-
โ๏ธ Parameters
-
-
custom_object_type_identifier:
strโ The unique identifier of the custom object type that defines the structure of the custom object instance.
-
external_id:
typing.Optional[str]โ A unique identifier for the Custom Object instance in the external system it originated from.
-
external_created_at:
typing.Optional[int]โ The time when the Custom Object instance was created in the external system it originated from.
-
external_updated_at:
typing.Optional[int]โ The time when the Custom Object instance was last updated in the external system it originated from.
-
custom_attributes:
typing.Optional[typing.Dict[str, typing.Optional[str]]]โ The custom attributes which are set for the Custom Object instance.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.custom_object_instances.delete_custom_object_instances_by_id(...)
-
๐ Description
-
-
Delete a single Custom Object instance by external_id.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.custom_object_instances.delete_custom_object_instances_by_id( custom_object_type_identifier="Order", external_id="external_id", )
-
โ๏ธ Parameters
-
-
custom_object_type_identifier:
strโ The unique identifier of the custom object type that defines the structure of the custom object instance.
-
external_id:
str
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.custom_object_instances.get_custom_object_instances_by_id(...)
-
๐ Description
-
-
Fetch a Custom Object Instance by id.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.custom_object_instances.get_custom_object_instances_by_id( custom_object_type_identifier="Order", id="id", )
-
โ๏ธ Parameters
-
-
custom_object_type_identifier:
strโ The unique identifier of the custom object type that defines the structure of the custom object instance.
-
id:
strโ The id or external_id of the custom object instance
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.custom_object_instances.delete_custom_object_instances_by_external_id(...)
-
๐ Description
-
-
Delete a single Custom Object instance using the Intercom defined id.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.custom_object_instances.delete_custom_object_instances_by_external_id( custom_object_type_identifier="Order", id="id", )
-
โ๏ธ Parameters
-
-
custom_object_type_identifier:
strโ The unique identifier of the custom object type that defines the structure of the custom object instance.
-
id:
strโ The Intercom defined id of the custom object instance
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Data Attributes
client.unstable.data_attributes.lis_data_attributes(...)
-
๐ Description
-
-
You can fetch a list of all data attributes belonging to a workspace for contacts, companies or conversations.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.data_attributes.lis_data_attributes( model="contact", include_archived=True, )
-
โ๏ธ Parameters
-
-
model:
typing.Optional[LisDataAttributesRequestModel]โ Specify the data attribute model to return.
-
include_archived:
typing.Optional[bool]โ Include archived attributes in the list. By default we return only non archived data attributes.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.data_attributes.create_data_attribute(...)
-
๐ Description
-
-
You can create a data attributes for a
contactor acompany.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.data_attributes.create_data_attribute( request={"key": "value"}, )
-
โ๏ธ Parameters
-
-
request:
typing.Any
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.data_attributes.update_data_attribute(...)
-
๐ Description
-
-
You can update a data attribute.
๐ง Updating the data type is not possible
It is currently a dangerous action to execute changing a data attribute's type via the API. You will need to update the type via the UI instead.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.data_attributes.update_data_attribute( id=1, request={"key": "value"}, )
-
โ๏ธ Parameters
-
-
id:
intโ The data attribute id
-
request:
typing.Any
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Data Events
client.unstable.data_events.lis_data_events(...)
-
๐ Description
-
-
๐ง
Please note that you can only 'list' events that are less than 90 days old. Event counts and summaries will still include your events older than 90 days but you cannot 'list' these events individually if they are older than 90 days
The events belonging to a customer can be listed by sending a GET request to
https://api.intercom.io/eventswith a user or lead identifier along with atypeparameter. The identifier parameter can be one ofuser_id,emailorintercom_user_id. Thetypeparameter value must beuser.https://api.intercom.io/events?type=user&user_id={user_id}https://api.intercom.io/events?type=user&email={email}https://api.intercom.io/events?type=user&intercom_user_id={id}(this call can be used to list leads)
The
emailparameter value should be url encoded when sending.You can optionally define the result page size as well with the
per_pageparameter.
-
๐ Usage
-
-
from intercom import Intercom from intercom.unstable.data_events import LisDataEventsRequestFilterUserId client = Intercom( token="YOUR_TOKEN", ) client.unstable.data_events.lis_data_events( filter=LisDataEventsRequestFilterUserId( user_id="user_id", ), type="type", )
-
โ๏ธ Parameters
-
-
filter:
LisDataEventsRequestFilter
-
type:
strโ The value must be user
-
summary:
typing.Optional[bool]โ summary flag
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.data_events.create_data_event(...)
-
๐ Description
-
-
You will need an Access Token that has write permissions to send Events. Once you have a key you can submit events via POST to the Events resource, which is located at https://api.intercom.io/events, or you can send events using one of the client libraries. When working with the HTTP API directly a client should send the event with a
Content-Typeofapplication/json.When using the JavaScript API, adding the code to your app makes the Events API available. Once added, you can submit an event using the
trackEventmethod. This will associate the event with the Lead or currently logged-in user or logged-out visitor/lead and send it to Intercom. The final parameter is a map that can be used to send optional metadata about the event.With the Ruby client you pass a hash describing the event to
Intercom::Event.create, or call thetrack_usermethod directly on the current user object (e.g.user.track_event).NB: For the JSON object types, please note that we do not currently support nested JSON structure.
Type Description Example String The value is a JSON String "source":"desktop"Number The value is a JSON Number "load": 3.67Date The key ends with the String _dateand the value is a Unix timestamp, assumed to be in the UTC timezone."contact_date": 1392036272Link The value is a HTTP or HTTPS URI. "article": "https://example.org/ab1de.html"Rich Link The value is a JSON object that contains urlandvaluekeys."article": {"url": "https://example.org/ab1de.html", "value":"the dude abides"}Monetary Amount The value is a JSON object that contains amountandcurrencykeys. Theamountkey is a positive integer representing the amount in cents. The price in the example to the right denotes โฌ349.99."price": {"amount": 34999, "currency": "eur"}Lead Events
When submitting events for Leads, you will need to specify the Lead's
id.Metadata behaviour
- We currently limit the number of tracked metadata keys to 10 per event. Once the quota is reached, we ignore any further keys we receive. The first 10 metadata keys are determined by the order in which they are sent in with the event.
- It is not possible to change the metadata keys once the event has been sent. A new event will need to be created with the new keys and you can archive the old one.
- There might be up to 24 hrs delay when you send a new metadata for an existing event.
Event de-duplication
The API may detect and ignore duplicate events. Each event is uniquely identified as a combination of the following data - the Workspace identifier, the Contact external identifier, the Data Event name and the Data Event created time. As a result, it is strongly recommended to send a second granularity Unix timestamp in the
created_atfield.Duplicated events are responded to using the normal
202 Acceptedcode - an error is not thrown, however repeat requests will be counted against any rate limit that is in place.HTTP API Responses
- Successful responses to submitted events return
202 Acceptedwith an empty body. - Unauthorised access will be rejected with a
401 Unauthorizedor403 Forbiddenresponse code. - Events sent about users that cannot be found will return a
404 Not Found. - Event lists containing duplicate events will have those duplicates ignored.
- Server errors will return a
500response code and may contain an error message in the body.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.data_events.create_data_event( request={"key": "value"}, )
-
โ๏ธ Parameters
-
-
request:
CreateDataEventRequestTwo
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.data_events.data_event_summaries(...)
-
๐ Description
-
-
Create event summaries for a user. Event summaries are used to track the number of times an event has occurred, the first time it occurred and the last time it occurred.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.data_events.data_event_summaries()
-
โ๏ธ Parameters
-
-
user_id:
typing.Optional[str]โ Your identifier for the user.
-
event_summaries:
typing.Optional[CreateDataEventSummariesRequestEventSummaries]โ A list of event summaries for the user. Each event summary should contain the event name, the time the event occurred, and the number of times the event occurred. The event name should be a past tense 'verb-noun' combination, to improve readability, for exampleupdated-plan.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Data Export
client.unstable.data_export.create_data_export(...)
-
๐ Description
-
-
To create your export job, you need to send a
POSTrequest to the export endpointhttps://api.intercom.io/export/content/data.The only parameters you need to provide are the range of dates that you want exported.
๐ง Limit of one active job
You can only have one active job per workspace. You will receive a HTTP status code of 429 with the message Exceeded rate limit of 1 pending message data export jobs if you attempt to create a second concurrent job.
โ๏ธ Updated_at not included
It should be noted that the timeframe only includes messages sent during the time period and not messages that were only updated during this period. For example, if a message was updated yesterday but sent two days ago, you would need to set the created_at_after date before the message was sent to include that in your retrieval job.
๐ Date ranges are inclusive
Requesting data for 2018-06-01 until 2018-06-30 will get all data for those days including those specified - e.g. 2018-06-01 00:00:00 until 2018-06-30 23:59:99.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.data_export.create_data_export( created_at_after=1734519776, created_at_before=1734537776, )
-
โ๏ธ Parameters
-
-
created_at_after:
intโ The start date that you request data for. It must be formatted as a unix timestamp.
-
created_at_before:
intโ The end date that you request data for. It must be formatted as a unix timestamp.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.data_export.get_data_export(...)
-
๐ Description
-
-
You can view the status of your job by sending a
GETrequest to the URLhttps://api.intercom.io/export/content/data/{job_identifier}- the{job_identifier}is the value returned in the response when you first created the export job. More on it can be seen in the Export Job Model.๐ง Jobs expire after two days All jobs that have completed processing (and are thus available to download from the provided URL) will have an expiry limit of two days from when the export ob completed. After this, the data will no longer be available.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.data_export.get_data_export( job_identifier="job_identifier", )
-
โ๏ธ Parameters
-
-
job_identifier:
strโ job_identifier
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.data_export.cancel_data_export(...)
-
๐ Description
-
-
You can cancel your job
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.data_export.cancel_data_export( job_identifier="job_identifier", )
-
โ๏ธ Parameters
-
-
job_identifier:
strโ job_identifier
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.data_export.download_data_export(...)
-
๐ Description
-
-
When a job has a status of complete, and thus a filled download_url, you can download your data by hitting that provided URL, formatted like so: https://api.intercom.io/download/content/data/xyz1234.
Your exported message data will be streamed continuously back down to you in a gzipped CSV format.
๐ Octet header required
You will have to specify the header Accept:
application/octet-streamwhen hitting this endpoint.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.data_export.download_data_export( job_identifier="job_identifier", )
-
โ๏ธ Parameters
-
-
job_identifier:
strโ job_identifier
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Workflows
client.unstable.workflows.export_workflow(...)
-
๐ Description
-
-
Export a workflow configuration by its ID. This endpoint returns the complete workflow definition including its steps, targeting rules, and attributes.
This endpoint is designed for EU Data Act compliance, allowing customers to export their workflow configurations.
{% admonition type="warning" name="Unstable API" %} This API is currently in the Unstable version. Its behavior may change in future releases. {% /admonition %}
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.workflows.export_workflow( id="12345", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier for the workflow
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Jobs
client.unstable.jobs.status(...)
-
๐ Description
-
-
Retrieve the status of job execution.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.jobs.status( id="id", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier for the job which is given by Intercom
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Macros
client.unstable.macros.list_macros(...)
-
๐ Description
-
-
You can fetch a list of all macros (saved replies) in your workspace for use in automating responses.
The macros are returned in descending order by updated_at.
Pagination
This endpoint uses cursor-based pagination via the
starting_afterparameter. The cursor is a Base64-encoded JSON array containing[updated_at, id]of the last item from the previous page.Placeholder Transformation
The API transforms Intercom placeholders to a more standard XML-like format:
- From:
{{user.name | fallback: 'there'}} - To:
<attribute key="user.name" default="there"/>
- From:
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.macros.list_macros( per_page=1, starting_after="WzE3MTk0OTM3NTcuMCwgIjEyMyJd", updated_since=1000000, )
-
โ๏ธ Parameters
-
-
per_page:
typing.Optional[int]โ The number of results per page
-
starting_after:
typing.Optional[str]โ Base64-encoded cursor containing [updated_at, id] for pagination
-
updated_since:
typing.Optional[int]โ Unix timestamp to filter macros updated after this time
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.macros.get_macro(...)
-
๐ Description
-
-
You can fetch a single macro (saved reply) by its ID. The macro will only be returned if it is visible to the authenticated user based on its visibility settings.
Visibility Rules
A macro is returned based on its
visible_tosetting:everyone: Always visible to all team membersspecific_teams: Only visible if the authenticated user belongs to one of the teams specified invisible_to_team_ids
If a macro exists but is not visible to the authenticated user, a 404 error is returned.
Placeholder Transformation
The API transforms Intercom placeholders to a more standard XML-like format in the
bodyfield:- From:
{{user.name | fallback: 'there'}} - To:
<attribute key="user.name" default="there"/>
Default values in placeholders are HTML-escaped for security.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.macros.get_macro( id="123", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier of the macro
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Messages
client.unstable.messages.create_message(...)
-
๐ Description
-
-
You can create a message that has been initiated by an admin. The conversation can be either an in-app message, an email, sms or whatsapp.
๐ง Sending for visitors
There can be a short delay between when a contact is created and when a contact becomes available to be messaged through the API. A 404 Not Found error will be returned in this case.
This will return the Message model that has been created.
๐ง Retrieving Associated Conversations
As this is a message, there will be no conversation present until the contact responds. Once they do, you will have to search for a contact's conversations with the id of the message.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.messages.create_message( request={ "from": {"type": "admin", "id": "991267821"}, "to": {"type": "user", "id": "6762f23b1bb69f9f2193bc1d"}, "message_type": "sms", "body": "heyy https://picsum.photos/200/300", }, )
-
โ๏ธ Parameters
-
-
request:
typing.Optional[CreateMessageRequest]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.messages.get_whats_app_message_status(...)
-
๐ Description
-
-
Retrieves statuses of messages sent from the Outbound module. Currently, this API only supports WhatsApp messages.
This endpoint returns paginated status events for WhatsApp messages sent via the Outbound module, providing information about delivery state and related message details.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.messages.get_whats_app_message_status( ruleset_id="ruleset_id", per_page=1, starting_after="starting_after", )
-
โ๏ธ Parameters
-
-
ruleset_id:
strโ The unique identifier for the set of messages to check status for
-
per_page:
typing.Optional[int]โ Number of results per page (default 50, max 100)
-
starting_after:
typing.Optional[str]โ Cursor for pagination, used to fetch the next page of results
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
News
client.unstable.news.list_news_items()
-
๐ Description
-
-
You can fetch a list of all news items
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.news.list_news_items()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.news.create_news_item(...)
-
๐ Description
-
-
You can create a news item
-
๐ Usage
-
-
from intercom import Intercom from intercom.unstable.news import NewsfeedAssignment client = Intercom( token="YOUR_TOKEN", ) client.unstable.news.create_news_item( title="Halloween is here!", body="<p>New costumes in store for this spooky season</p>", sender_id=991267834, state="live", deliver_silently=True, labels=["Product", "Update", "New"], reactions=["๐", "๐ "], newsfeed_assignments=[ NewsfeedAssignment( newsfeed_id=53, published_at=1664638214, ) ], )
-
โ๏ธ Parameters
-
-
title:
strโ The title of the news item.
-
sender_id:
intโ The id of the sender of the news item. Must be a teammate on the workspace.
-
body:
typing.Optional[str]โ The news item body, which may contain HTML.
-
state:
typing.Optional[NewsItemRequestState]โ News items will not be visible to your users in the assigned newsfeeds until they are set live.
-
deliver_silently:
typing.Optional[bool]โ When set totrue, the news item will appear in the messenger newsfeed without showing a notification badge.
-
labels:
typing.Optional[typing.Sequence[str]]โ Label names displayed to users to categorize the news item.
-
reactions:
typing.Optional[typing.Sequence[typing.Optional[str]]]โ Ordered list of emoji reactions to the news item. When empty, reactions are disabled.
-
newsfeed_assignments:
typing.Optional[typing.Sequence[NewsfeedAssignment]]โ A list of newsfeed_assignments to assign to the specified newsfeed.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.news.retrieve_news_item(...)
-
๐ Description
-
-
You can fetch the details of a single news item.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.news.retrieve_news_item( id=1, )
-
โ๏ธ Parameters
-
-
id:
intโ The unique identifier for the news item which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.news.update_news_item(...)
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.news.update_news_item( id=1, title="Christmas is here!", body="<p>New gifts in store for the jolly season</p>", sender_id=991267848, reactions=["๐", "๐"], )
-
โ๏ธ Parameters
-
-
id:
intโ The unique identifier for the news item which is given by Intercom.
-
title:
strโ The title of the news item.
-
sender_id:
intโ The id of the sender of the news item. Must be a teammate on the workspace.
-
body:
typing.Optional[str]โ The news item body, which may contain HTML.
-
state:
typing.Optional[NewsItemRequestState]โ News items will not be visible to your users in the assigned newsfeeds until they are set live.
-
deliver_silently:
typing.Optional[bool]โ When set totrue, the news item will appear in the messenger newsfeed without showing a notification badge.
-
labels:
typing.Optional[typing.Sequence[str]]โ Label names displayed to users to categorize the news item.
-
reactions:
typing.Optional[typing.Sequence[typing.Optional[str]]]โ Ordered list of emoji reactions to the news item. When empty, reactions are disabled.
-
newsfeed_assignments:
typing.Optional[typing.Sequence[NewsfeedAssignment]]โ A list of newsfeed_assignments to assign to the specified newsfeed.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.news.delete_news_item(...)
-
๐ Description
-
-
You can delete a single news item.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.news.delete_news_item( id=1, )
-
โ๏ธ Parameters
-
-
id:
intโ The unique identifier for the news item which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.news.list_live_newsfeed_items(...)
-
๐ Description
-
-
You can fetch a list of all news items that are live on a given newsfeed
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.news.list_live_newsfeed_items( id="123", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier for the news feed item which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.news.list_newsfeeds()
-
๐ Description
-
-
You can fetch a list of all newsfeeds
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.news.list_newsfeeds()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.news.retrieve_newsfeed(...)
-
๐ Description
-
-
You can fetch the details of a single newsfeed
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.news.retrieve_newsfeed( id="123", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier for the news feed item which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Segments
client.unstable.segments.list_segments(...)
-
๐ Description
-
-
You can fetch a list of all segments.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.segments.list_segments( include_count=True, )
-
โ๏ธ Parameters
-
-
include_count:
typing.Optional[bool]โ It includes the count of contacts that belong to each segment.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.segments.retrieve_segment(...)
-
๐ Description
-
-
You can fetch the details of a single segment.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.segments.retrieve_segment( id="123", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identified of a given segment.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Switch
client.unstable.switch.create_phone_switch(...)
-
๐ Description
-
-
You can use the API to deflect phone calls to the Intercom Messenger. Calling this endpoint will send an SMS with a link to the Messenger to the phone number specified.
If custom attributes are specified, they will be added to the user or lead's custom data attributes.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.switch.create_phone_switch( request={"key": "value"}, )
-
โ๏ธ Parameters
-
-
request:
typing.Any
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Calls
client.unstable.calls.list_calls(...)
-
๐ Description
-
-
Retrieve a paginated list of calls.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.calls.list_calls( page=1, per_page=1, )
-
โ๏ธ Parameters
-
-
page:
typing.Optional[int]โ The page of results to fetch. Defaults to first page
-
per_page:
typing.Optional[int]โ How many results to display per page. Defaults to 25. Max 25.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.calls.show_call(...)
-
๐ Description
-
-
Retrieve a single call by id.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.calls.show_call( id="id", )
-
โ๏ธ Parameters
-
-
id:
strโ The id of the call to retrieve
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.calls.show_call_recording(...)
-
๐ Description
-
-
Redirects to a signed URL for the call's recording if it exists.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.calls.show_call_recording( id="id", )
-
โ๏ธ Parameters
-
-
id:
strโ The id of the call
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.calls.show_call_transcript(...)
-
๐ Description
-
-
Returns the transcript for the specified call as a downloadable text file.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.calls.show_call_transcript( id="id", )
-
โ๏ธ Parameters
-
-
id:
strโ The id of the call
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.calls.list_calls_with_transcripts(...)
-
๐ Description
-
-
Retrieve calls by a list of conversation ids and include transcripts when available. A maximum of 20
conversation_idscan be provided. If none are provided or more than 20 are provided, a 400 error is returned.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.calls.list_calls_with_transcripts( conversation_ids=["64619700005694", "64619700005695"], )
-
โ๏ธ Parameters
-
-
conversation_ids:
typing.Sequence[str]โ A list of conversation ids to fetch calls for. Maximum 20.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.calls.register_fin_voice_call(...)
-
๐ Description
-
-
Register a Fin Voice call with Intercom. This endpoint creates an external reference that links an external call identifier to an Intercom call and conversation.
The call can be from different sources:
- AWS Connect (default)
- Five9
- Zoom Phone
-
๐ Usage
-
-
from intercom import Intercom from intercom.unstable import RegisterFinVoiceCallRequest client = Intercom( token="YOUR_TOKEN", ) client.unstable.calls.register_fin_voice_call( request=RegisterFinVoiceCallRequest( phone_number="+1234567890", call_id="call-123-abc", ), )
-
โ๏ธ Parameters
-
-
request:
typing.Optional[RegisterFinVoiceCallRequest]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.calls.collect_fin_voice_call_by_id(...)
-
๐ Description
-
-
Retrieve information about a Fin Voice call using the external reference ID.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.calls.collect_fin_voice_call_by_id( id=1, )
-
โ๏ธ Parameters
-
-
id:
intโ The external reference ID
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.calls.collect_fin_voice_call_by_external_id(...)
-
๐ Description
-
-
Retrieve information about a Fin Voice call using the external call identifier.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.calls.collect_fin_voice_call_by_external_id( external_id="external_id", )
-
โ๏ธ Parameters
-
-
external_id:
strโ The external call identifier from the call provider
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.calls.collect_fin_voice_call_by_phone_number(...)
-
๐ Description
-
-
Retrieve information about a Fin Voice call using the phone number.
Returns the most recent matched call for the given phone number, ordered by creation date.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.calls.collect_fin_voice_call_by_phone_number( phone_number="phone_number", )
-
โ๏ธ Parameters
-
-
phone_number:
strโ Phone number in E.164 format
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Teams
client.unstable.teams.list_teams()
-
๐ Description
-
-
This will return a list of team objects for the App.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.teams.list_teams()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.teams.retrieve_team(...)
-
๐ Description
-
-
You can fetch the details of a single team, containing an array of admins that belong to this team.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.teams.retrieve_team( id="123", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier of a given team.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Ticket States
client.unstable.ticket_states.list_ticket_states()
-
๐ Description
-
-
You can get a list of all ticket states for a workspace.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.ticket_states.list_ticket_states()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Ticket Type Attributes
client.unstable.ticket_type_attributes.create_ticket_type_attribute(...)
-
๐ Description
-
-
You can create a new attribute for a ticket type.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.ticket_type_attributes.create_ticket_type_attribute( ticket_type_id="ticket_type_id", name="Attribute Title", description="Attribute Description", data_type="string", required_to_create=False, )
-
โ๏ธ Parameters
-
-
ticket_type_id:
strโ The unique identifier for the ticket type which is given by Intercom.
-
name:
strโ The name of the ticket type attribute
-
description:
strโ The description of the attribute presented to the teammate or contact
-
data_type:
CreateTicketTypeAttributeRequestDataTypeโ The data type of the attribute
-
required_to_create:
typing.Optional[bool]โ Whether the attribute is required to be filled in when teammates are creating the ticket in Inbox.
-
required_to_create_for_contacts:
typing.Optional[bool]โ Whether the attribute is required to be filled in when contacts are creating the ticket in Messenger.
-
visible_on_create:
typing.Optional[bool]โ Whether the attribute is visible to teammates when creating a ticket in Inbox.
-
visible_to_contacts:
typing.Optional[bool]โ Whether the attribute is visible to contacts when creating a ticket in Messenger.
-
multiline:
typing.Optional[bool]โ Whether the attribute allows multiple lines of text (only applicable to string attributes)
-
list_items:
typing.Optional[str]โ A comma delimited list of items for the attribute value (only applicable to list attributes)
-
allow_multiple_values:
typing.Optional[bool]โ Whether the attribute allows multiple files to be attached to it (only applicable to file attributes)
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.ticket_type_attributes.update_ticket_type_attribute(...)
-
๐ Description
-
-
You can update an existing attribute for a ticket type.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.ticket_type_attributes.update_ticket_type_attribute( ticket_type_id="ticket_type_id", id="id", description="New Attribute Description", )
-
โ๏ธ Parameters
-
-
ticket_type_id:
strโ The unique identifier for the ticket type which is given by Intercom.
-
id:
strโ The unique identifier for the ticket type attribute which is given by Intercom.
-
name:
typing.Optional[str]โ The name of the ticket type attribute
-
description:
typing.Optional[str]โ The description of the attribute presented to the teammate or contact
-
required_to_create:
typing.Optional[bool]โ Whether the attribute is required to be filled in when teammates are creating the ticket in Inbox.
-
required_to_create_for_contacts:
typing.Optional[bool]โ Whether the attribute is required to be filled in when contacts are creating the ticket in Messenger.
-
visible_on_create:
typing.Optional[bool]โ Whether the attribute is visible to teammates when creating a ticket in Inbox.
-
visible_to_contacts:
typing.Optional[bool]โ Whether the attribute is visible to contacts when creating a ticket in Messenger.
-
multiline:
typing.Optional[bool]โ Whether the attribute allows multiple lines of text (only applicable to string attributes)
-
list_items:
typing.Optional[str]โ A comma delimited list of items for the attribute value (only applicable to list attributes)
-
allow_multiple_values:
typing.Optional[bool]โ Whether the attribute allows multiple files to be attached to it (only applicable to file attributes)
-
archived:
typing.Optional[bool]โ Whether the attribute should be archived and not shown during creation of the ticket (it will still be present on previously created tickets)
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Ticket Types
client.unstable.ticket_types.list_ticket_types()
-
๐ Description
-
-
You can get a list of all ticket types for a workspace.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.ticket_types.list_ticket_types()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.ticket_types.create_ticket_type(...)
-
๐ Description
-
-
You can create a new ticket type.
๐ Creating ticket types.
Every ticket type will be created with two default attributes: default_title and default_description. For the
iconpropery, use an emoji from Twemoji Cheatsheet
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.ticket_types.create_ticket_type( request={"key": "value"}, )
-
โ๏ธ Parameters
-
-
request:
typing.Any
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.ticket_types.get_ticket_type(...)
-
๐ Description
-
-
You can fetch the details of a single ticket type.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.ticket_types.get_ticket_type( id="id", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier for the ticket type which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Tickets
client.unstable.tickets.reply_ticket(...)
-
๐ Description
-
-
You can reply to a ticket with a message from an admin or on behalf of a contact, or with a note for admins.
-
๐ Usage
-
-
from intercom import Intercom from intercom.unstable import ContactReplyTicketIntercomUserIdRequest client = Intercom( token="YOUR_TOKEN", ) client.unstable.tickets.reply_ticket( id="123", request=ContactReplyTicketIntercomUserIdRequest( body="Thanks again :)", intercom_user_id="6762f2a41bb69f9f2193bc4c", ), )
-
โ๏ธ Parameters
-
-
id:
str
-
request:
ReplyTicketRequestBody
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.tickets.enqueue_create_ticket(...)
-
๐ Description
-
-
Enqueues ticket creation for asynchronous processing, returning if the job was enqueued successfully to be processed. We attempt to perform a best-effort validation on inputs before tasks are enqueued. If the given parameters are incorrect, we won't enqueue the job.
-
๐ Usage
-
-
from intercom import Intercom from intercom.unstable import CreateTicketRequestContactsItemId client = Intercom( token="YOUR_TOKEN", ) client.unstable.tickets.enqueue_create_ticket( ticket_type_id="1234", contacts=[ CreateTicketRequestContactsItemId( id="6762f2d81bb69f9f2193bc54", ) ], )
-
โ๏ธ Parameters
-
-
ticket_type_id:
strโ The ID of the type of ticket you want to create
-
contacts:
typing.Sequence[CreateTicketRequestContactsItem]โ The list of contacts (users or leads) affected by this ticket. Currently only one is allowed
-
skip_notifications:
typing.Optional[bool]โ Option to disable notifications when a Ticket is created.
-
conversation_to_link_id:
typing.Optional[str]The ID of the conversation you want to link to the ticket. Here are the valid ways of linking two tickets:
- conversation | back-office ticket
- customer tickets | non-shared back-office ticket
- conversation | tracker ticket
- customer ticket | tracker ticket
-
company_id:
typing.Optional[str]โ The ID of the company that the ticket is associated with. The unique identifier for the company which is given by Intercom
-
created_at:
typing.Optional[int]โ The time the ticket was created. If not provided, the current time will be used.
-
assignment:
typing.Optional[CreateTicketRequestAssignment]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.tickets.get_ticket(...)
-
๐ Description
-
-
You can fetch the details of a single ticket.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.tickets.get_ticket( id="id", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier for the ticket which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.tickets.update_ticket(...)
-
๐ Description
-
-
You can update a ticket.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.tickets.update_ticket( id="id", ticket_state_id="123", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier for the ticket which is given by Intercom
-
ticket_attributes:
typing.Optional[typing.Dict[str, typing.Any]]โ The attributes set on the ticket.
-
ticket_state_id:
typing.Optional[str]โ The ID of the ticket state associated with the ticket type.
-
company_id:
typing.Optional[str]โ The ID of the company that the ticket is associated with. The unique identifier for the company which is given by Intercom. Set to nil to remove company.
-
open:
typing.Optional[bool]โ Specify if a ticket is open. Set to false to close a ticket. Closing a ticket will also unsnooze it.
-
is_shared:
typing.Optional[bool]โ Specify whether the ticket is visible to users.
-
snoozed_until:
typing.Optional[int]โ The time you want the ticket to reopen.
-
admin_id:
typing.Optional[int]โ The ID of the admin performing ticket update. Needed for workflows execution and attributing actions to specific admins.
-
assignee_id:
typing.Optional[str]โ The ID of the admin or team to which the ticket is assigned. Set this 0 to unassign it.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.tickets.delete_ticket(...)
-
๐ Description
-
-
You can delete a ticket using the Intercom provided ID.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.tickets.delete_ticket( id="id", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier for the ticket which is given by Intercom.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.tickets.search_tickets(...)
-
๐ Description
-
-
You can search for multiple tickets by the value of their attributes in order to fetch exactly which ones you want.
To search for tickets, you send a
POSTrequest tohttps://api.intercom.io/tickets/search.This will accept a query object in the body which will define your filters. {% admonition type="warning" name="Optimizing search queries" %} Search queries can be complex, so optimizing them can help the performance of your search. Use the
ANDandORoperators to combine multiple filters to get the exact results you need and utilize pagination to limit the number of results returned. The default is20results per page. See the pagination section for more details on how to use thestarting_afterparam. {% /admonition %}Nesting & Limitations
You can nest these filters in order to get even more granular insights that pinpoint exactly what you need. Example: (1 OR 2) AND (3 OR 4). There are some limitations to the amount of multiples there can be:
- There's a limit of max 2 nested filters
- There's a limit of max 15 filters for each AND or OR group
Accepted Fields
Most keys listed as part of the Ticket model are searchable, whether writeable or not. The value you search for has to match the accepted type, otherwise the query will fail (ie. as
created_ataccepts a date, thevaluecannot be a string such as"foobar"). Thesource.bodyfield is unique as the search will not be performed against the entire value, but instead against every element of the value separately. For example, when searching for a conversation with a"I need support"body - the query should contain a=operator with the value"support"for such conversation to be returned. A query with a=operator and a"need support"value will not yield a result.Field Type id String created_at Date (UNIX timestamp) updated_at Date (UNIX timestamp) title String description String category String ticket_type_id String contact_ids String teammate_ids String admin_assignee_id String team_assignee_id String open Boolean state String snoozed_until Date (UNIX timestamp) ticket_attribute.{id} String or Boolean or Date (UNIX timestamp) or Float or Integer {% admonition type="info" name="Searching by Category" %} When searching for tickets by the
categoryfield, specific terms must be used instead of the category names:- For Customer category tickets, use the term
request. - For Back-office category tickets, use the term
task. - For Tracker category tickets, use the term
tracker. {% /admonition %}
Accepted Operators
{% admonition type="info" name="Searching based on
created_at" %} You may use the<=or>=operators to search bycreated_at. {% /admonition %}The table below shows the operators you can use to define how you want to search for the value. The operator should be put in as a string (
"="). The operator has to be compatible with the field's type (eg. you cannot search with>for a given string value as it's only compatible for integer's and dates).Operator Valid Types Description = All Equals != All Doesn't Equal IN All In Shortcut for ORqueries Values most be in ArrayNIN All Not In Shortcut for OR !queries Values must be in Array> Integer Date (UNIX Timestamp) Greater (or equal) than < Integer Date (UNIX Timestamp) Lower (or equal) than ~ String Contains !~ String Doesn't Contain ^ String Starts With $ String Ends With
-
๐ Usage
-
-
from intercom import Intercom from intercom.unstable import ( MultipleFilterSearchRequest, SingleFilterSearchRequest, StartingAfterPaging, ) client = Intercom( token="YOUR_TOKEN", ) client.unstable.tickets.search_tickets( query=MultipleFilterSearchRequest( operator="AND", value=[ SingleFilterSearchRequest( field="created_at", operator=">", value="1306054154", ) ], ), pagination=StartingAfterPaging( per_page=5, ), )
-
โ๏ธ Parameters
-
-
query:
SearchRequestQuery
-
pagination:
typing.Optional[StartingAfterPaging]
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Visitors
client.unstable.visitors.retrieve_visitor_with_user_id(...)
-
๐ Description
-
-
You can fetch the details of a single visitor.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.visitors.retrieve_visitor_with_user_id( user_id="user_id", )
-
โ๏ธ Parameters
-
-
user_id:
strโ The user_id of the Visitor you want to retrieve.
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.visitors.update_visitor(...)
-
๐ Description
-
-
Sending a PUT request to
/visitorswill result in an update of an existing Visitor.Option 1. You can update a visitor by passing in the
user_idof the visitor in the Request body.Option 2. You can update a visitor by passing in the
idof the visitor in the Request body.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.visitors.update_visitor( request={"user_id": "fail", "name": "Christian Fail"}, )
-
โ๏ธ Parameters
-
-
request:
UpdateVisitorRequestOne
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.visitors.convert_visitor(...)
-
๐ Description
-
-
You can merge a Visitor to a Contact of role type
leadoruser.๐ What happens upon a visitor being converted?
If the User exists, then the Visitor will be merged into it, the Visitor deleted and the User returned. If the User does not exist, the Visitor will be converted to a User, with the User identifiers replacing it's Visitor identifiers.
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.visitors.convert_visitor( type="user", user={"email": "foo@bar.com"}, visitor={"user_id": "3ecf64d0-9ed1-4e9f-88e1-da7d6e6782f3"}, )
-
โ๏ธ Parameters
-
-
type:
strโ Represents the role of the Contact model. Acceptsleadoruser.
-
user:
typing.Any
-
visitor:
typing.Any
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Brands
client.unstable.brands.list_brands()
-
๐ Description
-
-
Retrieves all brands for the workspace, including the default brand. The default brand id always matches the workspace
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.brands.list_brands()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.brands.retrieve_brand(...)
-
๐ Description
-
-
Fetches a specific brand by its unique identifier
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.brands.retrieve_brand( id="id", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier of the brand
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
Emails
client.unstable.emails.list_emails()
-
๐ Description
-
-
Lists all sender email address settings for the workspace
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.emails.list_emails()
-
โ๏ธ Parameters
-
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-
client.unstable.emails.retrieve_email(...)
-
๐ Description
-
-
Fetches a specific email setting by its unique identifier
-
๐ Usage
-
-
from intercom import Intercom client = Intercom( token="YOUR_TOKEN", ) client.unstable.emails.retrieve_email( id="id", )
-
โ๏ธ Parameters
-
-
id:
strโ The unique identifier of the email setting
-
request_options:
typing.Optional[RequestOptions]โ Request-specific configuration.
-
-