# AI Content

With the AI Content APIs, you can create and manage External Pages and Content Import Sources for your Fin Content Library.
 
*External Pages* are pages that you want Fin to be able to answer questions about. The API for External Pages is a great way to ingest into your Fin Content Library pages that are not publicly accessible and hence can't be crawled by Intercom.
 
*Content Import Sources* are the sources of those pages, and they are used to determine the default audience for the pages (configured via the UI). You should create a Content Import Source for each source of External Pages that you want to ingest into your Fin Content Library.
 
You can then iterate through the content from that source via its API and POST it to the External Pages endpoint. That endpoint has an *external_id* parameter which allows you to specify the identifier from the source. The endpoint will then either create a new External Page or update an existing one as appropriate.",

 - [POST /ai/api_template_sources](https://developers.intercom.com/docs/references/preview/rest-api/api.intercom.io/ai-content/createapitemplatesource.md): You can create a source that imports content from a knowledge base's REST API. Send a `template` that describes the vendor's API, a value for each of the template's `variables`, and an `auth_token` fo
 - [GET /ai/api_template_sources/{id}](https://developers.intercom.com/docs/references/preview/rest-api/api.intercom.io/ai-content/getapitemplatesource.md): You can retrieve an API template source, including its template, its variables and the status of its latest sync. The `auth_token` is never returned. OAuth tokens must have the `read_write_ai_content`
 - [POST /ai/api_template_sources/{id}/sync](https://developers.intercom.com/docs/references/preview/rest-api/api.intercom.io/ai-content/syncapitemplatesource.md): You can start a sync of an API template source. Intercom fetches the knowledge base's pages again using the source's template and token, and updates the imported content. The response is the source, w
 - [GET /ai/content_import_sources](https://developers.intercom.com/docs/references/preview/rest-api/api.intercom.io/ai-content/listcontentimportsources.md): You can retrieve a list of all content import sources for a workspace. `total_count` and `pages.total_pages` are worked out from every content import source in the workspace, including deleted ones th
 - [POST /ai/content_import_sources](https://developers.intercom.com/docs/references/preview/rest-api/api.intercom.io/ai-content/createcontentimportsource.md): You can create a new content import source by sending a POST request to this endpoint. OAuth tokens must have the `read_write_ai_content` scope.
 - [DELETE /ai/content_import_sources/{id}](https://developers.intercom.com/docs/references/preview/rest-api/api.intercom.io/ai-content/deletecontentimportsource.md): 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. OAuth tokens must have the `read_write_ai
 - [GET /ai/content_import_sources/{id}](https://developers.intercom.com/docs/references/preview/rest-api/api.intercom.io/ai-content/getcontentimportsource.md): You can retrieve a content import source. OAuth tokens must have the `read_write_ai_content` scope.
 - [PUT /ai/content_import_sources/{id}](https://developers.intercom.com/docs/references/preview/rest-api/api.intercom.io/ai-content/updatecontentimportsource.md): You can update an existing content import source. OAuth tokens must have the `read_write_ai_content` scope.
 - [GET /ai/external_pages](https://developers.intercom.com/docs/references/preview/rest-api/api.intercom.io/ai-content/listexternalpages.md): You can retrieve a list of all external pages for a workspace. Send `source_id` and `external_id` together to get only the external page with that external ID. If no external page matches, the list is
 - [POST /ai/external_pages](https://developers.intercom.com/docs/references/preview/rest-api/api.intercom.io/ai-content/createexternalpage.md): 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. OAuth tokens
 - [DELETE /ai/external_pages/{id}](https://developers.intercom.com/docs/references/preview/rest-api/api.intercom.io/ai-content/deleteexternalpage.md): Sending a DELETE request for an external page will remove it from the content library UI and from being used for AI answers. OAuth tokens must have the `read_write_ai_content` scope.
 - [GET /ai/external_pages/{id}](https://developers.intercom.com/docs/references/preview/rest-api/api.intercom.io/ai-content/getexternalpage.md): You can retrieve an external page. OAuth tokens must have the `read_write_ai_content` scope.
 - [PUT /ai/external_pages/{id}](https://developers.intercom.com/docs/references/preview/rest-api/api.intercom.io/ai-content/updateexternalpage.md): You can update an existing external page (if it was created via the API). OAuth tokens must have the `read_write_ai_content` scope.
 - [POST /ai/external_pages/{external_page_id}/tags](https://developers.intercom.com/docs/references/preview/rest-api/api.intercom.io/ai-content/attachtagtoexternalpage.md): Apply an existing tag to an external page. Returns the tag that was applied. The tag must already exist in the workspace (create tags with the Tags API), and the authenticating teammate must have the
 - [DELETE /ai/external_pages/{external_page_id}/tags/{id}](https://developers.intercom.com/docs/references/preview/rest-api/api.intercom.io/ai-content/detachtagfromexternalpage.md): Remove a tag from an external page. Returns the tag that was removed, with null `applied_at` and `applied_by`. The authenticating teammate must have the `manage_knowledge_base_content` permission. Pag
 - [API Template](https://developers.intercom.com/docs/references/preview/rest-api/api.intercom.io/ai-content/api_template.md): Schema: #/components/schemas/api_template
 - [API Template Source](https://developers.intercom.com/docs/references/preview/rest-api/api.intercom.io/ai-content/api_template_source.md): Schema: #/components/schemas/api_template_source
 - [Content Import Source](https://developers.intercom.com/docs/references/preview/rest-api/api.intercom.io/ai-content/content_import_source.md): Schema: #/components/schemas/content_import_source
 - [Content Import Sources](https://developers.intercom.com/docs/references/preview/rest-api/api.intercom.io/ai-content/content_import_sources_list.md): Schema: #/components/schemas/content_import_sources_list
 - [External Page](https://developers.intercom.com/docs/references/preview/rest-api/api.intercom.io/ai-content/external_page.md): Schema: #/components/schemas/external_page
 - [External Pages](https://developers.intercom.com/docs/references/preview/rest-api/api.intercom.io/ai-content/external_pages_list.md): Schema: #/components/schemas/external_pages_list
