Skip to main content

SharePoint Upload

Upload and ingest SharePoint content into the knowledge base. This endpoint triggers the ingestion process for SharePoint documents, synchronizing content from configured SharePoint sources into the knowledge management system.


Endpoint

Method: POST URL: {{base_url}}/v2/sharepoint/upload


Authentication

This endpoint uses Bearer Token authentication via a JWT (JSON Web Token). The token must be included in the Authorization header.


Headers

HeaderDescriptionRequired
AuthorizationBearer token (JWT) for authenticationYes
acceptSpecifies acceptable response formats (application/json)Yes
content-typeMust be application/jsonYes
x-tenantidUUID identifying the tenant/organizationYes

Path Parameters

None.


Query Parameters

None.


Request Body Schema

FieldTypeDescriptionRequired
sharepoint_authbooleanWhether to use SharePoint-specific authenticationYes
content_restrictionobjectContent access restrictions configurationNo
content_restriction.audiencearrayAudience filter (e.g., ["all"])No
content_restriction.blacklistedbooleanWhether to exclude blacklisted contentNo
content_restriction.source_restrictionbooleanWhether to apply source restrictionsNo
pinecone_configobjectVector database configurationYes
pinecone_config.rezolve_domainstringRezolve domain for the tenantYes
pinecone_config.tenant_idstringTenant identifier for Pinecone namespaceYes
sync_configobjectSynchronization configurationYes
sync_config.sync_configuration_idstringID of the sync configurationNo
sync_config.incrementalbooleanWhether to perform incremental syncYes
sync_config.last_syncstring (ISO 8601)Timestamp of last synchronizationNo
sync_config.processor_modestringProcessing mode (auto, manual)Yes
sync_config.use_ocrbooleanWhether to use OCR for image/PDF text extractionYes
job_idstringJob identifier for tracking the upload processNo
drivesarrayList of SharePoint drives to processNo
foldersarrayList of specific folders to processNo
pagesarrayList of SharePoint pages to processNo
sub_sitesarrayList of SharePoint sub-sites to processNo
site_urlsarrayList of SharePoint site URLs to processNo

Request Body Example

{
"sharepoint_auth": false,
"content_restriction": {
"audience": [
"all"
],
"blacklisted": false,
"source_restriction": false
},
"pinecone_config": {
"rezolve_domain": "string",
"tenant_id": "string"
},
"sync_config": {
"sync_configuration_id": "",
"incremental": true,
"last_sync": "2025-12-13T12:58:38.098Z",
"processor_mode": "auto",
"use_ocr": false
},
"job_id": "",
"drives": [],
"folders": [],
"pages": [],
"sub_sites": [],
"site_urls": []
}

Full Sync Example:

{
"sharepoint_auth": false,
"content_restriction": {
"audience": [
"all"
],
"blacklisted": false,
"source_restriction": false
},
"pinecone_config": {
"rezolve_domain": "acme.rezolve.ai",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"sync_config": {
"sync_configuration_id": "",
"incremental": false,
"last_sync": "",
"processor_mode": "auto",
"use_ocr": false
},
"job_id": "",
"drives": [],
"folders": [],
"pages": [],
"sub_sites": [],
"site_urls": ["https://contoso.sharepoint.com/sites/hr"]
}

Incremental Sync with OCR:

{
"sharepoint_auth": false,
"content_restriction": {
"audience": [
"all"
],
"blacklisted": false,
"source_restriction": false
},
"pinecone_config": {
"rezolve_domain": "acme.rezolve.ai",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"sync_config": {
"sync_configuration_id": "sync-config-001",
"incremental": true,
"last_sync": "2025-12-01T00:00:00.000Z",
"processor_mode": "auto",
"use_ocr": true
},
"job_id": "job-550e8400-e29b-41d4-a716-446655440001",
"drives": ["Documents"],
"folders": ["/Shared Documents/HR Policies"],
"pages": [],
"sub_sites": [],
"site_urls": []
}

With Specific Drives and Folders:

{
"sharepoint_auth": false,
"content_restriction": {
"audience": [
"all"
],
"blacklisted": true,
"source_restriction": true
},
"pinecone_config": {
"rezolve_domain": "acme.rezolve.ai",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"sync_config": {
"sync_configuration_id": "",
"incremental": true,
"last_sync": "2025-12-12T10:39:43.660Z",
"processor_mode": "auto",
"use_ocr": false
},
"job_id": "",
"drives": ["Documents", "Reports"],
"folders": ["/Shared Documents/IT", "/Shared Documents/Finance"],
"pages": ["Home", "About"],
"sub_sites": ["hr", "it-support"],
"site_urls": ["https://contoso.sharepoint.com/sites/intranet"]
}

Example cURL

curl --request POST \
--url '{{base_url}}/v2/sharepoint/upload' \
--header 'accept: application/json' \
--header 'authorization: Bearer {{access_token}}' \
--header 'content-type: application/json' \
--header 'x-tenantid: {{tenant_id}}' \
--data '{
"sharepoint_auth": false,
"content_restriction": {
"audience": ["all"],
"blacklisted": false,
"source_restriction": false
},
"pinecone_config": {
"rezolve_domain": "acme.rezolve.ai",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"sync_config": {
"sync_configuration_id": "",
"incremental": true,
"last_sync": "2025-12-13T12:58:38.098Z",
"processor_mode": "auto",
"use_ocr": false
},
"job_id": "",
"drives": [],
"folders": [],
"pages": [],
"sub_sites": [],
"site_urls": []
}'

Success Response Example

Status Code: 200 OK

"string"

Error Responses

Status CodeErrorDescription
400 Bad RequestInvalid request bodyMalformed JSON or missing required fields
401 UnauthorizedAuthentication failedBearer token is missing, expired, or invalid
403 ForbiddenInsufficient permissionsUser lacks permission or SharePoint access denied
422 Unprocessable EntityValidation errorInvalid field values or configuration
500 Internal Server ErrorServer errorUnexpected server-side error

Example Validation Error Response (422):

{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}

Example Error Response:

{
"detail": [
{
"loc": ["body", "pinecone_config", "rezolve_domain"],
"msg": "field required",
"type": "value_error.missing"
}
]
}

Sync Configuration Options

OptionDescription
incremental: trueOnly sync documents modified since last_sync
incremental: falseFull sync - re-process all documents
processor_mode: autoAutomatically determine processing strategy
processor_mode: manualUse manually specified processing settings
use_ocr: trueExtract text from images and scanned PDFs
use_ocr: falseSkip OCR processing

Content Selection Options

FieldDescription
drivesSpecify SharePoint document libraries/drives to process
foldersSpecify folder paths within drives to process
pagesSpecify SharePoint pages to include in processing
sub_sitesSpecify sub-sites to include in processing
site_urlsSpecify full SharePoint site URLs to process

Notes

  1. Pinecone Configuration: The pinecone_config specifies the vector database namespace for storing document embeddings.

  2. Incremental Sync: Set incremental: true and provide last_sync timestamp to only process documents modified since the last sync.

  3. Full Sync: Set incremental: false to re-process all documents, useful when re-indexing or after configuration changes.

  4. OCR Processing: Enable use_ocr to extract text from images, scanned documents, and non-searchable PDFs. This increases processing time.

  5. Processor Mode: Use auto for intelligent processing or manual for explicit control over document handling.

  6. Background Job: Upload operations run asynchronously. The job_id field can be used to track progress.

  7. Content Restrictions: Use content_restriction.audience to filter content by SharePoint audience targeting. Set blacklisted: true to exclude blacklisted content.

  8. Selective Upload: Use drives, folders, pages, sub_sites, or site_urls arrays to selectively upload specific SharePoint resources instead of all content.

  9. Empty Arrays: When arrays like drives, folders, etc. are empty, the system processes all available content from the configured SharePoint site.

  10. Related Endpoints:

    • POST /v2/sharepoint/listing — List SharePoint resources
    • POST /v2/sharepoint/delete — Delete SharePoint sources