Skip to main content

GET — fetch an action

GET https://openhermit.com/api/actions/{action_id}
Returns the full action record including all configured prompts.

Response

{
  "action": {
    "id": "uuid",
    "name": "Contact Form",
    "type": "contact_form",
    "tool_name": "contact_form",
    "tool_description": "Send a message to the team",
    "selector": "#contact-form",
    "page_url": "https://example.com/contact",
    "enabled": true,
    "before_prompt": "Have name and email ready.",
    "success_prompt": "Form submitted. We reply within 24h.",
    "failure_prompt": "Try hello@example.com directly.",
    "next_action_url": "https://calendly.com/example/30min",
    "next_action_label": "Book a meeting",
    "created_at": "2025-01-15T10:30:00Z"
  }
}

PATCH — update an action

PATCH https://openhermit.com/api/actions/{action_id}
Content-Type: application/json
Update any combination of the following fields:
{
  "enabled": true,
  "tool_description": "Updated description for agents",
  "before_prompt": "Updated before prompt",
  "success_prompt": "Updated success prompt",
  "failure_prompt": "Updated failure prompt",
  "next_action_url": "https://calendly.com/example/30min",
  "next_action_label": "Book a meeting"
}
FieldTypeDescription
enabledbooleanShow/hide this action from agents
tool_descriptionstringHow agents understand this action
before_promptstring | nullShown to agent before acting
success_promptstring | nullReturned after success
failure_promptstring | nullReturned after failure
next_action_urlstring | nullURL to chain agents to next
next_action_labelstring | nullLabel for the next action

Response

{
  "success": true,
  "action": { "...updated fields..." }
}

Authentication

Both endpoints require the user to be authenticated via Supabase session cookie. They are dashboard-facing — not designed for cross-origin use.