Delete a data source

Hard-delete a source. Cascades to documents and agent references.

DELETE /api/v1/sources/:id

Hard delete. Removes every Document belonging to the source AND pulls the source reference from every agent's data_sources[] array. No trash / restore.

Scope: sources:delete

Path parameters

ParamType
:idstring

Example request

curl -X DELETE https://dashboard.getmacha.com/api/v1/sources/source_64f1c0... \
  -H "Authorization: Bearer $MACHA_API_KEY"

Example response

{
  "data": { "id": "source_64f1c0...", "deleted": true },
  "meta": { "request_id": "req_..." }
}

Errors

StatusCodeWhen
404source_not_foundUnknown ID or already deleted.
Irreversible

Documents are hard-deleted. If the source was indexed, all chunks and embeddings are gone too. Agents that depended on this source for knowledge searches will return empty results until the source is re-added and re-indexed.

© 2026 AGZ Technologies Private Limited