> For the complete documentation index, see [llms.txt](https://helpdocs.ycloud.com/partner-center/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helpdocs.ycloud.com/partner-center/technology-development-partnern/mu-ban-tong-bu.md).

# 模板同步

## 一、接口信息

### 1. 请求方式：

```hurl
curl -X POST 'https://api.ycloud.com/v2/whatsapp/templates/{wabaId}/sync' \
-H 'X-API-Key: {{YOUR-API-KEY}}'
```

### 2. 请求参数：

#### 路径参数

| 参数名    | 类型     | 必填 | 说明                           |
| ------ | ------ | -- | ---------------------------- |
| wabaId | String | 是  | WhatsApp Business Account ID |

#### 请求头参数

| 参数名       | 类型     | 必填 | 说明                         |
| --------- | ------ | -- | -------------------------- |
| X-API-KEY | String | 是  | Your YCloud accout API key |

### 3. **响应参数**

#### 成功响应（200 OK）

```json
{
  "wabaId": "string",
  "message": "string"
}
```

参数信息：

| 字段名     | 类型     | 说明                           |
| ------- | ------ | ---------------------------- |
| wabaId  | String | WhatsApp Business Account ID |
| message | String | 同步状态说明信息                     |

响应示例：

```json
{
  "wabaId": "123456789012345",
  "message": "Template sync has been triggered. It may take a few minutes to complete. If templates were recently migrated to this WABA on Meta, the system will automatically retry for up to 30 minutes."
}
```

## 二、接口说明：

### 1. 权限验证

* 本接口仅限技术开发伙伴使用
* 仅限已绑定至YCloud的WABA使用

### 2. 频率限制

此接口有双层频率限制，即WABA级别限制与租户级别限制

#### WABA 限制

* 时间窗口：10 分钟
* 限制规则：每个WABA在时间窗口内只能触发一次同步请求
* 错误提示："Template sync for this WABA was recently triggered. Please try again later."

#### 租户限制

* 时间窗口：1 小时
* 最大请求数：20次
* 规则限制：每个租户在时间窗口内最多可发起20次同步请求
* 错误提示："Too many template sync requests from the tenant. Please try again later."

### 3. 自动重试

在Meta 平台返回空模板列表时，系统会自动重试：

* 最大重试次数：3次
* 重试间隔：5分钟 -> 10分钟 -> 15分钟
* 总重试时长：30分钟

### 4. 错误码

| 403 | FORBIDDEN           | 仅 TP 合作伙伴可使用此 API   |
| --- | ------------------- | ------------------- |
| 403 | FORBIDDEN           | WABA 未绑定到 YCloud 账户 |
| 429 | TOO\_MANY\_REQUESTS | 超过 WABA 级别频率限制      |
| 429 | TOO\_MANY\_REQUESTS | 超过租户级别频率限制          |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://helpdocs.ycloud.com/partner-center/technology-development-partnern/mu-ban-tong-bu.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
