Amplixa Docs

Chat actions

Let the agent call your HTTPS API from a conversation (Custom HTTPS).

Chat actions (Custom HTTPS)

On Agents → Actions, you can add a Custom HTTPS action so the agent can call your API during a conversation.

Other action types (Calendly, Cal.com, Slack, OpenAPI import, and similar) may appear as Coming soon — only Custom HTTPS is documented as available here.

What visitors experience

  1. The agent decides the action fits the conversation (based on your “when to use” description).
  2. Amplixa can collect configured input fields from the visitor.
  3. For mutating methods, the visitor confirms before Amplixa sends the request.
  4. Your API responds; Amplixa shows a success path or your configured failure message.

The embed never receives your API key. Amplixa stores it encrypted and sends it only on the server-side request.

Configure

  1. Agents → Actions → Add action → Custom HTTPS.
  2. Basics — name (tool slug), when-to-use, enabled.
  3. Collect — input fields (required for Amplixa form mode; optional for Custom request). You can map values from Collect leads context such as contact.email, contact.name, contact.phone.
  4. Request — body mode, URL, API key; Custom request also has method, headers, and body template with {{var}} placeholders.
  5. Failure — visitor-facing fallback if the call fails (default: “Sorry, we are unable to process this transaction.”).
  6. Save, then use Send test data to fire one real call with sample values.

Body modes

ModeBehavior
Amplixa formFixed POST envelope after confirm: { action, conversationId, fields, context }
Custom requestYou choose method (GET/POST/PUT/PATCH/DELETE), URL/header/body templates

Amplixa form request shape

POST https://your-api.example.com/amplixa/requests
Authorization: Bearer <the-key-you-saved>
Content-Type: application/json
Idempotency-Key: <conversationId:actionId:argsHash>
{
  "action": "submit_request",
  "conversationId": "clx...",
  "fields": {
    "email": "[email protected]",
    "requestType": "repair",
    "summary": "Leaking tap in the kitchen"
  },
  "context": {
    "contact.email": "[email protected]",
    "contact.name": "Ada Lovelace"
  }
}

Success: HTTP 2xx with a JSON body your agent can surface (for example { "ok": true, "message": "…" }).
Validation style failures: HTTP 422 with a clear error. Other non-2xx use the configured fallback message with the visitor.

Custom request notes

  • URL, headers, and body may include {{field_key}} and {{contact.email}} (and similar).
  • Body templates for POST/PUT/PATCH must render to JSON.
  • GET runs after required fields are collected (no confirmation gate).
  • POST / PUT / PATCH / DELETE always ask the visitor to confirm first.

Security

  • Use HTTPS. Amplixa blocks private / link-local / metadata hosts and does not follow redirects.
  • Treat the stored key like any production secret; rotate it on your side if leaked.

On this page