An import’s AI conversations
const url = 'https://api.sloose.com/orgs/org_9f3c/imports/imp_4d1a/conversations?source=source-1&place=%5B%22source%22%2C%22source-1%22%5D&keptAfter=0199a3c4-5e6f-7a8b-9c0d-1e2f3a4b5c6d&limit=50';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/imp_4d1a/conversations?source=source-1&place=%5B%22source%22%2C%22source-1%22%5D&keptAfter=0199a3c4-5e6f-7a8b-9c0d-1e2f3a4b5c6d&limit=50' \ --header 'Authorization: Bearer <token>'Every question asked about this import’s work with the AI, newest asked first, a page at a time. That means questions at a file’s Source; at a module’s Which rows & existing, its rule or its Map columns; at a field’s row; at Translate values or one value; in the formula editor; and Explain’s — on one kind of failure on a run, kept by its file, module, kind, code and field and never its run, so the same failure on the next run carries it on; on one of Validate’s problems; and Validate’s own. Each turn says where it was asked (place), what was asked and answered, what the answer proposed and where (targets — of an Explain’s fixes, those a person can take as a guess: a fixed value or a field to leave out is said in the answer and kept as no target, since those are set by hand), what of the file it was made from (samples), who asked (askedBy, null once the person is deleted) and how (askedVia: a person in the app, an org API token or an agent over MCP), and whether the next question at its place may send it to the model again (replayed). source keeps one file’s turns — Translate values’ are the whole import’s, per module, and so are Validate’s and Run’s own, never a file’s — and place keeps one place’s.
Any member reads them, as any member reads the import: the questions asked about an import are its history, not the asker’s. What became of what an answer proposed is not stored with it.
A turn is kept for the plan’s history window from when its question was asked. A turn about a file goes with the file when it is removed; every turn goes with the import when it is deleted or expires — Translate values’, Validate’s own and Run’s own with the import alone, since they are about no file. The order is when each question was asked, and a turn is written when its answer arrives, so one answered while somebody pages can land above their cursor. The next page does not show it; the list read again does, and so does keptAfter, which asks for the turns kept since a turn whatever their order. A turn this build cannot read whole — a place, a route, a target or a sample setting a newer build of Sloose added — is left out, so a page can hold fewer than limit while nextCursor says there are more.
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.
Query Parameters
Section titled “Query Parameters”Only the turns about this file of the import: its source id.
Example
source-1Only the turns about this file of the import: its source id.
Only the turns at this place, named by its key: the JSON array of its parts, its kind first and then its file where it has one (placeKey in @sloose/schemas). A place about a field of a module is ["field","source-1","contacts","Last_Name"]; Translate values’ name the module and no file, as ["vals","accounts"]; a failure on a run is ["failed","source-1","contacts","refused","INVALID_DATA","Email"] (an empty part for no module, code or field), one of Validate’s problems ["issue","source-1","blank_required","contacts","Last_Name"], and Validate’s and Run’s own ["checks"] and ["run"]. A key that names no place is refused.
Example
["source","source-1"]Only the turns at this place, named by its key: the JSON array of its parts, its kind first and then its file where it has one (placeKey in @sloose/schemas). A place about a field of a module is ["field","source-1","contacts","Last_Name"]; Translate values’ name the module and no file, as ["vals","accounts"]; a failure on a run is ["failed","source-1","contacts","refused","INVALID_DATA","Email"] (an empty part for no module, code or field), one of Validate’s problems ["issue","source-1","blank_required","contacts","Last_Name"], and Validate’s and Run’s own ["checks"] and ["run"]. A key that names no place is refused.
Only the turns kept after the turn with this id. A turn’s id is made as the turn is written, and ids sort in the order they were made, so give the newest id you have read to be given every turn kept since — one asked before your last read and answered after it included, which sorts below what you read by when it was asked. The turns come in the list’s own order, a page at a time. Ids made in the same instant on two servers can sort either way, and a turn is written a moment after its id is made, so ask from somewhat before your newest and drop what you hold.
Example
0199a3c4-5e6f-7a8b-9c0d-1e2f3a4b5c6dOnly the turns kept after the turn with this id. A turn’s id is made as the turn is written, and ids sort in the order they were made, so give the newest id you have read to be given every turn kept since — one asked before your last read and answered after it included, which sorts below what you read by when it was asked. The turns come in the list’s own order, a page at a time. Ids made in the same instant on two servers can sort either way, and a turn is written a moment after its id is made, so ask from somewhat before your newest and drop what you hold.
How many to return, at most 200; 50 when absent. Anything but a whole number above zero — 0, negative, a fraction, not a number — is the default, never an error.
Example
50How many to return, at most 200; 50 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 (askedAt, 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 (askedAt, id) order, and a malformed one is 400 INVALID_CURSOR.
Responses
Section titled “Responses”A page of the turns, newest asked first.
object
object
object
object
object
object
object
object
object
object
object
Its position in the conversation at its place, from 0.
The AI route that answered it.
What the answer proposed, and where.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
What the answer said that is not the answer: a caveat, what the server refused.
What of the file the answer was made from: its values (allow); the distinct values of list fields, a picklist’s or a multi-select’s, as Translate values sends them under Masked (values); their shapes (masked); or none of it (none) — counting the earlier turns it was sent with, since an answer can repeat what one of them said.
When the question was asked, which the history window counts from.
Who asked: a person, or the person whose API token asked. Null once they are deleted.
object
How the question was asked: a person’s session in the app (session), an org API token (api_token), or an agent over MCP (mcp).
Whether the next question at its place may send it to the model again. False for a turn before where replay starts, which a stricter AI data setting moves past everything already asked; only the newest 6 are ever sent.
Whether a draft asked it — Draft everything, Fill the gaps or Draft it anyway (draftScope): one call of the draft answers several parts, and each part’s share of the answer is kept at that part’s own place, as a turn saying so, so a later question there — and Go there — finds it (D6). A draft’s turn is sent with no earlier turns, and lands after whatever its place holds without moving where replay starts.
Which draft asked it — Draft everything, Fill the gaps or Draft it anyway: the same for every part’s turn of one draft, so the import’s AI activity lists the draft as one entry. Null for a turn no draft asked, and for a draft’s turn kept before drafts said so, which is an entry of its own.
How much of the import the draft that asked it was asked about: import, Draft everything; gaps, Fill the gaps, the parts a template’s check left open and no other; anyway, Draft it anyway, one file and module a draft found the file does not feed. Null for a turn no draft asked, and for a draft’s turn kept before drafts said, which reads as the whole import.
Pass as cursor for the next page; null when this was the last.
Example
{ "turns": [ { "place": { "kind": "source" }, "route": "source", "targets": [ { "kind": "filter" } ], "samples": "allow", "askedVia": "session", "draft": false, "draftId": null, "draftScope": "import" } ]}place names no place this server knows (code: INVALID_PLACE), 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 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.
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, or it is not visible to this session.
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"}