Set which modules are enabled, and in what order
const url = 'https://api.sloose.com/orgs/org_9f3c/config/modules/order';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"modules":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.sloose.com/orgs/org_9f3c/config/modules/order \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "modules": [ "example" ] }'Order matters: it is the order records are created in, so a module that others reference must come first. Modules absent from the list are disabled.
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.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Module keys or API names, in creation order. Anything not listed is disabled — this sets the whole enabled set, it does not append to it.
Examplegenerated
{ "modules": [ "example" ]}Responses
Section titled “Responses”Applied, in the order given.
object
Example
{ "ok": true}The request body 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 plan’s module limit would be exceeded (code: LIMIT_MODULES), or the org is suspended.
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"}missing lists the references that are not in the latest discovery.
object
Example
{ "code": "UNKNOWN_MODULES"}