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

# Post-Call Follow-Up

> Automatically trigger emails, SMS, or webhooks after a voice call ends — confirmations, summaries, and CRM updates.

# Post-Call Follow-Up

The **Post-Call Follow-Up** tool triggers automated actions after a call ends. Send the caller a summary email, a confirmation SMS, update your CRM, or notify your team — all without manual work.

## Actions You Can Trigger

| Action          | Description                                                                 |
| --------------- | --------------------------------------------------------------------------- |
| **Send email**  | Email a call summary, confirmation, or follow-up to the caller or your team |
| **Send SMS**    | Text the caller with next steps, confirmation details, or a link            |
| **Webhook**     | POST call data to any external URL (CRM, helpdesk, analytics)               |
| **Create task** | Automatically create a follow-up task in your project management tool       |

## Configuration

### Via the Dashboard

1. Open your agent and scroll to **Voice Settings**.
2. Enable **Post-Call Follow-Up**.
3. Add one or more actions:

**Email action:**

* To: caller's email (collected during call) or a fixed address
* Subject template: `Your call with {agent_name} — Summary`
* Body template: Include call summary, next steps, and links

**SMS action:**

* To: caller's phone number
* Message template: `Thanks for calling! Here's your confirmation: {details}`

**Webhook action:**

* URL: your endpoint
* Payload: call transcript, summary, metadata

4. Click **Save**.

### Via the API

```bash theme={null}
curl -X PATCH https://api.thinnest.ai/agents/agent_abc123 \
  -H "Authorization: Bearer $THINNESTAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "voice_tools": {
      "post_call_follow_up": {
        "enabled": true,
        "actions": [
          {
            "type": "sms",
            "template": "Thanks for calling {agent_name}! Your reference number is {call_id}."
          },
          {
            "type": "webhook",
            "url": "https://your-crm.com/api/call-completed",
            "include_transcript": true,
            "include_recording_url": true
          },
          {
            "type": "email",
            "to": "{caller_email}",
            "subject": "Your call summary — {date}",
            "body_template": "call_summary"
          }
        ]
      }
    }
  }'
```

## Webhook Payload

When a call ends, your webhook receives:

```json theme={null}
{
  "event": "post_call_follow_up",
  "call_id": "call_xyz789",
  "agent_id": "agent_abc123",
  "caller_number": "+14155551234",
  "duration_seconds": 230,
  "summary": "Caller inquired about order #12345. Agent confirmed delivery date of March 15.",
  "transcript": "...",
  "recording_url": "https://api.thinnest.ai/calls/call_xyz789/recording",
  "metadata": {
    "order_id": "12345",
    "caller_name": "John Smith",
    "caller_email": "john@example.com"
  }
}
```

## Template Variables

Use these variables in your email and SMS templates:

| Variable        | Description                         |
| --------------- | ----------------------------------- |
| `agent_name`    | Your agent's name                   |
| `call_id`       | Unique call identifier              |
| `caller_number` | Caller's phone number               |
| `caller_name`   | Caller's name (if collected)        |
| `caller_email`  | Caller's email (if collected)       |
| `duration`      | Call duration in minutes            |
| `summary`       | AI-generated call summary           |
| `date`          | Date of the call                    |
| `details`       | Key details extracted from the call |

Variables are wrapped in double curly braces in your templates, e.g. `agent_name` becomes `&#123;&#123;agent_name&#125;&#125;`.
