Skip to content

Delete knowledge base ​

Interface Description ​

Start deleting one knowledge base. Poll the returned operation URL until it reaches a terminal state. After deletion completes, the operation URL remains readable for a limited retention period while the knowledge-base URL returns 404.

Endpoint ​

FieldValue
MethodDELETE
Path/openapi/v2/knowledge-bases/{knowledgeBaseId}
Operation IDdeleteKnowledgeBase
AuthenticationBearer OpenAPI key

Parameters ​

NameLocationRequiredTypeExampleDescription
knowledgeBaseIdpathYesstringknowledge-base-11111111-1111-4111-8111-111111111111Knowledge-base identifier returned by knowledge-base APIs.
Idempotency-KeyheaderYesstringmutation-2026-07-10-001Client-generated key for safely retrying the same request. Reuse the same value for retries so duplicate work is not created.
If-MatchheaderYesstring"1"Current resourceRevision returned by the API. If the resource changed after it was read, the request returns a conflict instead of overwriting the newer change.

Request Body ​

This operation has no request body.

Request Example ​

bash
curl -X DELETE "https://openapi.example.com/openapi/v2/knowledge-bases/knowledge-base-11111111-1111-4111-8111-111111111111" \
  -H "Authorization: Bearer <openapi-key>" \
  -H "Idempotency-Key: mutation-2026-07-10-001" \
  -H "If-Match: \"1\""

Successful Responses ​

202 ​

Accepted knowledge-base deletion, the operation used to check completion, and the number of affected files and directories.

FieldRequiredTypeDescription
operationYesobjectFile or directory change record returned by the request.
deletionYesobjectAccepted deletion details.

Success Response Example ​

json
{
  "operation": {
    "operationId": "deletion-44444444-4444-4444-8444-444444444444",
    "knowledgeBaseId": "knowledge-base-11111111-1111-4111-8111-111111111111",
    "kind": "knowledge_base_delete",
    "state": "processing",
    "expectedResourceRevision": 1,
    "targetKind": "knowledge_base",
    "targetId": "knowledge-base-11111111-1111-4111-8111-111111111111",
    "candidateRelativePath": null,
    "result": null,
    "errorCode": null,
    "retryGuidance": "Check this change again after a short delay.",
    "actions": {
      "self": "/openapi/v2/knowledge-bases/knowledge-base-11111111-1111-4111-8111-111111111111/operations/deletion-44444444-4444-4444-8444-444444444444"
    },
    "createdAt": "2026-06-17T00:00:00.000Z",
    "updatedAt": "2026-06-17T00:00:00.000Z",
    "completedAt": null
  },
  "deletion": {
    "knowledgeBaseId": "knowledge-base-11111111-1111-4111-8111-111111111111",
    "accepted": true,
    "affectedDirectoryCount": 3,
    "affectedFileCount": 20
  }
}

Error Codes ​

The table below lists every error response documented for this operation.

HTTP StatusError CodeExplanation
401UNAUTHORIZEDThe Bearer API key is missing, malformed, unknown, revoked, or deleted.
404NOT_FOUNDThe requested resource was not found.
409CONFLICTThe request conflicts with the resource's current state.
422VALIDATION_ERRORThe request failed validation.
429RATE_LIMITEDThe request exceeded the configured rate limits.
500INTERNAL_ERRORThe API encountered an internal error.
503DATABASE_REPOSITORY_UNAVAILABLEThe data required by this operation is temporarily unavailable.

Next Steps ​