DELETE /v1/knowledge-bases/{knowledge_base_id}/resources/{resource_id}
Delete a file resource by ID.
How to use
Delete the specified resource from its KB. Verify both IDs before removing content used by downstream retrieval. A 204 has no body.
Authentication and permissions
Required permissions: kbs.delete. Resource and owner access checks also apply.
Authorizations
AuthorizationstringRequired
Personal API key (sk_...) or supported user access JWT. See Authentication and authorization for endpoint restrictions and scopes. Use exactly one Authorization header.
Path parameters
knowledge_base_idstring · uuidRequired
resource_idstring · uuidRequired
Responses
204
Successful Response
No content
422
Validation Error
application/json
delete/v1/knowledge-bases/{knowledge_base_id}/resources/{resource_id}
curlcurl --fail-with-body -sS -X DELETE \
"$STACKAI_BASE_URL/v1/knowledge-bases/${KNOWLEDGE_BASE_ID}/resources/${RESOURCE_ID}" \
-H "Authorization: Bearer $STACKAI_API_KEY"No content
PreviousGET /v1/knowledge-bases/{knowledge_base_id}/resources/{resource_id}
NextPOST /v1/knowledge-bases/{knowledge_base_id}/sync
Last updated
Was this helpful?

