跳转到主要内容
PATCH
Update template by id

请求规范

  • 方法与路径: PATCH /apis/v1/social/messaging/whatsapp/templates/id/{templateId}
  • 可用状态: enabled
  • 请求 URL 模板: https://api.aisa.one/apis/v1/social/messaging/whatsapp/templates/id/{templateId}
  • templateId: path; 必填
  • connectionId: query; 必填
完整 OpenAPI 定义 有效请求声明(包括认证和引用的 schema):

费用与请求规则

此操作不另收费。

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

路径参数

templateId
string
必填

Meta template id (numeric).

查询参数

connectionId
string
必填

Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.

Pattern: ^msc_[0-9A-Za-z]+$

请求体

application/json
components
object[]

Updated template components. Optional when only message_send_ttl_seconds changes; at least one of the two is required.

Minimum array length: 1
connectionId
string

The connection, when not sent as the connectionId query parameter.

Pattern: ^msc_[0-9A-Za-z]+$
message_send_ttl_seconds
integer

Delivery validity window in seconds: a message not delivered within it is dropped.

Range by category:

  • AUTHENTICATION: 30 to 900. - UTILITY: 30 to 43200 (12h). - MARKETING: 43200 to 2592000 (30 days).

The value -1 is not accepted here (Meta treats it as an empty edit); send a value in range. Meta defaults to 600 for AUTHENTICATION and 30 days otherwise.

A TTL-only edit keeps an APPROVED template approved, with no re-review. If Meta later recategorises the template, it clears the TTL (read it back to check).

响应

Success

success
boolean
template
object