Skip to content

Update a project

PUT
/orgs/{org}/projects/{id}
curl --request PUT \
--url https://api.sloose.com/orgs/org_9f3c/projects/b3f1c8a2 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "description": "example", "visibility": "private", "config": { "additionalProperty": "example" }, "libraryVersions": "example", "expectedUpdatedAt": "example" }'

Only the creator or an admin may save. Send expectedUpdatedAt to make the write conditional: if somebody else saved in the meantime you get a 409 with their version of the project, so a client can show the difference rather than quietly overwriting a colleague’s work.

org
required

The org id the session was issued for. A token for one org can never read another.

string
Example
org_9f3c

The org id the session was issued for. A token for one org can never read another.

id
required

The project id.

string
Example
b3f1c8a2

The project id.

Media typeapplication/json
object
name
string
>= 1 characters <= 200 characters
description
string | null
<= 2000 characters
visibility

private is the creator’s alone; org is visible to everyone in the org.

string
Allowed values: private org
config

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
key
additional properties
libraryVersions

Helper library versions this project was built against: namespace → semver.

object | null
expectedUpdatedAt

The updatedAt this client last read. Present: the write is refused with 409 if somebody else saved first. Absent: last writer wins.

string | null

Saved.

Media typeapplication/json
object
project
required
object
id
required
string
orgId
required
string
connectorId
required

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.

string | null
name
required
string
description
required
string | null
createdByUserId
required
string
visibility
required
string
Allowed values: private org
schemaVersion
required
number
enabledModules
required
Array<string>
libraryVersions
required
object | null
registryVersion
required
number | null
sourceRef
required

bundle:<file> when pushed from a config repo; null when built by a person.

string | null
createdAt
required
string
updatedAt
required
string
config
required

Migrated to the current schema version on read. Null when it could not be migrated.

object | null
migrated
required

Migration steps applied on read. Non-empty means the stored row is from an older build.

Array<string>
unreadable
required
string | null
Example
{
"project": {
"visibility": "private"
}
}

The request body did not match the schema. issues carries the Zod issue list.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

No bearer, or one that is expired, revoked or no longer resolves to a member.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
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).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

No such project, or it is not visible to this session.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

Somebody else saved first. The current server-side project is included so you can merge.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed values: PROJECT_CONFLICT
project
required

The version that is on the server now.

object
id
required
string
orgId
required
string
connectorId
required

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.

string | null
name
required
string
description
required
string | null
createdByUserId
required
string
visibility
required
string
Allowed values: private org
schemaVersion
required
number
enabledModules
required
Array<string>
libraryVersions
required
object | null
registryVersion
required
number | null
sourceRef
required

bundle:<file> when pushed from a config repo; null when built by a person.

string | null
createdAt
required
string
updatedAt
required
string
config
required

Migrated to the current schema version on read. Null when it could not be migrated.

object | null
migrated
required

Migration steps applied on read. Non-empty means the stored row is from an older build.

Array<string>
unreadable
required
string | null
Example
{
"code": "PROJECT_CONFLICT",
"project": {
"visibility": "private"
}
}

The configuration is not valid for the current schema version.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed values: INVALID_PROJECT
issues
required
Array
key
additional properties
Example
{
"code": "INVALID_PROJECT"
}