OpenAPI reference · Sources
Delete a source (two-phase)
/sources/{sourceId}Permanently delete a source: the row, its full transcript (paragraphs and sentences), its topics and their hooks, its knowledge-base copy (document, chunks, and embeddings — knowledge search stops returning the content immediately), and the stored audio/video/file object. The storage quota those bytes held is released. This cannot be undone.
It is deliberately not total erasure, and the proposal and result both say so: posts generated from the source are the user's content and are kept (their link to the source simply goes stale), and the internal usage-accounting ledger survives — deleting it would rewrite historical cost reporting.
Two-phase. A DELETE without confirmationToken deletes
nothing: it returns a proposal describing exactly what will be
removed and what survives, plus a confirmationToken (expires
~5 minutes). Show the proposal to the user; after they
explicitly confirm, repeat the same request with
?confirmationToken= to execute. A token is bound to this
source and this principal — a mismatched or expired token fails
400 invalid_request with details.reason: confirmation_invalid / confirmation_expired and deletes
nothing.
Emits source.deleted on execution (identity only, never the
transcript).
Requires the sources:destroy scope, which sources:write and
the write alias never imply — request it explicitly at
consent.
Workspace-shared knowledge. If any knowledge-base document
written from this transcript was shared with the whole company,
the delete additionally requires an admin — acting through an
OAuth grant — of the workspace that document is shared with,
which is not always the caller's own. That is the same rule
delete_knowledge_doc applies to those rows, enforced in both
phases. Without it the call fails 403 admin_required and
nothing is deleted. The proposal names the count in
data.toDelete.workspaceSharedKnowledgeDocuments.
Authorization
AuthorizationstringrequiredBearer token in the Authorization header.
Pass
Authorization: Bearer scripe_sk_live_<...>(orscripe_sk_test_<...>for test keys) on every request. Keys are scoped to a single workspace and can be revoked from the Scripe dashboard.The same header also accepts an OAuth 2.1 access token (
scripe_oat_*); both credentials share one scope vocabulary and every operation below documents the scope it requires. An API key can hold every scope named on this surface exceptwebhooks:manage, which is grantable to OAuth tokens only today — the webhook-endpoint operations answer403 scope_missingto every API key. Operations that name no scope accept any valid token of the workspace.
Path parameters
sourceIdstringrequired
Query parameters
confirmationTokenstringOmit on the first call to receive the proposal. Repeat the call with the returned token to execute the delete.
Header parameters
Scripe-Api-VersionstringPin the API version. Format
YYYY-MM-DD. Omit to receive the currently rolling default. Unknown versions return400 version_unsupported.
Responses
- 200
Without
confirmationToken: the proposal (data.phase: "proposal") — nothing was deleted. With a valid token: the deletion result (data.deleted: true). - 400
Malformed request (bad cursor, bad limit, etc.).
- 401
Missing, malformed, expired, or revoked API key.
- 403
Plan not eligible, scope missing, or workspace mismatch.
- 404
Resource not found in this workspace.
- 429
Sliding-window rate limit exceeded.
Example request
curl --request DELETE \
--url 'https://api.scripe.io/v1/sources/{sourceId}' \
--header 'Authorization: Bearer <token>'Example response (200)
{
"data": {
"phase": "proposal",
"sourceId": "src_a1b2c3d4e5f6g7h8",
"projectId": "proj_a1b2c3d4e5f6g7h8",
"name": "string",
"status": "string",
"durationSeconds": 0,
"createdAt": "2026-08-10T09:00:00Z",
"toDelete": {
"topics": 0,
"hooksOfThoseTopics": true,
"transcriptParagraphsAndSentences": true,
"knowledgeDocuments": 0,
"workspaceSharedKnowledgeDocuments": 0,
"knowledgeEmbeddings": true,
"storedFile": true
},
"kept": {
"derivedPosts": 0,
"usageLedger": true
},
"warnings": [
"string"
],
"note": "string",
"confirmationToken": "string",
"tokenExpiresAt": 0
}
}