
POST requests at the Cognigy.AI Endpoint URL, processes them with the assigned Flow, and sends results asynchronously to your webhook URL.
If you use Agent Copilot for voice with the Webhook Endpoint, you can switch to a specific Voice Copilot Endpoint. This Endpoint includes all webhook logic, so you don’t need to use a Code Node.
Prerequisites
- To receive
POSTrequests from Cognigy.AI at your webhook URL, run a web server on your side. - (Optional) Set up basic authentication for your web server.
Restrictions
- Snapshots and Packages don’t support API keys generated in this Endpoint. If you export a Webhook Endpoint that includes an API key, generate a new API key in the target Project. Then update your code to include the new API key.
Generic Endpoint Settings
Learn about the generic Endpoint settings on the following pages:- Endpoints Overview
- NLU Connectors
- Data Protection & Analytics
- Real-Time Translation Settings
- Handover Settings
- Inject and Notify
- Copilot
Specific Endpoint Settings
API Key Authentication
API Key Authentication
Use this section to validate incoming requests to this Endpoint using an API key that callers must include in the
X-Webhook-Key header.| Parameter | Type | Description |
|---|---|---|
| Authentication Method | List | Sets an authentication step for requests sent to this Endpoint. Select one of the options:
|
| Generate API Key | Button | This button appears in the Endpoint API Keys section when you select API Key in Authentication Method. Opens a dialog to generate an Endpoint-specific API key. You can generate multiple Endpoint-specific API keys. |
Basic Auth Credentials
Basic Auth Credentials
Use this section to provide the webhook URL and, optionally, credentials Cognigy.AI uses to authenticate outgoing requests to the webhook URL.
| Parameter | Type | Description |
|---|---|---|
| User | Text | This parameter is optional. Sets the username to authenticate against when sending requests to the webhook URL. |
| Password | Text | This parameter is optional. Sets the password to authenticate against when sending requests to the webhook URL. |
| Webhook | Text | Sets the webhook URL to send requests to. |
How to Set Up
Setup on the Cognigy.AI Side
1. Create a Webhook Endpoint
1. Create a Webhook Endpoint
- In the left-side menu of your Project, go to Deploy > Endpoints, and click + New Endpoint.
- In the New Endpoint section, do the following:
- Select the Webhook Endpoint type.
- Specify a unique name.
- Select a Flow from the list.
- (Optional) In the API Key Authentication section, select API Key from the Authentication Method list. The Endpoint API Keys section appears.
- (Optional) In the Endpoint API Keys section, follow these steps:
- Click + Generate API Key.
- (Optional) In the dialog box, enter a unique name for your API key and click Generate API Key.
- (Optional) Click the Key field to copy the generated API key. Make sure you save the API key because it will no longer be visible.
- In the Basic Auth Credentials section, enter the external webhook URL in the Webhook field. This URL is where Cognigy.AI will send output data.
- (Optional) If your webhook uses basic authentication, fill in the User and Password fields.
- Save changes and go to the Configuration Information section. For sending
POSTrequests to the Cognigy.AI Webhook Endpoint, copy the URL from the Endpoint URL field.
Setup on the Third-Party Provider Side
1. Send a Request
1. Send a Request
Send a
POST request to the Cognigy.AI Webhook Endpoint. Your web server must accept POST requests and process the JSON payload sent by Cognigy.AI. For testing purposes, you can use webhook.site as a temporary web server.No Authentication
No Authentication
- cURL
- Postman
Replace
https://<your-endpoint-url> with the Endpoint URL from your Endpoint settings.With API Key Authentication
With API Key Authentication
- cURL
- Postman
Replace
https://<your-endpoint-url> with the Endpoint URL and <your-api-key> with an active API key from your Endpoint’s settings.2. Get a Response
2. Get a Response
The Webhook Endpoint sends the following JSON response to your external system. This response contains information about the user, session, and the AI Agent output:
| Parameter | Type | Description |
|---|---|---|
userId | String | The ID of the user who sent the original request. |
sessionId | String | The session ID used to track the conversation context. |
AIOutput.text | String | The response message generated by the AI Agent. |
AIOutput.data | Object | The message data returned from the Flow. |
AIOutput.traceId | String | The ID used for tracing and debugging purposes. |
AIOutput.source | String | The message source. Always "bot" for AI Agent replies. |
disableSensitiveLogging | Boolean | The flag indicating if logging is disabled. If the value is true, this interaction won’t be logged for privacy or compliance reasons. |
1: You must provide at least one of
text or data. You can send either, or both. If both are missing or invalid, the REST Endpoint throws an error.