Remove a source
const url = 'https://api.sloose.com/orgs/org_9f3c/imports/imp_4d1a/sources/src_7c2e?version=1';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url 'https://api.sloose.com/orgs/org_9f3c/imports/imp_4d1a/sources/src_7c2e?version=1' \ --header 'Authorization: Bearer <token>'Remove a source under version. Its file, cleaning and work stay in storage — a run’s snapshot may name the first two — until nothing does and the sweep takes them, or the import goes. Its AI conversations go with it, and every person’s record of which of its parts they opened, in the same write and under the same version: its id is given to the next file added, which must not open on them. The recipe’s flow for the source is the recipe’s to remove, with a change to the import.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The organisation id the session was issued for. A token for one organisation can never read another.
Example
org_9f3cThe organisation id the session was issued for. A token for one organisation can never read another.
The import id.
Example
imp_4d1aThe import id.
The source id.
Example
src_7c2eThe source id.
Query Parameters
Section titled “Query Parameters”The version the person removing it was looking at.
The version the person removing it was looking at.
Responses
Section titled “Responses”Removed; the import at its new version.
object
object
The connection Target names; null until one is chosen.
The template this import was started from or saved as.
The template version it copied: “the template has moved on” compares this.
Where the name came from: file (the first file named the import), person (somebody typed or cleared it), or null when no origin is recorded: an import made before origins were kept (whoever named it), one still called “Untitled import”, or one named by a template. The first file names an import only while this is not person and its name is still the default.
Who started it — the person, or the person a token acts as. Null only for an import a schedule started, which is nobody’s own.
The token held, when one was.
Where it stands. An import being deleted is not returned at all: it reads as gone the moment its delete is accepted.
Whichever step the wizard of the day left it on, as that wizard names it.
The write precondition: every change names the version it was made against, and a stale one is refused 409 IMPORT_CHANGED.
The app an agent changed the import through over MCP (the OAuth consent’s app name), when its last write was one: updatedByUserId is then the person whose agent it was. Null once anybody else writes.
The run that holds the import; every other write is refused while one does.
Example
{ "import": { "nameOrigin": "file", "status": "open" }}The request — its body or its query — did not match the schema. issues carries the Zod issue list.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}No bearer, or one that no longer resolves: a session that is unknown or expired (code: AUTH_REQUIRED), or an API token that was revoked or expired (TOKEN_REVOKED, TOKEN_EXPIRED), whose organisation is gone (ORG_NOT_FOUND) or whose member or user row is (MEMBERSHIP_GONE).
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}The bearer’s role is too low, or it was issued for a different organisation; or somebody else started this import and an operator changes only their own (code: NOT_YOURS). Like every route behind a session: a session signed in but in no organisation is refused code: NO_ORG, a banned person code: BANNED, and a closed organisation code: ORG_CLOSED.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}No such import (IMPORT_NOT_FOUND) or source (SOURCE_NOT_FOUND).
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}Somebody changed the import since this version was read (code: IMPORT_CHANGED), or a run holds it (code: IMPORT_RUNNING).
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}The restore switch is on (code: MAINTENANCE): every route but /health and /robots.txt is refused before anything is read, except the operator’s own POST /staff/people/{id}/delete with the ADMIN_TOKEN. Sloose is down for maintenance. Please try again in a few minutes.
object
Example
{ "code": "MAINTENANCE"}Headers
Section titled “Headers”Seconds until asking again is worth it (300 while the switch is on).