DevelopersAPIsEnterprise Search APIs

Enterprise Search APIs

Enterprise Search APIs for chat sessions, messaging, connector administration, and project file uploads.

Overview

The workflow includes:

  1. Chat sessions – Create, list, rename, and send messages in chat sessions
  2. Connectors – List connector status, create connectors, associate credentials, run indexing, update CC pair status, and delete connectors
  3. Project files – Upload files and poll upload/indexing status

Base URL: https://chordian-core.chordian.ai

Authentication: Bearer token (HTTPBearer) or API key cookie (APIKeyCookie) required on every request. Send your API key in the Authorization header: Authorization: Bearer <api-key>.


Send Chat Message

Send a new chat message. When stream is true (default), the API returns a Server-Sent Events (text/event-stream) stream of NDJSON AnswerStreamPart objects. When stream is false, the API returns a complete ChatFullResponse as JSON.

POST /chat/send-chat-message

Authentication: Authorization: Bearer <api-key>

Request Body

{
  "message": "string",
  "chat_session_id": "string",
  "stream": false,
  "include_citations": true,
  "allowed_tool_ids": [0],
  "forced_tool_id": 0,
  "internal_search_filters": {
    "source_type": ["string"]
  }
}
FieldTypeRequiredDescription
messagestringUser message text to send.
chat_session_idstringUUID of the chat session (from Create Chat Session).
streambooleanWhen true, stream SSE responses; when false, return full JSON.
include_citationsbooleanInclude citation metadata in the response.
allowed_tool_idsarray<integer>Tool IDs the agent may use.
forced_tool_idintegerForce a specific tool for this message.
internal_search_filtersobjectFilters for internal search (e.g. source_type).

Successful Response (200 OK)

When stream=trueContent-Type: text/event-stream

A stream of NDJSON AnswerStreamPart objects (SSE).

string

When stream=falseContent-Type: application/json

{
  "answer": "string",
  "answer_citationless": "string",
  "pre_answer_reasoning": null,
  "tool_calls": [
    {
      "tool_name": "string",
      "tool_arguments": {
        "queries": ["string"]
      },
      "tool_result": "string",
      "search_docs": [
        {
          "document_id": "string",
          "chunk_ind": 0,
          "semantic_identifier": "string",
          "link": "string",
          "blurb": "string",
          "source_type": "string",
          "boost": 0,
          "hidden": false,
          "metadata": {},
          "score": 0,
          "is_relevant": null,
          "relevance_explanation": null,
          "match_highlights": ["string"],
          "updated_at": "string",
          "primary_owners": null,
          "secondary_owners": null,
          "is_internet": false
        }
      ],
      "generated_images": null,
      "pre_reasoning": null
    }
  ],
  "top_documents": [
    {
      "document_id": "string",
      "chunk_ind": 0,
      "semantic_identifier": "string",
      "link": "string",
      "blurb": "string",
      "source_type": "string",
      "boost": 0,
      "hidden": false,
      "metadata": {},
      "score": 0,
      "is_relevant": null,
      "relevance_explanation": null,
      "match_highlights": ["string"],
      "updated_at": "string",
      "primary_owners": null,
      "secondary_owners": null,
      "is_internet": false
    }
  ],
  "citation_info": [],
  "message_id": 0,
  "chat_session_id": null,
  "error_msg": null
}
FieldTypeDescription
answerstringFinal assistant reply (may include citations).
answer_citationlessstringReply text without citation markup.
pre_answer_reasoningstring | nullReasoning emitted before the answer, if any.
tool_callsarray<object>Tools invoked during the turn (see ToolCall).
top_documentsarray<object>Ranked source documents used for the answer (same shape as search_docs items).
citation_infoarrayCitation metadata for the response.
message_idintegerIdentifier for this message in the session.
chat_session_idstring | nullChat session UUID when returned.
error_msgstring | nullError detail when the turn failed; null on success.
ToolCall (item of tool_calls[])
FieldTypeDescription
tool_namestringTool invoked (e.g. internal_search).
tool_argumentsobjectArguments passed to the tool (shape varies by tool).
tool_resultstringSerialized tool output (often JSON in a string).
search_docsarray<object>Documents retrieved by search tools.
generated_imagesnullReserved for image-generation tools.
pre_reasoningstring | nullReasoning before tool execution.

Validation Error (422)

{
  "status_code": 422,
  "message": "string",
  "data": null
}

Example

curl -X POST "https://chordian-core.chordian.ai/chat/send-chat-message" \
  -H "Authorization: Bearer <api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "string",
    "chat_session_id": "string",
    "stream": false,
    "include_citations": true,
    "allowed_tool_ids": [0],
    "forced_tool_id": 0,
    "internal_search_filters": {
      "source_type": ["string"]
    }
  }'

Get User Chat Sessions

List chat sessions for the current user.

GET /chat/get-user-chat-sessions

Authentication: Authorization: Bearer <api-key>

Successful Response (200 OK)

{
  "sessions": [
    {
      "id": "string",
      "name": "string",
      "persona_id": 0,
      "global_persona_id": null,
      "is_global_persona": false,
      "time_created": "string",
      "time_updated": "string",
      "shared_status": "string",
      "current_alternate_model": null,
      "current_temperature_override": null
    }
  ]
}
FieldTypeDescription
sessionsarray<object>Chat sessions for the current user (see ChatSession).
ChatSession (item of sessions[])
FieldTypeDescription
idstringChat session UUID.
namestringDisplay name of the session.
persona_idintegerPersona bound to this session.
global_persona_idinteger | nullGlobal persona override, if set.
is_global_personabooleanWhether a global persona is active.
time_createdstringISO timestamp when the session was created.
time_updatedstringISO timestamp when the session was last updated.
shared_statusstringSharing state (e.g. private).
current_alternate_modelstring | nullAlternate model override.
current_temperature_overridenumber | nullTemperature override for this session.

Validation Error (422)

{
  "status_code": 422,
  "message": "string",
  "data": null
}

Example

curl "https://chordian-core.chordian.ai/chat/get-user-chat-sessions" \
  -H "Authorization: Bearer <api-key>"

Create Chat Session

Create a new chat session.

POST /chat/create-chat-session

Authentication: Authorization: Bearer <api-key>

Request Body

{
  "persona_id": 0
}
FieldTypeRequiredDescription
persona_idintegerPersona identifier for the new session.

Successful Response (200 OK)

{
  "chat_session_id": "string"
}
FieldTypeDescription
chat_session_idstringUUID of the newly created chat session.

Bad Request (400)

{
  "detail": "string"
}
FieldTypeDescription
detailstringError message (e.g. Invalid Persona provided. when persona_id is not valid).

Validation Error (422)

{
  "status_code": 422,
  "message": "string",
  "data": null
}

Example

curl -X POST "https://chordian-core.chordian.ai/chat/create-chat-session" \
  -H "Authorization: Bearer <api-key>" \
  -H "Content-Type: application/json" \
  -d '{"persona_id": 0}'

Rename Chat Session

Rename an existing chat session.

PUT /chat/rename-chat-session

Authentication: Authorization: Bearer <api-key>

Request Body

{
  "chat_session_id": "string",
  "name": "string"
}
FieldTypeRequiredDescription
chat_session_idstringUUID of the chat session to rename.
namestringNew display name for the session.

Successful Response (200 OK)

{
  "new_name": "string"
}
FieldTypeDescription
new_namestringUpdated session display name.

Validation Error (422)

{
  "status_code": 422,
  "message": "string",
  "data": null
}

Example

curl -X PUT "https://chordian-core.chordian.ai/chat/rename-chat-session" \
  -H "Authorization: Bearer <api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "chat_session_id": "string",
    "name": "string"
  }'

Get Connector Status

Get status for all connectors.

GET /manage/admin/connector/status

Authentication: Authorization: Bearer <api-key>

Successful Response (200 OK)

Array of connector status objects (one per connector–credential pair).

[
  {
    "cc_pair_id": 0,
    "name": "string",
    "connector": {
      "name": "string",
      "source": "string",
      "input_type": "string",
      "connector_specific_config": {
        "include_my_drives": true
      },
      "refresh_freq": 0,
      "prune_freq": 0,
      "indexing_start": null,
      "id": 0,
      "credential_ids": [0],
      "time_created": "string",
      "time_updated": "string"
    },
    "credential": {
      "credential_json": {
        "google_primary_admin": "string",
        "google_tokens": "string",
        "authentication_method": "string"
      },
      "admin_public": true,
      "source": "string",
      "name": "string",
      "curator_public": false,
      "groups": [],
      "id": 0,
      "user_id": "string",
      "user_email": "string",
      "time_created": "string",
      "time_updated": "string"
    },
    "access_type": "string",
    "groups": []
  }
]
FieldTypeDescription
cc_pair_idintegerConnector–credential pair identifier.
namestringDisplay name for this pair.
connectorobjectConnector configuration (see Connector).
credentialobjectCredential bound to the connector (see Credential).
access_typestringAccess scope (e.g. public).
groupsarrayGroup IDs with access to this pair.
Connector (connector)
FieldTypeDescription
namestringConnector implementation name (e.g. drive-connector).
sourcestringSource type used in source_types for ingest (e.g. google_drive).
input_typestringInput mode (e.g. poll).
connector_specific_configobjectSource-specific settings (shape varies by source).
refresh_freqintegerRefresh interval in seconds.
prune_freqinteger | nullPrune interval in seconds.
indexing_startstring | nullISO timestamp when indexing started.
idintegerConnector identifier.
credential_idsarray<integer>Linked credential IDs.
time_createdstringISO timestamp when the connector was created.
time_updatedstringISO timestamp when the connector was last updated.
Credential (credential)
FieldTypeDescription
credential_jsonobjectRedacted credential payload (keys vary by source).
admin_publicbooleanWhether the credential is public to admins.
sourcestringCredential source type.
namestringCredential display name.
curator_publicbooleanWhether curators can use this credential.
groupsarrayGroup IDs associated with the credential.
idintegerCredential identifier.
user_idstringOwner user UUID.
user_emailstringOwner email address.
time_createdstringISO timestamp when the credential was created.
time_updatedstringISO timestamp when the credential was last updated.

Validation Error (422)

{
  "status_code": 422,
  "message": "string",
  "data": null
}

Example

curl "https://chordian-core.chordian.ai/manage/admin/connector/status" \
  -H "Authorization: Bearer <api-key>"

Get Connectors By Credential

Get a list of connectors. Optionally filter by credential ID.

GET /manage/admin/connector

Authentication: Authorization: Bearer <api-key>

Query Parameters

ParameterTypeRequiredDescription
credentialinteger | nullFilter connectors by credential ID

Successful Response (200 OK)

Array of connector snapshot objects (same shape as Get Connector Status).

[
  {
    "cc_pair_id": 0,
    "name": "string",
    "connector": {
      "name": "string",
      "source": "string",
      "input_type": "string",
      "connector_specific_config": {
        "include_my_drives": true
      },
      "refresh_freq": 0,
      "prune_freq": 0,
      "indexing_start": null,
      "id": 0,
      "credential_ids": [0],
      "time_created": "string",
      "time_updated": "string"
    },
    "credential": {
      "credential_json": {
        "google_primary_admin": "string",
        "google_tokens": "string",
        "authentication_method": "string"
      },
      "admin_public": true,
      "source": "string",
      "name": "string",
      "curator_public": false,
      "groups": [],
      "id": 0,
      "user_id": "string",
      "user_email": "string",
      "time_created": "string",
      "time_updated": "string"
    },
    "access_type": "string",
    "groups": []
  }
]
FieldTypeDescription
(array items)objectConnector–credential pair snapshot. See Get Connector Status for field definitions.

Validation Error (422)

{
  "status_code": 422,
  "message": "string",
  "data": null
}

Example

curl "https://chordian-core.chordian.ai/manage/admin/connector?credential=0" \
  -H "Authorization: Bearer <api-key>"

Create Connector

Create a connector (e.g. web connector).

POST /manage/admin/connector

Authentication: Authorization: Bearer <api-key>

Request Body

{
  "name": "string",
  "source": "string",
  "input_type": "string",
  "connector_specific_config": {
    "base_url": "string",
    "web_connector_type": "string"
  },
  "refresh_freq": 0,
  "prune_freq": null,
  "indexing_start": null,
  "access_type": "string",
  "groups": []
}
FieldTypeRequiredDescription
namestringConnector display name.
sourcestringConnector source type (e.g. web).
input_typestringInput mode (e.g. load_state).
connector_specific_configobjectSource-specific settings (e.g. base_url, web_connector_type).
refresh_freqintegerRefresh interval in seconds.
prune_freqinteger | nullPrune interval; null to disable.
indexing_startstring | nullWhen indexing should start.
access_typestringAccess level (e.g. public).
groupsarrayGroup IDs with access.

Successful Response (200 OK)

Schema: ObjectCreationIdResponse

{}
FieldTypeDescription
(schema)objectCreated connector ID. Shape defined by ObjectCreationIdResponse.

Validation Error (422)

{
  "status_code": 422,
  "message": "string",
  "data": null
}

Example

curl -X POST "https://chordian-core.chordian.ai/manage/admin/connector" \
  -H "Authorization: Bearer <api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "source": "string",
    "input_type": "string",
    "connector_specific_config": {
      "base_url": "string",
      "web_connector_type": "string"
    },
    "refresh_freq": 0,
    "prune_freq": null,
    "indexing_start": null,
    "access_type": "string",
    "groups": []
  }'

Get CC Pair Full Info

Get full information for a connector–credential pair (CC pair).

GET /manage/admin/cc-pair/{cc_pair_id}

Authentication: Authorization: Bearer <api-key>

Path Parameters

ParameterTypeRequiredDescription
cc_pair_idintegerConnector–credential pair identifier

Successful Response (200 OK)

{
  "id": 0,
  "name": "string",
  "status": "string",
  "in_repeated_error_state": false,
  "num_docs_indexed": 0,
  "connector": {
    "name": "string",
    "source": "string",
    "input_type": "string",
    "connector_specific_config": {
      "include_my_drives": true
    },
    "refresh_freq": 0,
    "prune_freq": 0,
    "indexing_start": null,
    "id": 0,
    "credential_ids": [0],
    "time_created": "string",
    "time_updated": "string"
  },
  "credential": {
    "credential_json": {
      "google_primary_admin": "string",
      "google_tokens": "string",
      "authentication_method": "string"
    },
    "admin_public": true,
    "source": "string",
    "name": "string",
    "curator_public": false,
    "groups": [],
    "id": 0,
    "user_id": "string",
    "user_email": "string",
    "time_created": "string",
    "time_updated": "string"
  },
  "number_of_index_attempts": 0,
  "last_index_attempt_status": "string",
  "latest_deletion_attempt": null,
  "access_type": "string",
  "is_editable_for_current_user": true,
  "deletion_failure_message": null,
  "indexing": false,
  "creator": "string",
  "creator_email": "string",
  "last_indexed": "string",
  "last_pruned": null,
  "last_full_permission_sync": null,
  "overall_indexing_speed": 0,
  "latest_checkpoint_description": null,
  "last_permission_sync_attempt_status": null,
  "permission_syncing": false,
  "last_permission_sync_attempt_finished": null,
  "last_permission_sync_attempt_error_message": null
}
FieldTypeDescription
idintegerConnector–credential pair identifier (cc_pair_id).
namestringDisplay name for this pair.
statusstringPair status (e.g. PAUSED, SCHEDULED, ACTIVE).
in_repeated_error_statebooleantrue when the pair is stuck in repeated errors.
num_docs_indexedintegerNumber of documents indexed for this pair.
connectorobjectConnector configuration. See Get Connector StatusConnector.
credentialobjectCredential details. See Get Connector StatusCredential.
number_of_index_attemptsintegerTotal index attempts for this pair.
last_index_attempt_statusstringStatus of the most recent index attempt (e.g. failed).
latest_deletion_attemptobject | nullLatest deletion attempt metadata, if any.
access_typestringAccess scope (e.g. public).
is_editable_for_current_userbooleanWhether the current user may edit this pair.
deletion_failure_messagestring | nullError message when deletion failed.
indexingbooleantrue while an index job is running.
creatorstringCreator user UUID.
creator_emailstringCreator email address.
last_indexedstring | nullISO timestamp of the last successful index.
last_prunedstring | nullISO timestamp of the last prune run.
last_full_permission_syncstring | nullISO timestamp of the last full permission sync.
overall_indexing_speednumberAverage indexing speed metric.
latest_checkpoint_descriptionstring | nullDescription of the latest checkpoint.
last_permission_sync_attempt_statusstring | nullStatus of the last permission sync attempt.
permission_syncingbooleantrue while permission sync is in progress.
last_permission_sync_attempt_finishedstring | nullISO timestamp when the last permission sync finished.
last_permission_sync_attempt_error_messagestring | nullError from the last permission sync attempt.

Not Found (404)

{
  "detail": "string"
}
FieldTypeDescription
detailstringError message (e.g. CC Pair not found for current user permissions).

Validation Error (422)

{
  "status_code": 422,
  "message": "string",
  "data": null
}

Example

curl "https://chordian-core.chordian.ai/manage/admin/cc-pair/0" \
  -H "Authorization: Bearer <api-key>"

Update CC Pair Status

Update the status of a connector–credential pair (e.g. pause or schedule). Returns nearly immediately; background processes handle cleanup.

PUT /manage/admin/cc-pair/{cc_pair_id}/status

Authentication: Authorization: Bearer <api-key>

Path Parameters

ParameterTypeRequiredDescription
cc_pair_idintegerConnector–credential pair identifier

Request Body

{
  "status": "string"
}
FieldTypeRequiredDescription
statusstringNew status: SCHEDULED, INITIAL_INDEXING, ACTIVE, PAUSED, DELETING, or INVALID.

Successful Response (200 OK)

{
  "message": "string"
}
FieldTypeDescription
messagestringConfirmation code (e.g. "200").

Validation Error (422)

{
  "status_code": 422,
  "message": "string",
  "data": null
}

Example

curl -X PUT "https://chordian-core.chordian.ai/manage/admin/cc-pair/0/status" \
  -H "Authorization: Bearer <api-key>" \
  -H "Content-Type: application/json" \
  -d '{"status": "PAUSED"}'

Connector Run Once

Trigger a one-time reindex for a connector and its credentials.

POST /manage/admin/connector/run-once

Authentication: Authorization: Bearer <api-key>

Request Body

{
  "connector_id": 0,
  "credential_ids": [0],
  "from_beginning": false
}
FieldTypeRequiredDescription
connector_idintegerConnector to reindex.
credential_idsarray<integer>Credential IDs to include in the run.
from_beginningbooleanWhen true, reindex from the beginning; when false, incremental.

Successful Response (200 OK)

{
  "success": true,
  "message": "string",
  "data": 0
}
FieldTypeDescription
successbooleantrue when the reindex was queued successfully.
messagestringHuman-readable status (e.g. Marked 1 index attempts with indexing triggers.).
dataintegerNumber of index attempts triggered.

Not Found (404)

{
  "detail": "string"
}
FieldTypeDescription
detailstringError message (e.g. Connector by id 0 does not exist.).

Validation Error (422)

{
  "status_code": 422,
  "message": "string",
  "data": null
}

Example

curl -X POST "https://chordian-core.chordian.ai/manage/admin/connector/run-once" \
  -H "Authorization: Bearer <api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "connector_id": 0,
    "credential_ids": [0],
    "from_beginning": false
  }'

Create Deletion Attempt

Delete a connector and its associated credential.

POST /manage/admin/deletion-attempt

Authentication: Authorization: Bearer <api-key>

Request Body

{
  "connector_id": 0,
  "credential_id": 0
}
FieldTypeRequiredDescription
connector_idintegerConnector to delete.
credential_idintegerCredential paired with the connector.

Successful Response (200 OK)

Returns JSON null when the deletion attempt is accepted.

null

Not Found (404)

{
  "detail": "string"
}
FieldTypeDescription
detailstringError message (e.g. Connector with ID '0' and credential ID '0' does not exist. Has it already been deleted?).

Validation Error (422)

{
  "status_code": 422,
  "message": "string",
  "data": null
}

Example

curl -X POST "https://chordian-core.chordian.ai/manage/admin/deletion-attempt" \
  -H "Authorization: Bearer <api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "connector_id": 0,
    "credential_id": 0
  }'

Associate Credential To Connector

Associate a credential with a connector and set pair metadata.

PUT /manage/connector/{connector_id}/credential/{credential_id}

Authentication: Authorization: Bearer <api-key>

Path Parameters

ParameterTypeRequiredDescription
connector_idintegerConnector identifier
credential_idintegerCredential identifier

Request Body

{
  "name": "string",
  "access_type": "string",
  "groups": []
}
FieldTypeRequiredDescription
namestringDisplay name for the credential pair.
access_typestringAccess level (e.g. public).
groupsarrayGroup IDs with access.

Successful Response (200 OK)

Schema: StatusResponse_int_

{}
FieldTypeDescription
(schema)objectStatus response with integer payload. Shape defined by StatusResponse_int_.

Validation Error (422)

{
  "status_code": 422,
  "message": "string",
  "data": null
}

Example

curl -X PUT "https://chordian-core.chordian.ai/manage/connector/0/credential/0" \
  -H "Authorization: Bearer <api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "access_type": "string",
    "groups": []
  }'

Upload Project File

Upload one or more files to a project.

POST /user/projects/file/upload

Authentication: Authorization: Bearer <api-key>

Request Body

multipart/form-data

FieldTypeRequiredDescription
filesfileFile(s) to upload. Repeat the field for multiple files.

Successful Response (200 OK)

{
  "user_files": [
    {
      "id": "string",
      "temp_id": null,
      "name": "string",
      "project_id": null,
      "user_id": "string",
      "file_id": "string",
      "created_at": "string",
      "status": "string",
      "last_accessed_at": "string",
      "file_type": "string",
      "chat_file_type": "string",
      "token_count": 0,
      "chunk_count": null
    }
  ],
  "rejected_files": [
    {
      "file_name": "string",
      "reason": "string"
    }
  ]
}
FieldTypeDescription
user_filesarray<object>Files accepted for processing (see UserFile).
rejected_filesarray<object>Files rejected at upload time (see RejectedFile).
UserFile (item of user_files[])
FieldTypeDescription
idstringUser-file UUID (use in Get Project File Statuses).
temp_idstring | nullTemporary client-side ID, if provided.
namestringOriginal file name.
project_idstring | nullAssociated project ID.
user_idstringOwner user UUID.
file_idstringInternal file storage identifier.
created_atstringISO timestamp when the file was uploaded.
statusstringProcessing status (e.g. PROCESSING, COMPLETED).
last_accessed_atstringISO timestamp of last access.
file_typestringMIME type (e.g. image/png).
chat_file_typestringChat attachment type (e.g. image).
token_countintegerToken count after processing.
chunk_countinteger | nullNumber of chunks indexed; null while processing.
RejectedFile (item of rejected_files[])
FieldTypeDescription
file_namestringName of the rejected file (may be [unknown_file]).
reasonstringRejection reason (e.g. Unsupported file type: ).

Validation Error (422)

{
  "status_code": 422,
  "message": "string",
  "data": null
}

Example

curl -X POST "https://chordian-core.chordian.ai/user/projects/file/upload" \
  -H "Authorization: Bearer <api-key>" \
  -F "files=@/path/to/file"

Get Project File Statuses

Poll indexing or processing status for uploaded files.

POST /user/projects/file/statuses

Authentication: Authorization: Bearer <api-key>

Request Body

{
  "file_ids": ["string"]
}
FieldTypeRequiredDescription
file_idsarray<string>UUIDs returned from Upload Project File.

Successful Response (200 OK)

Array of file status objects (same shape as UserFile in Upload Project File).

[
  {
    "id": "string",
    "temp_id": null,
    "name": "string",
    "project_id": null,
    "user_id": "string",
    "file_id": "string",
    "created_at": "string",
    "status": "string",
    "last_accessed_at": "string",
    "file_type": "string",
    "chat_file_type": "string",
    "token_count": 0,
    "chunk_count": 0
  }
]
FieldTypeDescription
(array items)objectCurrent status for each requested file. See Upload Project FileUserFile.

Validation Error (422)

{
  "status_code": 422,
  "message": "string",
  "data": null
}

Example

curl -X POST "https://chordian-core.chordian.ai/user/projects/file/statuses" \
  -H "Authorization: Bearer <api-key>" \
  -H "Content-Type: application/json" \
  -d '{"file_ids": ["string"]}'