DELETE
/
v1
/
knowledge-bases
/
{knowledge_base_id}
/
sources
curl --request DELETE \
  --url https://api.callrounded.com/v1/knowledge-bases/{knowledge_base_id}/sources \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '{
  "source_ids": [
    "123e4567-e89b-12d3-a456-426614174000",
    "123e4567-e89b-12d3-a456-426614174001"
  ]
}'
{
  "message": "Sources deleted from knowledge base successfully",
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "organization_id": "123e4567-e89b-12d3-a456-426614174001",
    "name": "Product Documentation",
    "created_at": "2023-06-15T14:30:00Z",
    "status": "ready",
    "sources": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "type": "file",
        "created_at": "2023-06-15T14:30:00Z",
        "file_name": "document.pdf",
        "file_url": "https://storage.example.com/files/document.pdf"
      }
    ]
  },
  "error": {
    "details": [
      {
        "field": "email",
        "message": "Invalid email format"
      }
    ],
    "message": "An error occurred while processing your request",
    "status": 400,
    "type": "generic_error"
  },
  "status": 200
}

Authorizations

X-Api-Key
string
header
required

The API Key created in Rounded Studio.

Path Parameters

knowledge_base_id
string
required

Body

application/json
source_ids
string[]
required

List of source IDs to delete from the knowledge base.

Example:
[
  "123e4567-e89b-12d3-a456-426614174000",
  "123e4567-e89b-12d3-a456-426614174001"
]

Response

200
application/json
Successfully deleted sources from knowledge base
data
object
required

The updated knowledge base data after sources were deleted.

message
string
default:Sources deleted from knowledge base successfully

Response message indicating the result of the operation.

error
object | null
Example:
{
  "details": [
    {
      "field": "email",
      "message": "Invalid email format"
    }
  ],
  "message": "An error occurred while processing your request",
  "status": 400,
  "type": "generic_error"
}
status
integer
default:200

HTTP status code of the response.