> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clerk.chat/llms.txt
> Use this file to discover all available pages before exploring further.

# Connecting External Platforms

> Trigger Clerk Chat AI Agents from external systems using Agent Webhooks

## Overview

**Agent Webhooks** let external platforms — marketing automation tools, CRMs, internal services, and more — trigger a Clerk Chat AI Agent by sending an HTTP `POST` request. When a webhook is received, the agent runs with the payload you send, so you can kick off personalized SMS, RCS, WhatsApp, or voice flows from events in your other systems.

Each agent webhook has a unique URL. You authenticate requests with your team's API key, not a secret embedded in the URL.

<Note>
  This page covers **inbound** Agent Webhooks (external platform → Clerk Chat agent). For **outbound** event webhooks where Clerk Chat notifies your app about messages and RCS events, see [Webhooks](/integrations/webhooks).
</Note>

## When to use Agent Webhooks

Use Agent Webhooks when you want an external event to start or continue an agent conversation — for example:

* A user enters a marketing journey step and you want the agent to send a follow-up message
* A CRM status change should trigger a personalized outreach
* An internal system needs to hand off a contact to an AI agent with context in the payload

If you only need to receive message delivery or inbound message events in your own app, use [outbound Webhooks](/integrations/webhooks) instead.

## How it works

```mermaid theme={null}
sequenceDiagram
    participant Platform as ExternalPlatform
    participant API as ClerkChatAPI
    participant Agent as AIAgent

    Platform->>API: POST /public/pipelines/webhook/{webhookId}
    Note over Platform,API: apiKey header + JSON body
    API->>API: Find or create contact from phone
    API->>Agent: Run agent with webhookBody payload
    Agent->>Agent: Use webhookBody fields in nodes
```

1. You add a **Webhook** trigger to an agent and copy its URL from the agent builder.
2. Your external platform sends a `POST` to that URL with your team API key and a JSON body.
3. Clerk Chat optionally associates the request with a contact (via `phone`), then runs the agent.
4. The full request body is available inside the agent as `webhookBody`, so downstream nodes can reference any field you sent.

## Prerequisites

* A Clerk Chat account with AI Agents enabled
* An agent connected to an inbox (required for the agent to send messages)
* A team API key from **Settings → API**

## Next steps

<CardGroup cols={2}>
  <Card title="Trigger an Agent with a Webhook" icon="bolt" href="/integrations/agent-webhooks/webhook-trigger">
    Generic setup guide — configure the trigger, send requests, and use payload fields in your agent.
  </Card>

  <Card title="Connect Iterable" icon="link" href="/integrations/agent-webhooks/iterable">
    Step-by-step guide for triggering agents from Iterable Journey or System webhooks.
  </Card>
</CardGroup>
