Apply a configuration bundle
const url = 'https://api.sloose.com/orgs/org_9f3c/config/bundle';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"bundleVersion":1,"org":{"dateFormat":"DMY","expressionContext":"example","aiSamples":"allow"},"registry":{"version":1,"modules":[{"key":"example","apiName":"example","label":"example","singular":"example","color":"example","defaultEnabled":true,"uniqueFields":["example"],"defaultDuplicateCheck":{"searchField":"example","searchMethod":"example","expression":"example"},"excludedFields":["example"],"seedMappings":{"additionalProperty":{"mode":"column","source":"example","staticValue":"example","transform":"example","skip":true,"searchField":"example","searchMethod":"example","searchExpression":"example","patch":{"when":["pending"],"overwrite":"always"}}}}],"expressionContext":"example","apiDelayMs":1,"systemExcludedFields":["example"],"dateFormat":"DMY"},"fields":{"additionalProperty":[{"apiName":"example","description":"example","format":"example","examples":["example"],"aliases":["example"],"pii":true,"derived":true,"defaultMapping":{"mode":"column","source":"example","staticValue":"example","transform":"example","skip":true,"searchField":"example","searchMethod":"example","searchExpression":"example","patch":{"when":["pending"],"overwrite":"always"}},"excluded":true}]},"libraries":[{"manifest":{"namespace":"example","version":"example","scope":"global","description":"example","functions":[{"name":"example","description":"example","params":[{"name":"example","type":"example","optional":true,"description":"example"}],"returns":"example","examples":[{"call":"example","result":"example"}],"tags":["example"]}]},"source":"example"}],"projects":[{"name":"example","description":"example","config":{"additionalProperty":"example"}}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.sloose.com/orgs/org_9f3c/config/bundle \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "bundleVersion": 1, "org": { "dateFormat": "DMY", "expressionContext": "example", "aiSamples": "allow" }, "registry": { "version": 1, "modules": [ { "key": "example", "apiName": "example", "label": "example", "singular": "example", "color": "example", "defaultEnabled": true, "uniqueFields": [ "example" ], "defaultDuplicateCheck": { "searchField": "example", "searchMethod": "example", "expression": "example" }, "excludedFields": [ "example" ], "seedMappings": { "additionalProperty": { "mode": "column", "source": "example", "staticValue": "example", "transform": "example", "skip": true, "searchField": "example", "searchMethod": "example", "searchExpression": "example", "patch": { "when": [ "pending" ], "overwrite": "always" } } } } ], "expressionContext": "example", "apiDelayMs": 1, "systemExcludedFields": [ "example" ], "dateFormat": "DMY" }, "fields": { "additionalProperty": [ { "apiName": "example", "description": "example", "format": "example", "examples": [ "example" ], "aliases": [ "example" ], "pii": true, "derived": true, "defaultMapping": { "mode": "column", "source": "example", "staticValue": "example", "transform": "example", "skip": true, "searchField": "example", "searchMethod": "example", "searchExpression": "example", "patch": { "when": [ "pending" ], "overwrite": "always" } }, "excluded": true } ] }, "libraries": [ { "manifest": { "namespace": "example", "version": "example", "scope": "global", "description": "example", "functions": [ { "name": "example", "description": "example", "params": [ { "name": "example", "type": "example", "optional": true, "description": "example" } ], "returns": "example", "examples": [ { "call": "example", "result": "example" } ], "tags": [ "example" ] } ] }, "source": "example" } ], "projects": [ { "name": "example", "description": "example", "config": { "additionalProperty": "example" } } ] }'Applies a whole configuration repository in one call — registry, annotations, settings, helper libraries and seeded projects. This is what the SDK’s push sends.
A bundle’s projects belong to the whole org, so pushing them is sharing: a plan without shared projects is refused rather than silently importing them as private.
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
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Responses
Section titled “Responses”Applied. Counts of what changed are included, along with the new resolved-config etag.
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 cannot share projects (code: FEATURE_SHARED_PROJECTS), the module limit would be exceeded, or the role is too low.
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 bundle names a module or field this org does not have.
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"}