Skip to content
Back to skills

app2email-agent-handoff

ASecurity

Run an AI agent that answers WhatsApp conversations through app2email and hands them to a person when needed: check the 24 hour reply window, read the conversation, reply free-form or with a template, claim or release conversation ownership (agent, human, paused), write a handoff summary, and react to webhook events. Use when building or operating a WhatsApp support or sales agent on app2email, or when a WhatsApp conversation must go to a human.

  • 0 votes
  • 0 copies
  • 7 views
  • Added November 16, 2026
businessgoreactrailsapi

Works with

  • api
  • mcp

Security analysis

A100/100

Scanned November 16, 2026

npx -y skills add app2email/skills --skill app2email-agent-handoff --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of app2email-agent-handoff?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for app2email-agent-handoff
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/app2email-app2email-agent-handoff/badge)](https://www.skillsdirectory.com/skills/app2email-app2email-agent-handoff)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: app2email-agent-handoff
description: Run an AI agent that answers WhatsApp conversations through app2email and hands them to a person when needed: check the 24 hour reply window, read the conversation, reply free-form or with a template, claim or release conversation ownership (agent, human, paused), write a handoff summary, and react to webhook events. Use when building or operating a WhatsApp support or sales agent on app2email, or when a WhatsApp conversation must go to a human.
license: MIT
metadata:
  author: app2email
  version: "1.1.0"
  source: generated by sdk/skills/make_skills.py from the app2email OpenAPI spec 1.4.0
---

# app2email agent handoff

app2email routes every inbound WhatsApp message to the number's email bridge, webhooks, A2A agent, OpenClaw channel or auto reply, as the owner set up. A conversation has an **owner**: `""` (default routing), `agent` (an automation owns it), `human` (a person owns it: auto reply and agent forwarding stop; the email bridge and dashboard take over), `paused` (nothing automatic is sent). Owners can carry a reason, a summary and a timeout.

## Loop for an answering agent

1. Inbound arrives (webhook `message.received`, the OpenClaw channel, or polling `GET /messages?direction=in`).
2. `GET /conversations/{contact}` (or `/conversations/{contact}/messages`): `window_open`, `window_closes_at`, `owner`, recent history. If `owner` is `human` or `paused`, do not answer.
3. Decide. Inside the window: `POST /messages` with `type` text / image / document / interactive (buttons or a list to ask a structured question). Outside: an approved template, or wait.
4. When the person asks for a human, is angry, asks about money, legal, health, or anything outside your remit: hand over (below) and tell the person someone will take over.
5. Report status through `GET /messages/{id}` or the `message.status` / `message.failed` webhooks.

## Handing over

`PUT /conversations/{contact}/owner` with:

```json
{"owner": "human", "reason": "customer asked for a person", "summary": "Order #1234 arrived damaged; wants a replacement; photo received at 10:12; promised a reply today.", "until_minutes": 480}
```

The summary is what the person reads first: facts, what was promised, what is open, in a few lines. `until_minutes` returns the conversation to default routing later (leave it out to hand over for good). app2email sends the `conversation.owner_changed` webhook event and, when email forwarding is on, the handoff reaches the owner's mailbox so they can reply from there (their reply stays inside the window rules; late replies are held and the contact gets a "Show reply" notice).

To take a conversation back: `"owner": "agent"`; to stop everything automatic for a contact: `"owner": "paused"`; to restore defaults: `"owner": ""`.

## Approvals and caps

A key can have a daily message cap and an approval threshold. A send above the threshold answers `202` with `status: "pending_approval"` and an `approval_url`; the owner approves on the dashboard (or an agent with the right key through `POST /approvals/{id}/approve`). Do not retry a pending send.

## Guardrails (read before any send)

- CANNOT send a free-form message (text, image, video, document, buttons) to a contact whose 24 hour window is closed. `window_open: false` or `422 outside_24h_window` means: send an APPROVED template instead, or stop.
- CANNOT send marketing to a number on the Do Not Call list (the API refuses with `403 recipient_opted_out`) or to a person who has not consented to marketing. Utility messages (order updates, reminders the person asked for) do not need marketing consent.
- CANNOT connect a WhatsApp number or pay for a plan: a person does that. An agent can start an account for a person with the Management MCP server (`create_account`, see app2email-setup); otherwise ask the user for the number and a key.
- CANNOT read messages of other numbers: a key belongs to one number.
- Every send reaches a real person's phone and counts against the customer's monthly plan (outgoing WhatsApp messages and outgoing emails together). Confirm the recipients and the content with the user unless they already told you to send; use `dry_run: true` first for template sends; use an `Idempotency-Key` so a retry never sends twice.
- Never put the API key in a message, a log, a web page or a reply to the user.
- When the person asks for a human, stop automating that contact: hand the conversation over (see the agent handoff skill) and say so.

## Calls

| Call | Does | Scope |
| --- | --- | --- |
| `GET /conversations` | The contacts, most recent activity first | messages:read |
| `GET /conversations/{phone}/messages` | One contact's messages, both directions | messages:read |
| `GET /conversations/{contact}` | One contact: window state, last messages, owner | messages:read |
| `PUT /conversations/{contact}/owner` | Hand a contact over: human, agent, paused, or back to normal | messages:send |
| `GET /approvals` | Sends held for approval | messages:read |
| `POST /approvals/{id}/approve` | Approve a held send: it is sent now | messages:send |
| `POST /approvals/{id}/reject` | Reject a held send: nothing is sent | messages:send |

Contacts (names, tags, custom fields, consent evidence):

| Call | Does | Scope |
| --- | --- | --- |
| `GET /contacts` | Your contacts, newest first | messages:read |
| `POST /contacts` | Make or update contacts (one, or a list of up to 1000) | contacts:manage |
| `POST /contacts/import` | Import contacts from CSV or JSON (up to 5000 rows) | contacts:manage |
| `GET /contacts/export.csv` | All contacts as CSV | messages:read |
| `GET /contacts/{identity}` | One contact | messages:read |
| `PATCH /contacts/{identity}` | Change a contact | contacts:manage |
| `DELETE /contacts/{identity}` | Delete a contact record | contacts:manage |
| `POST /contacts/{identity}/consent` | Record consent (or its withdrawal) with evidence | contacts:manage |
| `GET /segments` | Your segments (saved contact filters) | messages:read |
| `POST /segments` | Save a contact filter as a segment | contacts:manage |
| `GET /segments/{id}` | One segment, with how many contacts match now | messages:read |
| `PUT /segments/{id}` | Rename a segment or replace its filter | contacts:manage |
| `DELETE /segments/{id}` | Delete a segment (its contacts stay) | contacts:manage |
| `GET /segments/{id}/contacts` | The contacts a segment matches now | messages:read |

Webhook events: [app2email-whatsapp/references/webhooks.md](../app2email-whatsapp/references/webhooks.md).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in business →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.