Skip to main content
PATCH
/
v1
/
voice-agents
/
knowledge-base
/
{id}
Update a knowledge base item by Id.
curl --request PATCH \
  --url https://api.tryhamsa.com/v1/voice-agents/knowledge-base/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "itemName": "Updated Product Documentation"
}
'
{
  "success": false,
  "message": "success",
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "userId": "550e8400-e29b-41d4-a716-446655440000",
    "projectId": "550e8400-e29b-41d4-a716-446655440000",
    "itemName": "Updated Product Documentation",
    "fileSize": "2.5MB",
    "type": "TEXT",
    "status": "PROCESSED",
    "failureReason": "File format not supported",
    "content": "This is the updated content of the knowledge base item...",
    "itemUrl": "https://example.com/updated-document.pdf",
    "itemUrls": [
      "https://example.com/document.pdf"
    ],
    "wordsNumber": 1298,
    "extension": 1298,
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-20T14:45:00Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.tryhamsa.com/llms.txt

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

Authorizations

Authorization
string
header
required

Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token '

Path Parameters

id
string
required

Body

application/json
itemName
string
required

The name of the knowledge base item to update.

Required string length: 1 - 250
Example:

"Updated Product Documentation"

Response

Successful response

success
boolean
default:false
message
string
default:success
data
object