Skip to main content
Event webhooks send an HTTP POST request when selected AI Puffer events happen. Use them when another system needs to receive form submissions, chatbot activity, generated content, image outputs, automation results, or knowledge base indexing results.

Setup

Enable webhooks, add endpoints, and choose events.

Events

See the event names and when they fire.

Payload

Read the request headers and JSON body format.

Signatures

Verify requests with the signing secret.

Delivery

Understand success responses, retries, and failed deliveries.

Troubleshooting

Fix missing requests, signature errors, and timeouts.

Setup

In WordPress admin, go to AI Puffer > Settings > Developers. To enable event webhooks:
  1. Turn on Event Webhooks.
  2. Enter a Signing Secret if your receiver will verify requests.
  3. Click Add Endpoint.
  4. Enter a name and endpoint URL.
  5. Turn on the endpoint.
  6. Select the events this endpoint should receive.
Settings save automatically after you change them.
Developer Settings with Event Webhooks enabled
Webhook endpoint with subscribed events
The endpoint URL must be reachable from your WordPress server. For production, use an HTTPS URL.
An endpoint receives an event only when all of these are true:

Events

Endpoint subscriptions for chatbot feedback are normalized to chatbot.fb_submitted.

Payload

AI Puffer sends JSON to each subscribed endpoint.

Headers

Envelope

Every event uses the same outer envelope. Event-specific fields are inside data.
resource and meta are included when the event provides them.

Event Data

Use type or X-AIPKit-Event to decide which fields to read from data.
chatbot.session_started and chatbot.user_message_submitted include bot, conversation, actor, message, and AI model details.chatbot.response_generated includes data.response.text. chatbot.fb_submitted includes data.feedback.chatbot.form_submitted is sent when a visitor submits a form displayed by a chatbot rule’s Display form action.
content.generated can come from Content Writer, streaming, or an automation task.
task.item_completed is sent when an automation queue item completes.
form.submitted is sent after an AI Form returns a response.
image.generated is sent after image, image edit, or video generation returns output.
kb.source_indexed is sent after a Knowledge Base source is indexed successfully.

Signatures

If a signing secret is set, AI Puffer signs the raw JSON body. Signature base string:
Signature algorithm:
Header format:
Verify the raw request body exactly as received. Do not parse JSON and then stringify it again before checking the signature.
Node example:

Delivery

Return any 2xx status code to mark the delivery as successful.
AI Puffer treats network errors and non-2xx responses as failed deliveries. Retryable failures include network errors, 408, 409, 425, 429, and 5xx responses. Default delivery behavior: AI Puffer queues latency-sensitive frontend events so slow endpoints do not slow down the visitor request. This includes chatbot events, form.submitted, content.generated, and image.generated when they are not manual or admin-originated. Some admin and manual events can be delivered synchronously.
Webhook receivers should be idempotent. Store X-AIPKit-Idempotency-Key or X-AIPKit-Event-Id and ignore duplicates that were already processed.

Delivery Issues

Failed queued webhook deliveries appear in AI Puffer > Settings > Developers. The panel shows the five most recent failed webhook jobs. Use Retry to run the delivery again, or Clear to remove it from the list.
Webhook Delivery Issues panel with Retry and Clear actions

Test an Endpoint

Use a temporary endpoint during setup.
  1. Create a test URL in RequestBin, webhook.site, or a local tunnel.
  2. Add the URL as an AI Puffer webhook endpoint.
  3. Subscribe it to one event, such as form.submitted.
  4. Trigger that event in WordPress.
  5. Check the received headers and JSON body.
  6. Replace the test URL with your production URL.

Troubleshooting

Check these first:
  1. Event Webhooks is enabled.
  2. The endpoint is enabled.
  3. The endpoint URL is correct and reachable from the WordPress server.
  4. The endpoint is subscribed to the event you triggered.
  5. Your server or firewall is not blocking outbound HTTP requests.
Each endpoint has its own event subscriptions. Edit the endpoint and confirm every expected event is selected.
Verify against the raw request body and X-AIPKit-Timestamp.Common causes:
  • The receiver parses and re-stringifies JSON before verification.
  • The wrong signing secret is used.
  • The receiver includes a different timestamp in the base string.
  • The receiver strips or changes the raw body before verification.
Return a quick 2xx response first, then do longer work in your own queue. AI Puffer waits up to 5 seconds for the endpoint response by default.
Retries can send the same event again. Deduplicate with X-AIPKit-Idempotency-Key or X-AIPKit-Event-Id.
Open AI Puffer > Settings > Developers. Use Retry if the endpoint is fixed. Use Clear if you no longer need that failed job.

WordPress Hooks

Use these hooks for custom integrations.