Enok
Tools

Webhooks

Webhook refers to a saved configuration of an API request that has everything that’s required for that request to be made, such as method, URL, headers, parameters, payload, and secrets, and activates whenever associated with a particular tool that can be invoked by an agent.

The fact that a webhook has the ability to both send data and receive a response means that it can be used by an agent to perform actions such as checking availability, creating a case in a support system, or updating information in a CRM among others.

What you can do

  • Connect to any external API and trigger it in real time from within an agent conversation.
  • Select the HTTP method for each request: GET, POST, PUT, PATCH, or DELETE.
  • Configure Headers, Query Params, Path Params, and a Body to control the full request structure.
  • Mark field values as Dynamic (filled from the conversation at runtime), Static (fixed), or Secret (resolved at call time from stored credentials).
  • Set a Data type for every field, String, Number, Integer or Boolean, so the receiving service receives correctly typed data.
  • Define Dynamic Params that agents extract from conversations: names, dates, IDs, or any contextual value.
  • Store API keys and credentials as Secrets, then reference them across multiple webhooks without exposing them in configuration.
  • Set a Timeout to prevent slow endpoints from stalling a conversation.
  • Link webhooks to tools and unlink them when they are no longer needed.

How it works

A webhook on its own is just a saved recipe for an API call. It becomes useful when it's linked to a tool that your agent can use during a conversation. Here's what happens:

  1. You describe the call once: Enok stores the method, URL, timeout, and every field, along with how each value is supplied (Dynamic, Static, or Secret).
  2. The agent decides when to call it: During a live conversation, the agent matches the situation against the webhook's name and description and triggers it at the appropriate moment.
  3. Dynamic values are filled from the conversation: For fields marked Dynamic, the agent extracts the value from what the user just said. If a required dynamic value is missing, the request is held rather than sent incomplete.
  4. Secrets are resolved at call time: For fields marked Secret, Enok retrieves the stored credential at the exact moment of the request and inserts it. The credential is never exposed in configuration or to the agent.
  5. Data is typed before sending: Each field is converted to the specified data type before dispatch, ensuring the endpoint receives clean, correctly formatted input.
  6. The request is sent within the timeout window: If the endpoint does not respond in time, the call is dropped and the agent is informed, allowing it to handle the situation gracefully.
  7. The response re-enters the conversation: A successful response is made available to the agent, which can use it to answer the user or continue to the next step.

Because all the changing details are filled in at the moment of each call, one webhook works for every conversation. You never need a separate copy per customer.

Create a webhook

When you open Webhooks for the first time you'll see No webhooks created yet with a short note about extending your agent's capabilities. Start from there or from the + action in the header.

  1. Select Create Webhook (or the + button in the top right).
  2. Enter a Name that identifies this connection clearly.
  3. Add a Description explaining what the webhook does and when it should trigger. The agent reads this to decide when to invoke the call, precision here directly affects reliability.
  4. Select the HTTP Method: GET, POST, PUT, PATCH, or DELETE.
  5. Enter the endpoint URL.
  6. Adjust the Timeout slider. The default is 10 seconds; increase this for endpoints with longer processing times.
  7. Select Create to save the workbook.

The Body section only appears for methods that send data (everything except GET), so you'll see it once you choose POST, PUT, PATCH, or DELETE.

Shape the request

Below the basics, you can fine-tune exactly what each request carries. Every section has an add control so you can build up key-value pairs one at a time.

  • Headers. Set the headers required for authentication, content type, or provider-specific directives.
  • Query Params. Key-value pairs appended to the URL. Used for filtering, pagination, or option flags.
  • Path Params. Variables embedded directly in the URL path to target a specific resource, a user ID, order number, or similar. These are substituted into the URL in the order they are added.
  • Body. The main data payload for requests that write or update data.
  • Dynamic Params. Values the agent extracts from the conversation and injects into the request at runtime.

For each header, query param, path param, or body field you can set how its value is supplied:

  1. Add a field, then give it a Name.
  2. Choose a Data type: String, Number, Integer, or Boolean. Enok converts the value to this type before sending it.
  3. Choose a Value type:
  • Dynamic - the value is supplied at runtime, extracted by your agent from the conversation.
  • Static - you type a fixed value yourself, and it's sent the same way every time.
  • Secret - you select a stored secret so the real value stays hidden and is only pulled in at the moment of the call.

Name your Dynamic fields the same way you'd describe them to a person, like order_number or customer_email. Clear names make it easier for your agent to match what the customer says to the right field.

Store an API or webhook secret

Secrets keep your API keys and credentials out of plain sight. Once saved, you can reuse them anywhere a value type is set to Secret. You'll find these under API & Webhook Secrets.

  1. Open API & Webhook Secrets. If nothing is there yet, you'll see No webhooks secrets added yet.
  2. Select the option to add a secret.
  3. Enter a Name for the secret.
  4. Enter the Value you want to keep secure.
  5. Save the secret. It's now available to select wherever a field uses the Secret value type.

When a webhook runs, Enok retrieves the secret's real value only at the moment the request is sent. The credential is never stored inside the webhook itself or shown back to you after saving, so your keys stay protected even as you reuse them across many connections.

Give secrets clear, descriptive names like Stripe API Key or CRM Token. When you're building a webhook and pick a Secret value, a well-named list makes it obvious which credential to choose.

Manage and delete webhooks

Your webhooks appear in a list showing each one's Name, URL, Methods, and Created at date, with an Action menu for each row. Use the search box at the top to filter when the list grows.

Editing a webhook updates the saved connection in place. Any tool already pointing at it picks up your changes automatically, so you rarely need to rebuild a webhook from scratch.

To remove a webhook, open its action menu and choose delete. If the webhook is still connected to tools, Enok protects your live setup:

This webhook is currently in use. To prevent breaking active tools, you must unlink it from the connected tools listed below before deleting.

Select Unlink Tool for each connected tool listed, then delete the webhook once nothing depends on it.

The guard against deleting a connected webhook exists so an agent never tries to call a connection that's been removed mid-conversation. Unlinking first keeps your active tools working right up until you delete.

Tips

Use Dynamic Params for anything that changes per conversation, like a caller's name or an order number. Your agent fills these in on the fly, so a single webhook works for every interaction instead of one per customer.

Write the Description as if you're briefing the agent. A precise description ("Look up the status of an existing order by its order number") helps your agent trigger the webhook at exactly the right moment and gather the right details first.

Keep your Timeout realistic for the endpoint you're calling. A fast lookup is fine at the 10-second default, but a heavier action may need more headroom. If an endpoint times out, the call is dropped and your agent is told it didn't go through.

If you save a new webhook or secret and don't see it immediately, give the list a moment. Enok refreshes your webhooks regularly, and you can also re-run the search to confirm everything's in place.

Webhooks | Stratforge Docs