curl --request PUT \
--url https://crm.wachat.net/api/v1/auto-replies/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"keyword": "<string>",
"device_id": "<string>",
"fuzzy_similarity": 50,
"status": true,
"flow_id": 123,
"replies": [
"<string>"
]
}
'import requests
url = "https://crm.wachat.net/api/v1/auto-replies/{id}"
payload = {
"keyword": "<string>",
"device_id": "<string>",
"fuzzy_similarity": 50,
"status": True,
"flow_id": 123,
"replies": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
keyword: '<string>',
device_id: '<string>',
fuzzy_similarity: 50,
status: true,
flow_id: 123,
replies: ['<string>']
})
};
fetch('https://crm.wachat.net/api/v1/auto-replies/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://crm.wachat.net/api/v1/auto-replies/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'keyword' => '<string>',
'device_id' => '<string>',
'fuzzy_similarity' => 50,
'status' => true,
'flow_id' => 123,
'replies' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://crm.wachat.net/api/v1/auto-replies/{id}"
payload := strings.NewReader("{\n \"keyword\": \"<string>\",\n \"device_id\": \"<string>\",\n \"fuzzy_similarity\": 50,\n \"status\": true,\n \"flow_id\": 123,\n \"replies\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://crm.wachat.net/api/v1/auto-replies/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"keyword\": \"<string>\",\n \"device_id\": \"<string>\",\n \"fuzzy_similarity\": 50,\n \"status\": true,\n \"flow_id\": 123,\n \"replies\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://crm.wachat.net/api/v1/auto-replies/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"keyword\": \"<string>\",\n \"device_id\": \"<string>\",\n \"fuzzy_similarity\": 50,\n \"status\": true,\n \"flow_id\": 123,\n \"replies\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
"<unknown>"
],
"meta": "<string>"
}{
"message": "<string>",
"errors": {}
}Update auto-reply
Updates the trigger, response, or status of an auto-reply rule.
curl --request PUT \
--url https://crm.wachat.net/api/v1/auto-replies/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"keyword": "<string>",
"device_id": "<string>",
"fuzzy_similarity": 50,
"status": true,
"flow_id": 123,
"replies": [
"<string>"
]
}
'import requests
url = "https://crm.wachat.net/api/v1/auto-replies/{id}"
payload = {
"keyword": "<string>",
"device_id": "<string>",
"fuzzy_similarity": 50,
"status": True,
"flow_id": 123,
"replies": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
keyword: '<string>',
device_id: '<string>',
fuzzy_similarity: 50,
status: true,
flow_id: 123,
replies: ['<string>']
})
};
fetch('https://crm.wachat.net/api/v1/auto-replies/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://crm.wachat.net/api/v1/auto-replies/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'keyword' => '<string>',
'device_id' => '<string>',
'fuzzy_similarity' => 50,
'status' => true,
'flow_id' => 123,
'replies' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://crm.wachat.net/api/v1/auto-replies/{id}"
payload := strings.NewReader("{\n \"keyword\": \"<string>\",\n \"device_id\": \"<string>\",\n \"fuzzy_similarity\": 50,\n \"status\": true,\n \"flow_id\": 123,\n \"replies\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://crm.wachat.net/api/v1/auto-replies/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"keyword\": \"<string>\",\n \"device_id\": \"<string>\",\n \"fuzzy_similarity\": 50,\n \"status\": true,\n \"flow_id\": 123,\n \"replies\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://crm.wachat.net/api/v1/auto-replies/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"keyword\": \"<string>\",\n \"device_id\": \"<string>\",\n \"fuzzy_similarity\": 50,\n \"status\": true,\n \"flow_id\": 123,\n \"replies\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
"<unknown>"
],
"meta": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Update a keyword auto-reply. Scramble reads these rules to document the
request body. Same shape as StoreAutoReplyRequest โ the underlying
AutoreplyController::update replaces the rule's settings and appends any new
replies[] text variants.
Trigger keyword(s). Comma-separated phrases are allowed. Required.
255Sending device id. Required.
How the inbound message is matched against the keyword. Defaults to exact.
fuzzy, exact, contains Fuzzy match threshold 0-100 (only used when matching_method=fuzzy).
0 <= x <= 100Whether the rule is active. Defaults to true.
Reply kind: "custom" (text variants) or "flow" (a saved flow). Defaults to custom.
custom, flow Flow id to run (required when reply_type=flow).
Scope to the caller's workspace so an auto-reply can't reference
another tenant's flow (was a bare integer with no ownership).
Reply text variants (for reply_type=custom). At least one required for custom.
4096