_For developers_

# Fill a coreAI assistant with your own data via the API

coreAI gives developers an API for filling an assistant with their own data and using the same data in chat and search. It fits products, CMSs, PIMs, ERPs and domain systems that need to make their content available inside a coreAI assistant.

[Talk to us about API integration](https://coreai.no/en/contact)

[Read the technical API article](https://coreai.no/en/articles/api-data-integration)

## Fill the assistant with data from your system

The API integration uses stable external IDs and upsert calls to keep the knowledge base in sync with your system. When an object is created or changed on your side, you send the updated entity to coreAI.

The production environment lives at `https://portal.coreai.no/api/v2`, and the staging environment lives at `https://stage.coreai.no/api/v2`. Calls use a Bearer token, `assistantId` points to the assistant that should answer, and `contentImporterId` points to the API source where the data is stored.

Upsert via `POST /assistants/{assistantId}/sources/{contentImporterId}` replaces the entire entity. `PATCH` can be used for smaller changes, `DELETE` removes entities that should no longer return answers, and `GET` lets the integration fetch one or more entities by external ID.

- `POST` creates or replaces products, documents, content and other entities
- `PATCH` updates only the fields that have actually changed
- `DELETE` removes the entity and the relationship links around it
- `GET` retrieves entities back using external IDs

## Let the assistant use MCP tools

MCP import in coreAI discovers tools on an external MCP server. The tools become available to the assistant when a conversation starts, and the assistant picks the relevant tool to answer the user. If the user is signed in, answers can be scoped to that user's own cases in a line-of-business system.

[How MCP import works](https://coreai.no/en/articles/mcp-import)

## Connect AI agents to the knowledge base through MCP

coreAI can expose the knowledge base as an MCP server, so external AI agents can query assistant content through a standardized protocol. Teams can use the same curated sources in custom agent tools, IDEs and internal workflows.

[How the MCP server works](https://coreai.no/en/articles/mcp-server)

## Send structured entities, not just text

coreAI can index several data types so the assistant understands the difference between product data, documentation, events, educations, job postings and contacts. That gives more precise answers than a flat text import.

[See the entity types in detail](https://coreai.no/en/articles/entity-types)

## Use the data in a widget, custom chat or search

Once the data is inside the assistant, users can meet it through the coreAI widget, a custom chat interface or pure knowledge-base search. You choose how much of the experience you want to build yourself.

[Read the full API integration guide](https://coreai.no/en/articles/api-data-integration)

## Protect the assistant with your own login

Set a `callbackUrl` on the assistant, and coreAI calls your own URL with the user's token when the widget loads. The token is approved once per page load, and the login stays with you.

[How to protect the assistant](https://coreai.no/en/articles/assistant-protection)

## Build synchronization that is ready for production

The best coreAI integration lets the source system own the truth and uses the API to keep the assistant updated. Users get fresh answers, and the development team avoids manual imports.

Start with stable IDs, clear data types and fields that can be used for filtering. Then choose whether end users should meet the assistant in the coreAI widget, in a custom chat interface or as search inside your product.

[Plan the API integration with us](https://coreai.no/en/contact)