Change a project’s visibility
const url = 'https://api.sloose.com/orgs/org_9f3c/projects/b3f1c8a2/share';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"visibility":"private"}'};
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/b3f1c8a2/share \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "visibility": "private" }'Sharing with the org is a plan feature, checked here and not only in the UI — MCP and the CLI reach the same rows.
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 project id.
Example
b3f1c8a2The project id.
Request Bodyrequired
Section titled “Request Bodyrequired”object
private is the creator’s alone; org is visible to everyone in the org.
Responses
Section titled “Responses”The project’s new visibility.
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.
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"}No such project, 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"}