# List content import sources

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 that the list leaves out, so both can be higher than the number of sources you get back across all pages. The last pages can be short or empty.
OAuth tokens must have the `read_write_ai_content` scope.

Endpoint: GET /ai/content_import_sources
Version: 2.18
Security: bearerAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer

## Query parameters:

  - `page` (integer)
    The page of results to fetch. Defaults to the first page.

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

## Header parameters:

  - `Intercom-Version` (string)

## Response 200:

  - `200` (unknown)
    successful

## 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 content import sources, including deleted ones that the list leaves out.
    Example: 1

  - `data` (array)
    An array of Content Import Source objects

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

  - `data.id` (integer, required)
    The unique identifier for the content import source which is given by Intercom.
    Example: 1234

  - `data.last_synced_at` (integer, required)
    The time when the content import source was last synced.
    Example: 1672928610

  - `data.sync_behavior` (string, required)
    If you intend to create or update External Pages via the API, this should be set to `api`.
    Enum: "api", "automatic", "manual"

  - `data.status` (string, required)
    The status of the content import source. A source that is being deleted has the status `deletion_in_progress`.
    Enum: "active", "deactivated", "deletion_in_progress"

  - `data.url` (string, required)
    The URL of the root of the external source.
    Example: https://help.example.com/

  - `data.created_at` (integer, required)
    The time when the content import source was created.
    Example: 1672928359

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

  - `data.audience_ids` (array)
    The unique identifiers for the audiences associated with this content import source.
    Example: [5678]

## Response 400:

  - `400` (unknown)
    Bad request

## 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

  - `errors.data` (object)
    Optional. Extra detail about the error, for example `required_permissions` on a 403 `action_forbidden` error.
    Example: {"required_permissions":["read_conversations"]}

## Response 401:

  - `401` (unknown)
    Unauthorized

## 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

  - `errors.data` (object)
    Optional. Extra detail about the error, for example `required_permissions` on a 403 `action_forbidden` error.
    Example: {"required_permissions":["read_conversations"]}

## Response 200 examples:

  - `successful` (unknown)

## Response 400 examples:

  - `Invalid page` (unknown)

  - `Page size too large` (unknown)

## Response 401 examples:

  - `Unauthorized` (unknown)

  - `Token lacks required scope` (unknown)

