Skip to content

Remove a source

DELETE
/orgs/{org}/imports/{id}/sources/{sid}
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.

org
required

The org id the session was issued for. A token for one org can never read another.

string
Example
org_9f3c

The org id the session was issued for. A token for one org can never read another.

id
required

The import id.

string
Example
imp_4d1a

The import id.

sid
required

The source id.

string
Example
src_7c2e

The source id.

version
required

The version the person removing it was looking at.

integer
>= 1

The version the person removing it was looking at.

Removed; the import at its new version.

Media typeapplication/json
object
import
required
object
id
required
string
orgId
required
string
connectorId
required

The connection Target names; null until one is chosen.

string | null
templateId
required

The template this import was started from or saved as.

string | null
templateVersion
required

The template version it copied: “the template has moved on” compares this.

integer | null
name
required
string
createdByUserId
required

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.

string | null
tokenId
required

The token held, when one was.

string | null
createdByScheduleId
required
string | null
status
required

Where it stands. An import being deleted is not returned at all: it reads as gone the moment its delete is accepted.

string
Allowed values: open running attention done
currentStep
required

Whichever step the wizard of the day left it on, as that wizard names it.

string | null
currentStage
required
string | null
completedSteps
required
Array<string>
enabledModules
required
Array<string>
version
required

The write precondition: every change names the version it was made against, and a stale one is refused 409 IMPORT_CHANGED.

integer
updatedByUserId
required
string | null
updatedByTokenId
required
string | null
updatedByScheduleId
required
string | null
runningRunId
required

The run that holds the import; every other write is refused while one does.

string | null
lastRunAt
required
string | null
createdAt
required
string
updatedAt
required
string
Example
{
"import": {
"status": "open"
}
}

The request — its body or its query — did not match the schema. issues carries the Zod issue list.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

No bearer, or one that is expired, revoked or no longer resolves to a member.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
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).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

No such import (IMPORT_NOT_FOUND) or source (SOURCE_NOT_FOUND).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
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).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

Report a problem with this page