# 透過 Text Call ID 發送訊息

{% hint style="info" %}

### **reply-from-external 支援範說明**

1. 請注意，**reply-from-external** 僅支援 **訊息管道**，**不支援電話或其他來源**。若需應用於電話相關情境，請另行規劃替代方案。
2. 此 **API 僅適用於已進入「人工客服階段」的交談流程**，即 `text_call` 狀態需為 `status = 1`。 若當前交談尚未被專人接手（即處於待接狀態），將無法成功觸發此端點，請務必確認狀態後再進行呼叫。 \</aside>
   {% endhint %}

此 API 可透過指定的 **Text-Call ID（交談識別碼）** 將訊息發送至系統端。

* **取得交談識別碼的方式**：
  * 透過腳本流程中的變數
  * 透過訊息範本的加密代碼解密
* **應用場景**：
  * 在腳本流程中自動發送指定訊息
  * 與其他系統整合，利用交談識別碼精準定位對話並進行操作
  * 建立自動化應用，例如發送通知、建立提醒或觸發後續流程

這項設計能夠支援更靈活的場景運用，讓交談的自動化與整合能力更強化。

## **API**

```json
curl -X POST "https://{API_HOST}/api/v1/text-call/{text_call}/reply-from-external" \\
  -H "Content-Type: application/json" \\
  -d '{
    "content": "您好，這是您的訊息內容。",
    "is_note": false
}'
```

## **Response**

回傳為 JSON 格式，而 HTTP status 為代碼 204，表示發送成功。

Copy

```
{}
```

## **Http Request**

`POST https://{API_HOST}/api/v1/text-call/{text_call}/reply-from-external`

**URL Parameters**

|            |       |
| ---------- | ----- |
| text\_call | 交談 ID |

**Form Data**

|           |          |   |                 |                                         |
| --------- | -------- | - | --------------- | --------------------------------------- |
| `content` | `String` | ✅ | `"您好，這是您的訊息內容"` | 訊息主體內容。可以是客戶會看到的訊息，或僅供系統內部成員閱讀的筆記。不能為空。 |
| `is_note` | `Number` |   | `0` / `1`       | 表示是否為筆記（客戶不會看到）。- `1` → 備註- `0` → 對客戶可見 |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.firstline.cc/developer/api/jin-jie/tou-guo-text-call-id-fa-song-xun-xi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
