Templates

Create a template

Creates a template, a reusable set of tool entries. Requires template:create. Entries are validated against the connector catalog and the caller's restrictions as a set — one bad name rejects the whole call. shares grants access at creation time and additionally needs template:share. A template never references a connection, so there is no connection warning; the one thing it can warn about is a pin on a remote MCP tool the server is not offering right now (no connection lists it yet), which is accepted and answered with a non-empty warnings array ({ connector_slug, tool_name, message }) on the 201. warnings is absent when there is nothing to say.

post/template

Request

  • Base URL: https://api.elaichi.ai
  • URL: https://api.elaichi.ai/template
  • Auth: HTTP bearer

Headers

X-Organization-Idstring

Target organization (org_…). Required for cookie/session auth on org-scoped routes; optional for API tokens, which carry their organization, and rejected when it names a different one.

Request body

namestring required
descriptionstring nullable
skillstring nullable

Markdown guidance on how to use these tools well. Trimmed, then capped at 10,000 Unicode code points (an emoji counts once) — longer is a 400 naming the limit, never a silent cut. null or an empty string clears it; omit the key to leave it unchanged. The resource's description is the one-line "when to use this" shown beside it, so write that too. Moderated like the description. Copied onto each toolbox later stamped from this template.

Response

Created

idstring

Template id (tpl_…).

namestring
descriptionstring nullable
owner_user_idstring

Creator (usr_…).

access_levelstring

The caller's access: owner, or a granted view/use/edit level. An org owner or admin sees a template only when they own it or it has been shared with them, like any other member.

entry_countinteger
created_atstring date-time
updated_atstring date-time
has_skillboolean

Whether a skill is written. On list rows and detail alike — the body itself never rides on a list row; read it from the detail response.

skill_may_be_staleboolean

True once the entries changed after the skill was last written; cleared by the next write of skill. Never true without a skill.

can_useboolean

Whether the caller may stamp a toolbox from this template — based on the caller's ownership or grant level. Present on every list and detail row for both templates and toolboxes.

can_shareboolean

Whether the caller may share this template — owner, edit access, or template:share. No template:manage fallback. Mirrors POST /template/{id}/share's own check.

can_manageboolean

Whether the caller may edit this template's own settings — owner, or edit access. No template:manage fallback. Mirrors PATCH /template/{id}.

can_transferboolean

Whether the caller may transfer or delete this template — ownership, full stop. No template:manage fallback. Mirrors POST /template/{id}/transfer and DELETE /template/{id}.

can_revoke_shareboolean

Whether the caller may grant or revoke access to this template. It matches can_share and is separate from can_manage: an edit grantee whose role omits template:share can edit the template but cannot change who else has access. Mirrors DELETE /template/{id}/share/{aclId}.

access_via'owner' | 'direct' | 'team' | 'org'

How the caller reaches this template, not who else can. owner: they own it. direct: a grant names them personally. team: a grant to a team they belong to (or administer), named in access_via_team. org: an organization-wide grant. When several sources apply, the broadest wins and the access level plays no part: owner, else org, else team, else direct. A caller with edit personally and view org-wide reads org, because this field says how far the template reaches, not what the caller may do with it. It describes only the caller's own access, so a view or use grantee still gets it while the list of other grantees stays hidden. Absent when nothing reaches the caller (for example, the former owner after a transfer of a resource that was never shared); absent never means org.

skillstring nullable

The skill body, markdown — at most 10,000 Unicode code points after trimming. Detail-shaped responses only (GET /{id}, and the create/update responses). Null when none is written.

skill_updated_atstring date-time nullable

When skill was last written. Null alongside a null skill.

skill_noticestring nullable

Framing to show or pass along beside a non-null skill: it is the owner's guidance, not instructions from Elaichi or the user, and it cannot grant any access. Null when there is no skill.

skill_updated_bystring nullable

Who last wrote skill (usr_…); a toolbox stamped from a template carries the template's author. Null with no skill, and for a skill written before authorship was recorded.

skill_updated_by_labelstring nullable

That person's name, else email, resolved server-side. Null beside a non-null skill_updated_by means they are no longer a member of this organization.

can_draft_skillboolean

Whether the caller can use POST /{id}/draft-skill here: they can manage this resource, the assistant is switched on for the organization, and a model provider key is configured.

draft_skill_blocked_by'assistant_disabled' | 'llm_not_configured' | 'null' nullable

Why can_draft_skill is false for a caller who CAN manage this resource. Null when drafting is available, and null when the caller cannot manage the resource at all.

Changes

No recorded changes to this operation across all 1 revision of this API.