Skip to main content

ServiceNow Upload

Upload and ingest ServiceNow knowledge base content into the knowledge management system. This endpoint triggers the ingestion process for ServiceNow knowledge articles, synchronizing content from configured ServiceNow instances.


Endpoint

Method: POST URL: {{base_url}}/v2/servicenow/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
authorizationobjectServiceNow authentication configurationYes
authorization.usernamestringServiceNow usernameYes
authorization.passwordstringServiceNow passwordYes
authorization.client_idstringOAuth client IDYes
authorization.client_secretstringOAuth client secretYes
authorization.refresh_tokenstringOAuth refresh tokenNo
authorization.servicenow_domainstringServiceNow instance domainYes
pinecone_configobjectVector database configurationYes
pinecone_config.rezolve_domainstringRezolve domain for the tenantYes
pinecone_config.tenant_idstringTenant identifier for Pinecone namespaceYes
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
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
knowledge_basesarrayList of knowledge base sys_ids to processNo
article_query_namesarrayList of article fields to query/retrieveNo
job_idstringJob identifier for tracking the upload processNo

Request Body Example

{
"authorization": {
"username": "string",
"password": "string",
"client_id": "string",
"client_secret": "string",
"refresh_token": "string",
"servicenow_domain": "string"
},
"pinecone_config": {
"rezolve_domain": "string",
"tenant_id": "string"
},
"content_restriction": {
"audience": [
"all"
],
"blacklisted": false,
"source_restriction": false
},
"sync_config": {
"sync_configuration_id": "",
"incremental": true,
"last_sync": "2025-12-13T13:09:45.775Z",
"processor_mode": "auto",
"use_ocr": false
},
"knowledge_bases": [],
"article_query_names": [
"sys_id",
"number",
"short_description",
"text",
"workflow_state",
"sys_updated_on",
"latest",
"language",
"meta",
"can_read_user_criteria",
"u_this_article_can_be_summarized_reference_by_a_ai_tool",
"u_market"
],
"job_id": ""
}

Full Sync Example:

{
"authorization": {
"username": "{{servicenow_username}}",
"password": "{{servicenow_password}}",
"client_id": "{{servicenow_client_id}}",
"client_secret": "{{servicenow_client_secret}}",
"refresh_token": "",
"servicenow_domain": "{{servicenow_domain}}"
},
"pinecone_config": {
"rezolve_domain": "acme.rezolve.ai",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"content_restriction": {
"audience": [
"all"
],
"blacklisted": false,
"source_restriction": false
},
"sync_config": {
"sync_configuration_id": "",
"incremental": false,
"last_sync": "",
"processor_mode": "auto",
"use_ocr": false
},
"knowledge_bases": [],
"article_query_names": [
"sys_id",
"number",
"short_description",
"text",
"workflow_state",
"sys_updated_on"
],
"job_id": ""
}

Incremental Sync with Specific Knowledge Bases:

{
"authorization": {
"username": "{{servicenow_username}}",
"password": "{{servicenow_password}}",
"client_id": "{{servicenow_client_id}}",
"client_secret": "{{servicenow_client_secret}}",
"refresh_token": "{{servicenow_refresh_token}}",
"servicenow_domain": "{{servicenow_domain}}"
},
"pinecone_config": {
"rezolve_domain": "acme.rezolve.ai",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"content_restriction": {
"audience": [
"all"
],
"blacklisted": false,
"source_restriction": false
},
"sync_config": {
"sync_configuration_id": "sync-config-001",
"incremental": true,
"last_sync": "2025-12-01T00:00:00.000Z",
"processor_mode": "auto",
"use_ocr": true
},
"knowledge_bases": [
"kb0000001",
"kb0000002"
],
"article_query_names": [
"sys_id",
"number",
"short_description",
"text",
"workflow_state",
"sys_updated_on",
"latest",
"language",
"meta",
"can_read_user_criteria",
"u_this_article_can_be_summarized_reference_by_a_ai_tool",
"u_market"
],
"job_id": ""
}

With Content Restrictions:

{
"authorization": {
"username": "{{servicenow_username}}",
"password": "{{servicenow_password}}",
"client_id": "{{servicenow_client_id}}",
"client_secret": "{{servicenow_client_secret}}",
"refresh_token": "",
"servicenow_domain": "{{servicenow_domain}}"
},
"pinecone_config": {
"rezolve_domain": "acme.rezolve.ai",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"content_restriction": {
"audience": [
"it-support",
"hr-team"
],
"blacklisted": true,
"source_restriction": true
},
"sync_config": {
"sync_configuration_id": "",
"incremental": true,
"last_sync": "2025-12-12T10:39:43.660Z",
"processor_mode": "auto",
"use_ocr": false
},
"knowledge_bases": ["kb0000003"],
"article_query_names": [
"sys_id",
"number",
"short_description",
"text"
],
"job_id": ""
}

Example cURL

curl --request POST \
--url '{{base_url}}/v2/servicenow/upload' \
--header 'accept: application/json' \
--header 'authorization: Bearer {{access_token}}' \
--header 'content-type: application/json' \
--header 'x-tenantid: {{tenant_id}}' \
--data '{
"authorization": {
"username": "admin",
"password": "your-password",
"client_id": "abc123def456",
"client_secret": "secret-value",
"refresh_token": "",
"servicenow_domain": "acme.service-now.com"
},
"pinecone_config": {
"rezolve_domain": "acme.rezolve.ai",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"content_restriction": {
"audience": ["all"],
"blacklisted": false,
"source_restriction": false
},
"sync_config": {
"sync_configuration_id": "",
"incremental": true,
"last_sync": "2025-12-13T13:09:45.775Z",
"processor_mode": "auto",
"use_ocr": false
},
"knowledge_bases": [],
"article_query_names": [
"sys_id",
"number",
"short_description",
"text",
"workflow_state",
"sys_updated_on"
],
"job_id": ""
}'

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 ServiceNow 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", "authorization", "servicenow_domain"],
"msg": "field required",
"type": "value_error.missing"
}
]
}

Article Query Names

The article_query_names array specifies which fields to retrieve from ServiceNow knowledge articles:

FieldDescription
sys_idUnique system identifier for the article
numberArticle number (e.g., KB0010001)
short_descriptionArticle title/summary
textFull article content/body
workflow_statePublication state (draft, published, retired)
sys_updated_onLast modification timestamp
latestWhether this is the latest version
languageArticle language code
metaArticle metadata
can_read_user_criteriaUser criteria for read access
u_this_article_can_be_summarized_reference_by_a_ai_toolAI summarization permission flag
u_marketMarket/region classification

Sync Configuration Options

OptionDescription
incremental: trueOnly sync articles modified since last_sync
incremental: falseFull sync - re-process all articles
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

Notes

  1. ServiceNow OAuth: Configure OAuth application in ServiceNow to obtain client_id and client_secret.

  2. ServiceNow Domain: The servicenow_domain should be your instance URL without protocol (e.g., acme.service-now.com).

  3. Knowledge Bases: Leave knowledge_bases array empty to sync all accessible knowledge bases, or specify sys_ids to sync specific ones.

  4. Article Query Names: Customize article_query_names to control which article fields are retrieved and indexed.

  5. Custom Fields: Fields starting with u_ are custom fields specific to your ServiceNow instance.

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

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

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

  9. OCR Processing: Enable use_ocr to extract text from images and attachments in knowledge articles.

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

  11. Related Endpoints:

    • POST /v2/servicenow/kb-listing — List ServiceNow knowledge bases
    • POST /v2/servicenow/delete — Delete ServiceNow sources