Skip to content

WhatsApp API updateFlow

Jcateye edited this page Apr 15, 2024 · 3 revisions

更新流

创建流程后,您可以使用更新请求更新名称或类别。

  • URL:/v1/wa/m/flows/updateFlow
  • Method:POST
  • Content-Type:application/json
  • 需要鉴权:

鉴权机制

鉴权规则请参考地址:API接口调用约定

请求参数

header参数:

参数名 类型 必选 示例值 说明
accessKey String fmexxx3ki 用户身份标识
ts String 1655710885431 当前请求的时间戳(单位是毫秒),牛信服务端允许用户端请求最大时间误差为60秒
bizType String 2 WhatsApp业务类型,取固定值“2”
action String updateFlow WhatsApp业务操作,取固定值“updateFlow”
sign String 6e95xxx826 API入参参数签名,签名算法

body参数:

参数名 类型 必选 示例值 说明
appkey String 牛信云WhatsApp应用的appkey
flow_id String 2357068888014486 流ID
messaging_product String whatsapp 发送消息的通道,应用于WhatsApp消息的发送时,值必须为“whatsapp”
name String 新的流的名称 流名称
categories Array[String] ["SIGN_UP"] 流类别列表。可以有多个值,但至少需要一个。值列表:SIGN_UP,SIGN_IN,APPOINTMENT_BOOKING,LEAD_GENERATION,CONTACT_US,CUSTOMER_SUPPORT,SURVEY,OTHER
endpoint_uri String https://www.xxx.com/endpoint WA流端点的URL,由用户自定义

请求示例

  • 普通文本模板 body(application/json) 参数:
{
    "appkey": "8eoxxxos",
    "messaging_product": "whatsapp",
    "business_phone": "86185xxx99",
    "name": "这是流的名称",
    "categories": ["SIGN_UP"]
}

响应参数

参数名 类型 说明
code Integer 结果编码
data JsonObject 请求结果
message String 请求结果说明

响应示例

成功示例

{
  "code": 0,
  "message": "Success",
  "data": {
    "success": true
  }
}

失败示例

{
  "code": 400,
  "message": "updateFlow error",
  "data": {
    "error": {
      "message": "Invalid parameter",
      "type": "OAuthException",
      "code": 100.0,
      "error_subcode": 4233023.0,
      "is_transient": false,
      "error_user_title": "No properties to update",
      "error_user_msg": "No properties to update has been provided in request. Please specify at least one property which needs to be updated.",
      "fbtrace_id": "APlUGV_FEBTyQebtgeZqVvw"
    }
  }
}

响应码说明

code message 解决办法
0 请求成功
400 请求失败 请联系技术人员排除问题

简介

短信

语音

云呼叫中心(NXLink)

云呼叫中心(AI自动外呼)

Flash Call

短链

邮件验证码

DID号码

通用

号码检测

WhatsApp

Viber

Zalo ZNS

Super Message API

隐私号(旧)

PNS

坐席(旧版)

AI Agent

Clone this wiki locally