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 org id the session was issued for. A token for one org can never read another.
Example
org_9f3cThe org id the session was issued for. A token for one org 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.
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 run that holds the import; every other write is refused while one does.
Example
{ "import": { "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 is expired, revoked or no longer resolves to a member.
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 org; or somebody else started this import and an operator changes only their own (code: NOT_YOURS).
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"}