# List external pages

`GET /ai/external_pages`

> This is a subset of the full specification, limited to the `GET /ai/external_pages` operation.
>
> You can find the full specification here: /_bundle/docs/references/@2.18/rest-api/api.intercom.io.yaml

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.18'
  description: This is a subset of the full specification, limited to the `GET /ai/external_pages` operation. Components more than 3 `$ref` hops away are not included.
  contact:
    name: Intercom Developer Hub
    url: https://developers.intercom.com
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
servers:
  - url: https://api.intercom.io
    description: The production API server
  - url: https://api.eu.intercom.io
    description: The european API server
  - url: https://api.au.intercom.io
    description: The australian API server
security:
  - bearerAuth: []
tags:
  - name: AI Content
    description: |
      With the AI Content APIs, you can create and manage External Pages and Content Import Sources for your Fin Content Library.

      &nbsp;

      *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.

      &nbsp;

      *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.

      &nbsp;

      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.",
paths:
  /ai/external_pages:
    get:
      summary: List external pages
      parameters:
        - name: Intercom-Version
          in: header
          schema:
            $ref: '#/components/schemas/intercom_version'
        - name: page
          in: query
          schema:
            type: integer
            minimum: 1
            default: 1
          description: 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`.
          example: 1
        - name: per_page
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 150
            default: 50
          description: The number of results to return per page. Maximum 150.
          example: 50
      tags:
        - AI Content
      operationId: listExternalPages
      description: |
        You can retrieve a list of all external pages for a workspace.

        OAuth tokens must have the `read_write_ai_content` scope.
      responses:
        '200':
          description: successful
          content:
            application/json:
              examples:
                successful:
                  value:
                    data:
                      - id: '19'
                        type: external_page
                        title: My External Content
                        html: <h1>Hello world</h1><p>This is external content</p>
                        url: https://support.example.com/us/3
                        ai_agent_availability: true
                        ai_copilot_availability: true
                        ai_sales_agent_availability: true
                        fin_availability: true
                        locale: en
                        source_id: 42
                        external_id: '3'
                        audience_ids: []
                        tags:
                          type: tag.list
                          tags: []
                        created_at: 1734537269
                        updated_at: 1734537269
                        last_ingested_at: 1734537269
                      - id: '18'
                        type: external_page
                        title: My External Content
                        html: <h1>Hello world</h1><p>This is external content</p>
                        url: https://support.example.com/us/2
                        ai_agent_availability: true
                        ai_copilot_availability: true
                        ai_sales_agent_availability: true
                        fin_availability: true
                        locale: en
                        source_id: 41
                        external_id: '2'
                        audience_ids: []
                        tags:
                          type: tag.list
                          tags: []
                        created_at: 1734537269
                        updated_at: 1734537269
                        last_ingested_at: 1734537269
                      - id: '17'
                        type: external_page
                        title: My External Content
                        html: <h1>Hello world</h1><p>This is external content</p>
                        url: https://support.example.com/us/1
                        ai_agent_availability: true
                        ai_copilot_availability: true
                        ai_sales_agent_availability: true
                        fin_availability: true
                        locale: en
                        source_id: 40
                        external_id: '1'
                        audience_ids: []
                        tags:
                          type: tag.list
                          tags: []
                        created_at: 1734537269
                        updated_at: 1734537269
                        last_ingested_at: 1734537269
                    pages:
                      type: pages
                      page: 1
                      per_page: 50
                      total_pages: 1
                    total_count: 3
                    type: list
              schema:
                $ref: '#/components/schemas/external_pages_list'
        '400':
          description: Bad request
          content:
            application/json:
              examples:
                Invalid page:
                  value:
                    type: error.list
                    request_id: 6c1f2a54-8d0b-4e0e-9a43-0f5b1d7a2c11
                    errors:
                      - code: parameter_invalid
                        message: Page must be greater than or equal to 1
                Page size too large:
                  value:
                    type: error.list
                    request_id: b7d94e0a-3f52-4c58-8a1e-52c0e9d36f27
                    errors:
                      - code: parameter_invalid
                        message: Page size must be less than or equal to 150
                Page limit exceeded:
                  value:
                    type: error.list
                    request_id: d2a8f6c1-5b3e-4a79-8e0d-7c41f9b2a6e3
                    errors:
                      - code: bad_request
                        message: page limit reached, please use scroll API
              schema:
                $ref: '#/components/schemas/error'
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                Unauthorized:
                  value:
                    type: error.list
                    request_id: bd0c53dd-d3fd-4095-be25-94537a8ba364
                    errors:
                      - code: unauthorized
                        message: Access Token Invalid
                Token lacks required scope:
                  value:
                    type: error.list
                    request_id: a3e5b8e2-1234-5678-9abc-def012345678
                    errors:
                      - code: token_unauthorized
                        message: Not authorized to access resource
              schema:
                $ref: '#/components/schemas/error'
components:
  schemas:
    error:
      type: object
      title: Error
      description: The API will return an Error List for a failed request, which will contain one or more Error objects.
      properties:
        type:
          type: string
          description: The type is error.list
          example: error.list
        request_id:
          type: string
          nullable: true
          format: uuid
          description: ''
          example: f93ecfa8-d08a-4325-8694-89aeb89c8f85
        errors:
          type: array
          description: An array of one or more error objects
          items:
            properties:
              code:
                type: string
                description: A string indicating the kind of error, used to further qualify the HTTP response code.
                example: unauthorized
              message:
                type: string
                nullable: true
                description: Optional. Human readable description of the error.
                example: Access Token Invalid
              data:
                type: object
                nullable: true
                additionalProperties: true
                description: Optional. Extra detail about the error, for example `required_permissions` on a 403 `action_forbidden` error.
                example:
                  required_permissions:
                    - read_conversations
            required:
              - code
      required:
        - type
        - errors
    external_page:
      title: External Page
      type: object
      x-tags:
        - AI Content
      description: External pages that you have added to your Fin Content Library.
      nullable: false
      properties:
        type:
          type: string
          description: Always external_page
          enum:
            - external_page
          default: external_page
          example: external_page
        id:
          type: string
          description: The unique identifier for the external page which is given by Intercom.
          example: '1234'
        title:
          type: string
          description: The title of the external page.
          example: Getting started with...
        html:
          type: string
          description: The body of the external page in HTML.
          example: <p>Hello world!</p>
        url:
          type: string
          description: 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
        ai_agent_availability:
          type: boolean
          description: Whether the external page should be used to answer questions by AI Agent.
          example: true
        ai_copilot_availability:
          type: boolean
          description: Whether the external page should be used to answer questions by AI Copilot.
          example: true
        ai_sales_agent_availability:
          type: boolean
          description: Whether the external page should be used to answer questions by AI Sales Agent.
          example: true
        fin_availability:
          type: boolean
          description: Deprecated. Use ai_agent_availability and ai_copilot_availability instead.
          example: true
        locale:
          type: string
          description: The language code of the external page, for example `en` or `fr`.
          example: en
        source_id:
          type: integer
          description: 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
        external_id:
          type: string
          description: The identifier for the external page which was given by the source. Must be unique for the source.
          example: '5678'
        audience_ids:
          type: array
          description: The list of audience IDs that this external page is targeted to for Fin AI Agent. Empty when the external page has no audience targeting.
          items:
            type: integer
          example:
            - 1
            - 2
        created_at:
          type: integer
          format: date-time
          description: The time when the external page was created.
          example: 1672928359
        updated_at:
          type: integer
          format: date-time
          description: The time when the external page was last updated.
          example: 1672928610
        last_ingested_at:
          type: integer
          format: date-time
          description: The time when the external page was last ingested.
          example: 1672928610
        tags:
          description: The tags applied to the external page.
          allOf:
            - $ref: '#/components/schemas/tags'
      required:
        - id
        - type
        - title
        - html
        - ai_agent_availability
        - ai_copilot_availability
        - locale
        - source_id
        - created_at
        - updated_at
        - last_ingested_at
        - external_id
    external_pages_list:
      title: External Pages
      type: object
      x-tags:
        - AI Content
      description: This will return a list of external pages for the App.
      nullable: false
      properties:
        type:
          type: string
          description: The type of the object - `list`.
          enum:
            - list
          example: list
        pages:
          $ref: '#/components/schemas/pages_link'
        total_count:
          type: integer
          description: A count of the total number of external pages.
          example: 1
        data:
          type: array
          description: An array of External Page objects
          items:
            $ref: '#/components/schemas/external_page'
    intercom_version:
      description: Intercom API version.</br>If you omit the header, the API uses the version set in your app package, and 1.0 if none is set.
      type: string
      example: '2.18'
      enum:
        - '1.0'
        - '1.1'
        - '1.2'
        - '1.3'
        - '1.4'
        - '2.0'
        - '2.1'
        - '2.2'
        - '2.3'
        - '2.4'
        - '2.5'
        - '2.6'
        - '2.7'
        - '2.8'
        - '2.9'
        - '2.10'
        - '2.11'
        - '2.12'
        - '2.13'
        - '2.14'
        - '2.15'
        - '2.16'
        - '2.17'
        - '2.18'
    pages_link:
      title: Pagination Object
      type: object
      description: |
        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.
      properties:
        type:
          type: string
          example: pages
          enum:
            - pages
        page:
          type: integer
          example: 1
        next:
          type: string
          format: uri
          description: 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.
          nullable: true
        prev:
          type: string
          format: uri
          description: A link to the previous page of results. Omitted on the first page.
          nullable: true
        per_page:
          type: integer
          example: 50
        total_pages:
          type: integer
          example: 1
    tags:
      title: Tags
      type: object
      description: A list of tags objects associated with a conversation, article or internal article
      properties:
        type:
          type: string
          description: The type of the object
          enum:
            - tag.list
          example: tag.list
        tags:
          type: array
          description: A list of tags objects associated with the object.
          items:
            $ref: '#/components/schemas/tag'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
