Skip to main content

Availability

For how webhooks work, refer to Webhooks. Add a target in the admin console, then approve it so that AI Studio starts to send events to it.

Prerequisites

  • TYK_AI_SECRET_KEY is set. Refer to Configuration.
  • Your role has the write and execute permissions on the webhooks resource.

Create and Approve a Target

  1. In the admin console, go to Governance > Webhooks.
  2. Select New target.
  3. Enter a name, the URL, the topic filters, and the payload template. You can also add custom headers.
  4. Optional: in Signing secret (optional), enter your own secret of 16 to 256 characters. If you leave it empty, AI Studio makes a random secret.
  5. Select Create (pending approval). The new target stays pending until an administrator approves it.
  6. Copy the secret from the Signing secret dialog and keep it in your receiver. The console shows the secret one time only. Then select I have saved it.
  7. To approve the target, open the menu of the target and select Approve. Confirm with Approve. If WEBHOOKS_REQUIRE_DIFFERENT_APPROVER is true, a different administrator does this step.
  8. To check the target, open the menu of the target and select Send test event. AI Studio sends a sample event with the topic webhooks.test.
New webhook target dialog with a URL and two topic filters To check the signature of each delivery in your receiver, refer to Verify a Webhook Delivery.