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

# Threads and quoted replies

> Send native quoted replies and read authorized chronological WhatsApp quote chains

Paths are relative to `https://inkbox.ai/api/v1/whatsapp`. Use your authorized agent's `agent_identity_id` query parameter where required.

## Quote a message

Send to an existing `conversation_id` and supply the exact `reply_to_message_id`. The quoted message must be visible in that same conversation. The API does not accept a caller-supplied quote snapshot or silently fall back to a plain message.

```python Python theme={null}
message = identity.send_whatsapp(
    conversation_id=conversation.id,
    reply_to_message_id=incoming.id,
    text="I will review this milestone.",
    idempotency_key="milestone-quoted-reply",
)
```

```typescript TypeScript theme={null}
const message = await identity.sendWhatsApp({
  conversationId: conversation.id,
  replyToMessageId: incoming.id,
  text: "I will review this milestone.",
  idempotencyKey: "milestone-quoted-reply",
});
```

```bash CLI theme={null}
inkbox whatsapp send --identity my-agent \
  --conversation-id 22222222-2222-4222-8222-222222222222 \
  --reply-to-message-id 33333333-3333-4333-8333-333333333333 \
  --text "I will review this milestone." --idempotency-key milestone-quoted-reply
```

## Read a quote chain

```text theme={null}
GET /messages/{message_id}/thread
GET /conversations/{conversation_id}/threads/{thread_id}
```

Both routes accept `limit` (1–200, default 50) and an optional opaque `cursor`. Both return exactly these envelope keys:

```json theme={null}
{
  "conversation_id": "22222222-2222-4222-8222-222222222222",
  "thread_id": "44444444-4444-4444-8444-444444444444",
  "thread_root_message_id": "33333333-3333-4333-8333-333333333333",
  "messages": [],
  "next_cursor": null
}
```

Messages are chronological and permission-filtered. Do not infer hidden parent content from a missing message. Keep the same route, identity, and limit when following `next_cursor`; null means the visible chain has no next page.

Python exposes `identity.get_whatsapp_thread(message_id, limit=50, cursor=None)` and `identity.get_whatsapp_conversation_thread(conversation_id, thread_id, limit=50, cursor=None)`. TypeScript exposes `getWhatsAppThread(messageId, options)` and `getWhatsAppConversationThread(conversationId, threadId, options)`. The CLI commands are `whatsapp thread <message-id>` and `whatsapp conversation-thread <conversation-id> <thread-id>` with `--identity`, `--limit`, and `--cursor`.

`plain_reply_fallback=false` explicitly requires a native quote. The option defaults
to `true`, but all currently supported WhatsApp targets support native quotes, so
no current target uses a plain fallback. Missing quote evidence or an uncertain
send is never permission to send another, unquoted message. See the
[send contract](https://inkbox.ai/docs/api/whatsapp/messages.md#quoted-reply-fallback-policy).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.