Delete a source document
Takes a document out of this knowledgebase, the way a CI job removes a deleted doc. Agents stop finding it at once. When no other knowledgebase uses it, an org key or an owner or admin personal key deletes it for good (search index, stored file and record) and the answer says deleted: true. Otherwise it is only taken out of this knowledgebase (deleted: false) and stays in the organization's Sources library: when other knowledgebases still use it (stillUsedBy), when the key belongs to a member, or when the organization reviews agent writes. A document synced from a Drive or Notion folder (synced: true) comes back on the next sync unless it is removed there. If the search index cannot be reached, nothing changes and the answer is search_unavailable; retry. Requires the knowledge:write scope; a personal key also needs the member role or above.
Authorization
apiKey An organization API key, created from a Portal's Webhooks page (Provisioning API card). The secret is shown once at creation and stored only as a hash. Keys are organization-wide and carry scopes (end_users:read, end_users:write). Rate limit: 120 requests per minute per key (sliding 60-second window).
In: header
Path Parameters
uuiduuidResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/knowledgebases/497f6eca-6276-4993-bfeb-53cbbbba6f08/sources/497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "sourceId": "797f5a94-3689-4ac8-82fd-d749511ea2b2", "knowledgebaseId": "2eaa043e-18a5-42f0-bbe8-1ad77d6f870c", "deleted": true, "stillUsedBy": 0, "synced": true}