VocalDocscontracts 1.65.0

Delete a Source

DELETE /v1/knowledge-bases/{knowledge_base_id}/sources/{source_id}

PropertyValue
Operationdelete_knowledge_source
GroupKnowledge bases
Scopeknowledge:write
Route classcontrol
IdempotencyNo Idempotency-Key
AuditAudited knowledge.source.delete (mutation)
Released in1.53.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Deletes the Source at the revision If-Match names (1.53.0) and marks its Documents removed: they leave the next version, published versions keep them until retired, and a run in progress is canceled. A purge, not a deletion, removes content from published versions.

Request

Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the knowledge:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl -X DELETE "$VOCAL_API/v1/knowledge-bases/kb_.../sources/ksrc_..." \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H 'If-Match: "1"'

Parameters

NameInTypeRequiredDescription
knowledge_base_idpathKnowledgeBaseIdyesThe id of a Knowledge base: kb_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
source_idpathKnowledgeSourceIdyesThe id of a Source of a Knowledge base: ksrc_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
if-matchheaderstringyesThe revision the change was made against, quoted as the ETag returns it, or * to overwrite.

Responses

StatusContent typeShapeError codes
200application/jsonKnowledgeSourceDeletion
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
404application/jsonErrorEnvelopenot_found
409application/jsonErrorEnvelopeknowledge_base_archived
412application/jsonErrorEnveloperevision_mismatch
428application/jsonErrorEnvelopeprecondition_required
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is KnowledgeSourceDeletion.

FieldTypeRequiredDescription
deleted_atTimestampyes
documents_removedintegeryesThe Documents marked removed; published versions keep them until retired.
idKnowledgeSourceIdyes
knowledge_base_idKnowledgeBaseIdyes
object"knowledge_source_deletion"yes