# List external pages

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 empty.
OAuth tokens must have the `read_write_ai_content` scope.

Endpoint: GET /ai/external_pages
Version: Preview
Security: bearerAuth

## Query parameters:

  - `page` (integer)
    The page of results to fetch. Defaults to the first page. `page` cannot exceed 5,001, and `page` multiplied by `per_page` cannot exceed 10,000. Past 5,001 the API returns a 400 `parameter_invalid` error; past 10,000 results it returns a 400 `bad_request` error with the message `page limit reached, please use scroll API`.

  - `per_page` (integer)
    The number of results to return per page. Maximum 150.

  - `source_id` (integer)
    The unique identifier for the source of the external page which was given by Intercom. Must be sent with `external_id`.

  - `external_id` (string)
    The identifier for the external page which was given by the source. Must be sent with `source_id`.

## Header parameters:

  - `Intercom-Version` (string)

## Response 200 fields (application/json):

  - `type` (string)
    The type of the object - `list`.
    Enum: "list"

  - `pages` (object)
    The majority of list resources in the API are paginated to allow clients to traverse data over multiple requests.

Their responses are likely to contain a pages object that hosts pagination links which a client can use to paginate through the data without having to construct a query. The link relations for the pages field are as follows.

  - `pages.type` (string)
    Enum: "pages"

  - `pages.page` (integer)
    Example: 1

  - `pages.next` (string)
    A link to the next page of results. Omitted or `null` on the last page, depending on the list. Some lists never include `next` or `prev`, so compare `page` with `total_pages` to tell whether more pages remain.

  - `pages.prev` (string)
    A link to the previous page of results. Omitted on the first page.

  - `pages.per_page` (integer)
    Example: 50

  - `pages.total_pages` (integer)
    Example: 1

  - `total_count` (integer)
    A count of the total number of external pages.
    Example: 1

  - `data` (array)
    An array of External Page objects

  - `data.type` (string, required)
    Always external_page
    Enum: "external_page"

  - `data.id` (string, required)
    The unique identifier for the external page which is given by Intercom.
    Example: 1234

  - `data.title` (string, required)
    The title of the external page.
    Example: Getting started with...

  - `data.html` (string, required)
    The body of the external page in HTML.
    Example: <p>Hello world!</p>

  - `data.url` (string)
    The URL of the external page. This will be used by Fin to link end users to the page it based its answer on.
    Example: https://help.example.com/en/articles/1234-getting-started

  - `data.ai_agent_availability` (boolean, required)
    Whether the external page should be used to answer questions by AI Agent.
    Example: true

  - `data.ai_copilot_availability` (boolean, required)
    Whether the external page should be used to answer questions by AI Copilot.
    Example: true

  - `data.ai_sales_agent_availability` (boolean)
    Whether the external page should be used to answer questions by AI Sales Agent.
    Example: true

  - `data.fin_availability` (boolean)
    Deprecated. Use ai_agent_availability, ai_copilot_availability, and ai_sales_agent_availability instead.
    Example: true

  - `data.locale` (string, required)
    The language code of the external page, for example `en` or `fr`.
    Example: en

  - `data.source_id` (integer, required)
    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.
    Example: 1234

  - `data.external_id` (string, required)
    The identifier for the external page which was given by the source. Must be unique for the source.
    Example: 5678

  - `data.tags` (object)
    The tags applied to the external page.

  - `data.tags.type` (string)
    The type of the object
    Enum: "tag.list"

  - `data.tags.tags` (array)
    A list of tags objects associated with the object.

  - `data.tags.tags.type` (string)
    value is "tag"
    Example: tag

  - `data.tags.tags.id` (string)
    The id of the tag
    Example: 123456

  - `data.tags.tags.name` (string)
    The name of the tag
    Example: Test tag

  - `data.tags.tags.applied_at` (integer)
    The time when the tag was applied to the object. Only present when the tag is returned as part of a tagging operation on a contact, conversation, ticket, article, internal article, content snippet, or external page, when listing the tags on a contact, or when it is returned as part of an external page. `null` when the tag has just been removed from an article, internal article, content snippet or external page. Removing a tag from a contact, conversation or ticket returns the original value.
    Example: 1663597223

  - `data.tags.tags.applied_by` (object)
    The admin who applied the tag. Only present when the tag is returned as part of a tagging operation on a contact, conversation, ticket, article, internal article, content snippet, or external page, when listing the tags on a contact, or when it is returned as part of an external page. `null` when the tag has just been removed from an article, internal article, content snippet or external page. Removing a tag from a contact, conversation or ticket returns the original value. When no admin is recorded, `type` is `nobody_admin` and `id` is `null`.

  - `data.tags.tags.applied_by.type` (string)
    Example: contact

  - `data.tags.tags.applied_by.id` (string)
    Example: 1a2b3c

  - `data.created_at` (integer, required)
    The time when the external page was created.
    Example: 1672928359

  - `data.updated_at` (integer, required)
    The time when the external page was last updated.
    Example: 1672928610

  - `data.last_ingested_at` (integer, required)
    The time when the external page was last ingested.
    Example: 1672928610

  - `data.audience_ids` (array)
    The list of audience IDs this external page is targeted to for Fin AI Agent. Empty array means no audience targeting is set.
    Example: [1,2]

## Response 400 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (string, required)
    A string indicating the kind of error, used to further qualify the HTTP response code.
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

## Response 401 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (string, required)
    A string indicating the kind of error, used to further qualify the HTTP response code.
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

