Create a project
const url = 'https://api.sloose.com/orgs/org_9f3c/projects';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","description":"example","visibility":"private","config":{"additionalProperty":"example"},"libraryVersions":"example","expectedUpdatedAt":"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/projects \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "description": "example", "visibility": "private", "config": { "additionalProperty": "example" }, "libraryVersions": "example", "expectedUpdatedAt": "example" }'The configuration is migrated to the current schema version and validated before it is stored. Source rows are never stored — a project is the recipe, not the data.
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
private is the creator’s alone; org is visible to everyone in the org.
The project configuration. Any schema version is accepted: it is migrated to the current one before it is stored, so an older client can still save.
object
Helper library versions this project was built against: namespace → semver.
The updatedAt this client last read. Present: the write is refused with 409 if somebody else saved first. Absent: last writer wins.
Responses
Section titled “Responses”Created.
object
object
The destination this project imports into. Null means the org’s default CRM: a project from before connectors were named, or one saved by an API token or an older session, which name no connector.
bundle:<file> when pushed from a config repo; null when built by a person.
Migrated to the current schema version on read. Null when it could not be migrated.
Migration steps applied on read. Non-empty means the stored row is from an older build.
Example
{ "project": { "visibility": "private" }}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 role is too low, the plan cannot share projects (code: FEATURE_SHARED_PROJECTS), or you are neither the creator nor an admin (code: NOT_PROJECT_OWNER).
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 configuration came from a newer build than this server (code: FROM_FUTURE).
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 configuration is not valid for the current schema version.
object
Example
{ "code": "INVALID_PROJECT"}