Skip to main content
PUT
/
v2
/
_knowledgebase
/
{id}
Update Knowledge Base
curl --request PUT \
  --url https://prod-contactswing-fastapi-962560522883.us-central1.run.app/v2/_knowledgebase/{id} \
  --header 'Authorization: <authorization>'
{
  "ctx_id": "<string>",
  "data": {
    "id": "<string>",
    "name": "<string>",
    "document_count": 123
  },
  "message": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.contactswing.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
required
Enter your ContactSwing JWT Bearer token.

Path Parameters

id
string
required
Unique knowledge base identifier from ContactSwing dashboard.

Request Body

multipart/form-data
name
string
Updated knowledge base name
files
file[]
Document files to upload
urls
string[]
URLs of documents to index
faqs
string[]
FAQ question-answer pairs
uploaded_files
file[]
Additional uploaded files

Response

200 OK - Knowledge base updated successfully
ctx_id
string
Request context ID
data
object
id
string
Knowledge base ID
name
string
Updated name
document_count
integer
Total documents
message
string
“Request processed successfully”

Example Request

curl -X PUT 'https://prod-contactswing-fastapi-962560522883.us-central1.run.app/v2/_knowledgebase/YOUR_KB_ID' \
  -H 'Authorization: Bearer YOUR_JWT_TOKEN' \
  -F 'name=Updated KB Name' \
  -F 'files=@document.pdf' \
  -F 'urls[]="https://example.com/docs.pdf"' \
  -F 'faqs[]="Q: What is this?|A: Answer here"'