pagehive

put_skill

Add a skill to a site, or change the skill with that slug.

SkillsChanges dataAll plansUpdated

What it does

Add a skill to a site, or change the skill with that slug. It takes effect at once, without publish_site, and is never shown to visitors. A new skill needs title (up to 120 characters), when_to_use (one line, up to 300) and body (Markdown steps, up to 50000). A change sends only the fields that change; body_edits is find-and-replace on the stored body instead of sending all of it. checked_on (YYYY-MM-DD, or null) is the day the steps were last confirmed to work. Adding past max_skills_per_site is 403 limit_reached.

Plans

Works on every plan: Free, Basic, Pro and Ultra.

Parameters

NameTypeAbout
site_idrequiredstringThe id of the site. list_sites gives the ids of your sites.
slugrequiredstringThe skill's slug: lowercase letters, digits and hyphens, up to 64 characters, such as write-a-post.
titlestringA short title, up to 120 characters. Needed for a new skill.
when_to_usestringOne line on when an agent should follow this skill, up to 300 characters. Needed for a new skill.
bodystringThe steps, in Markdown, up to 50000 characters. Needed for a new skill.
body_editsarray of objectsEdits applied in order to the stored body; nothing is saved when one fails.
checked_onstring or nullThe day the steps were last confirmed to work (YYYY-MM-DD), or null.

Example

Call put_skill with these arguments:

{
  "site_id": "01a1…",
  "slug": "write-a-post",
  "title": "Write a new post",
  "when_to_use": "When asked to write or publish a post.",
  "body": "1. Draft the post in the posts table.\n2. Show it to the owner.\n3. Publish."
}

Ids like 01a1… stand for your own. list_sites and list_tables give you the real ones.

Related guides