Skip to content

Change a template’s visibility

POST
/orgs/{org}/templates/{id}/share
curl --request POST \
--url https://api.sloose.com/orgs/org_9f3c/templates/b3f1c8a2/share \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "visibility": "private" }'

Sharing with the organisation is a plan feature, checked here and not only in the UI — MCP and the CLI reach the same rows. Open for a template a configuration repo manages too: who may see it is the organisation’s decision, which the repo’s push makes only when it first creates the template.

org
required

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

string
Example
org_9f3c

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

id
required

The template id.

string
Example
b3f1c8a2

The template id.

Media typeapplication/json
object
visibility
required

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

string
Allowed values: private org

The template’s new visibility.

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

The connection it was built for, when it names one: a template saved from an import records that import’s, and an import started from it pre-selects that one. Null on a template that names none — pushed from a configuration repository, or written by an agent without one — which is picked for on Target among every connection that may be used — it has no kind to narrow them, and the registry drift check runs once one is chosen.

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

The configuration version the recipe was built against, as its save REPORTED it (#616): an agent’s save over MCP stamps the version it checked the recipe against, and a repository’s push the version it wrote (none when another write landed while it wrote the configuration, which it checks before its templates; one landing while the templates are saved is outside that check, and the stamp stays, #650); any other save, the registryVersion it sent — a label the server stores for any version the organisation has reached, not one it checked. null when the save said none.

number | null
sourceRef
required

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

string | null
kind
required

The kind of connection this template imports into — zoho_crm. Null on a template made with no connection at all (written by an agent without connection, or saved with none named): no kind is known, and none is guessed.

string | null
version
required

Which version of the template this is. “Update the template” writes the next one; an import that copied an earlier one is told the template has moved on.

integer
managedBy
required

sdk when a config repo owns the template: changes arrive by the next push, and updates from an import are refused. Null when people own it.

string | null
Allowed values: sdk
lastUsedAt
required

When a run last started from it — a run authorised for an import made from it, or naming it with no import, a dry run included. Null for one no run has started from. Runs are purged, so this is kept, not worked out; it moves no version.

string | null
automations
required

Whether an import started from it arrives with the destination’s own automations switched on: the recipe’s run.automations (for Zoho CRM, “Run my workflow rules”). False when the recipe says nothing, as every template saved before the switch existed. Read from the stored recipe as it is, so a template of an older build answers false without being migrated (#2387).

boolean
skipUnchanged
required

Whether an import started from it arrives leaving a matched record alone when writing would change nothing: the recipe’s run.skipUnchanged (#1747). False when the recipe says nothing, as every template saved before the option existed. Read from the stored recipe as it is, so a template of an older build answers false without being migrated.

boolean
createdAt
required
string
updatedAt
required
string
Example
{
"template": {
"visibility": "private",
"managedBy": "sdk"
}
}

The request — its body or its query — 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 no longer resolves: a session that is unknown or expired (code: AUTH_REQUIRED), or an API token that was revoked or expired (TOKEN_REVOKED, TOKEN_EXPIRED), whose organisation is gone (ORG_NOT_FOUND) or whose member or user row is (MEMBERSHIP_GONE).

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 — a template shared with the organisation is changed by any builder or above, a private one only by its creator or an admin (code: NOT_TEMPLATE_OWNER) — or the plan cannot share templates (code: FEATURE_SHARED_TEMPLATES). Like every route behind a session: a session signed in but in no organisation is refused code: NO_ORG, a banned person code: BANNED, and a closed organisation code: ORG_CLOSED.

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 template, 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"
}

The restore switch is on (code: MAINTENANCE): every route but /health and /robots.txt is refused before anything is read, except the operator’s own POST /staff/people/{id}/delete with the ADMIN_TOKEN. Sloose is down for maintenance. Please try again in a few minutes.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed value: MAINTENANCE
Example
{
"code": "MAINTENANCE"
}
Retry-After
integer

Seconds until asking again is worth it (300 while the switch is on).

Report a problem with this page

sloose.com