# Using a Webhook Integration To call an Agent in AI Agent Foundry, you need to call the Webhook API endpoint from your system. ## Set up a Webhook Integration Set up a Webhook Integration following [Creating a Webhook Integration](/products/customer-data-platform/ai-agent-foundry/integration/creating-an-integration#webhook). To use a Webhook Integration, you must get an Authentication Token and URL. 1. Navigate to the Webhook panel in the Integration tab. ![](/assets/webhook-step1.7e03d27d29c808378af6ad151e5f1568ac33c560d200faf2b1050f42efce0c35.91c26685.png) 1. Click "eye" icon to see the Authentication Token and copy the text starting with "Basic". ![](/assets/webhook-step2.0dd069bf00adfc64f9caad3ad6fb8c01b489c5fb3a08b5575ea9d8b0a6cb328a.91c26685.png) 1. Click "copy clipboard" icon in the "Text Generation URL" to copy the URL. The Text Generation URL is issued for each user prompt set up in the Webhook integration ## Call Webhook URL The client application must call the URL by POST with the parameters you defined in the User prompt. You can get the result object if you specify the “application/json” content type. Following code is an example code to call by CURL. ```bash sample.sh curl -X POST {Text Generation URL} \ -H "Authorization: {Authentication Token}" \ -H "Content-Type: application/json" \ -d '{"text": "Please display the percentage of the total number of accounts that have a cjo contract."}' ``` This example assumes the User Prompt contains "text" as a parameter in the "User side prompt text" field. ![](/assets/webhook-step3.fa558e5fe814cce00eb4f0c9b952ee682670d74a31b40e92d146acf3f4459fbc.91c26685.png)