List imports
const url = 'https://api.sloose.com/orgs/org_9f3c/imports?mine=true&status=open&limit=100';const options = {method: 'GET', 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 GET \ --url 'https://api.sloose.com/orgs/org_9f3c/imports?mine=true&status=open&limit=100' \ --header 'Authorization: Bearer <token>'The organisation’s imports, most recently active first, a page at a time. mine keeps the ones the caller started (a token’s count as its creator’s). Every member sees every import; what each may do to one is a matter of §7’s roles, asked when they try.
The order is each import’s latest activity — the later of when it was last changed and when its last run ended — so it MOVES while somebody pages through it: an import changed, or whose run ends, between two pages moves ahead of the cursor — the next page does not show it, and it is at the top of the list read again. An import is never shown twice.
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.
Query Parameters
Section titled “Query Parameters”true for only the caller’s own.
Example
truetrue for only the caller’s own.
Only imports from this template.
Only imports from this template.
Only imports that write through this connection — the Connections pages’ count of the imports through one. An id that is none of the organisation’s connections finds none: it is a filter, not a connection the request uses, so it is never refused.
Only imports that write through this connection — the Connections pages’ count of the imports through one. An id that is none of the organisation’s connections finds none: it is a filter, not a connection the request uses, so it is never refused.
Only imports whose name contains this text, ignoring case (ASCII letters; any other character matches as typed). Blank asks for every import. Only its first 200 characters are searched for: a longer text is cut there, never refused. The next page is asked for with the same text.
Only imports whose name contains this text, ignoring case (ASCII letters; any other character matches as typed). Blank asks for every import. Only its first 200 characters are searched for: a longer text is cut there, never refused. The next page is asked for with the same text.
How many to return, at most 200; 100 when absent. Anything but a whole number above zero — 0, negative, a fraction, not a number — is the default, never an error.
Example
100How many to return, at most 200; 100 when absent. Anything but a whole number above zero — 0, negative, a fraction, not a number — is the default, never an error.
The nextCursor of the page before this one; absent for the first page. Opaque: it names a place in the list’s (activityAt, id) order, and a malformed one is 400 INVALID_CURSOR.
The nextCursor of the page before this one; absent for the first page. Opaque: it names a place in the list’s (activityAt, id) order, and a malformed one is 400 INVALID_CURSOR.
Responses
Section titled “Responses”A page of the imports.
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.
Who has it open right now, one entry per person however many tabs, in the order they arrived — from the import’s room (GET …/live).
object
Their name, or their address when they have cleared it.
When the nightly expiry may take this import if nothing touches it: its latest activity (updatedAt, or lastRunAt if later) plus the days the organisation’s plan keeps history — and never before a change of plan’s 30-day hold, or a suspension’s retained-until date, has passed. The server’s clock and the server’s plan, so the page works nothing out. Changing or running the import moves it. Null while a run holds the import (it is never taken then). What survives is the saved templates and the records its runs made in the CRM; its files, mappings and results go.
Pass as cursor for the next page; null when this was the last.
Example
{ "imports": [ { "nameOrigin": "file", "status": "open" } ]}The query did not match the schema (issues carries the Zod issue list), or cursor is malformed (code: INVALID_CURSOR).
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 (code: ROLE_REQUIRED), or it was issued for a different organisation; the organisation has been closed (code: ORG_CLOSED, either kind of bearer); the person is banned (code: BANNED, a session); or it is a session that is signed in but in no organisation (code: NO_ORG): one that never joined one, or whose person was taken out of the one it was in, or left it. Signing in again changes nothing for NO_ORG; choosing or making an organisation does.
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).