curl --request PATCH \
--url https://api.wppfy.com/quick-replies/{id} \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"shortCut": "endereco-centro"
}
'import requests
url = "https://api.wppfy.com/quick-replies/{id}"
payload = { "shortCut": "endereco-centro" }
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({shortCut: 'endereco-centro'})
};
fetch('https://api.wppfy.com/quick-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://api.wppfy.com/quick-replies/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'shortCut' => 'endereco-centro'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <api-key>"
],
]);
$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://api.wppfy.com/quick-replies/{id}"
payload := strings.NewReader("{\n \"shortCut\": \"endereco-centro\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("token", "<api-key>")
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.patch("https://api.wppfy.com/quick-replies/{id}")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"shortCut\": \"endereco-centro\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/quick-replies/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"shortCut\": \"endereco-centro\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"shortCut": "<string>",
"aiDescription": "<string>",
"onWhatsApp": true,
"message": {
"kind": "location",
"name": "Loja Centro",
"address": "Av. Paulista, 1000",
"latitude": -23.5614,
"longitude": -46.6559
},
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": "temperature must be between 0 and 2",
"code": "validation_failed"
}{
"code": 401,
"message": "Invalid token.",
"data": {}
}{
"error": "temperature must be between 0 and 2",
"code": "validation_failed"
}{
"error": "temperature must be between 0 and 2",
"code": "validation_failed"
}{
"error": "temperature must be between 0 and 2",
"code": "validation_failed"
}{
"error": "temperature must be between 0 and 2",
"code": "validation_failed"
}Editar resposta rápida
Altera só os campos enviados. message substitui a mensagem inteira; trocar ou remover um arquivo apaga o anterior. Se outra edição trocar a mensagem ao mesmo tempo, esta volta 409 com conflict e nada é gravado. Respostas no WhatsApp Business continuam só de texto.
curl --request PATCH \
--url https://api.wppfy.com/quick-replies/{id} \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"shortCut": "endereco-centro"
}
'import requests
url = "https://api.wppfy.com/quick-replies/{id}"
payload = { "shortCut": "endereco-centro" }
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({shortCut: 'endereco-centro'})
};
fetch('https://api.wppfy.com/quick-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://api.wppfy.com/quick-replies/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'shortCut' => 'endereco-centro'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <api-key>"
],
]);
$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://api.wppfy.com/quick-replies/{id}"
payload := strings.NewReader("{\n \"shortCut\": \"endereco-centro\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("token", "<api-key>")
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.patch("https://api.wppfy.com/quick-replies/{id}")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"shortCut\": \"endereco-centro\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/quick-replies/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"shortCut\": \"endereco-centro\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"shortCut": "<string>",
"aiDescription": "<string>",
"onWhatsApp": true,
"message": {
"kind": "location",
"name": "Loja Centro",
"address": "Av. Paulista, 1000",
"latitude": -23.5614,
"longitude": -46.6559
},
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": "temperature must be between 0 and 2",
"code": "validation_failed"
}{
"code": 401,
"message": "Invalid token.",
"data": {}
}{
"error": "temperature must be between 0 and 2",
"code": "validation_failed"
}{
"error": "temperature must be between 0 and 2",
"code": "validation_failed"
}{
"error": "temperature must be between 0 and 2",
"code": "validation_failed"
}{
"error": "temperature must be between 0 and 2",
"code": "validation_failed"
}Autorizações
Parâmetros de caminho
ID da resposta rápida.
Corpo
Na criação, shortCut e message são obrigatórios. Na edição, só os campos enviados mudam; message substitui a mensagem inteira.
Atalho para encontrar a resposta (e o que a IA usa para escolher).
Reservado ao atendimento automático. Vazio por padrão.
Só na criação e só com kind: text: cria também no WhatsApp Business.
Mensagem guardada: kind mais o mesmo corpo do envio correspondente, sem number e sem campos de envio (replyid, mentions, delay, readchat, readmessages, async, forward, track_source, track_id).
| kind | Corpo igual a | Observação |
|---|---|---|
text | text | Aceita placeholders como {{name}}. |
media | /send/media: type, file, text, docName | type: image, video, document, audio, ptt ou myaudio. file por URL fica como foi enviado; em base64, é guardado pela API (imagem 5 MB, áudio e vídeo 16 MB, documento 20 MB; 50 MB por instância). |
contact | /send/contact | fullName e phoneNumber obrigatórios. |
location | /send/location | latitude e longitude obrigatórias. |
menu | /send/menu | type: button, button_legacy, list ou poll (carrossel ainda não). A mídia do botão (file) só por URL. As opções precisam dar para enviar, senão 400: enquete com pelo menos 2, lista com pelo menos um item (seção [...] não conta) e botões com pelo menos 1. |
pix | /send/pix-button | pixType e pixKey obrigatórios. |
Show child attributes
Show child attributes
{
"kind": "location",
"name": "Loja Centro",
"address": "Av. Paulista, 1000",
"latitude": -23.5614,
"longitude": -46.6559
}
Resposta
Resposta rápida atualizada
Atalho para encontrar a resposta (e o que a IA usa para escolher).
Reservado ao atendimento automático. Vazio por padrão.
Se a resposta também está no WhatsApp Business (só texto).
Mensagem guardada: kind mais o mesmo corpo do envio correspondente, sem number e sem campos de envio (replyid, mentions, delay, readchat, readmessages, async, forward, track_source, track_id).
| kind | Corpo igual a | Observação |
|---|---|---|
text | text | Aceita placeholders como {{name}}. |
media | /send/media: type, file, text, docName | type: image, video, document, audio, ptt ou myaudio. file por URL fica como foi enviado; em base64, é guardado pela API (imagem 5 MB, áudio e vídeo 16 MB, documento 20 MB; 50 MB por instância). |
contact | /send/contact | fullName e phoneNumber obrigatórios. |
location | /send/location | latitude e longitude obrigatórias. |
menu | /send/menu | type: button, button_legacy, list ou poll (carrossel ainda não). A mídia do botão (file) só por URL. As opções precisam dar para enviar, senão 400: enquete com pelo menos 2, lista com pelo menos um item (seção [...] não conta) e botões com pelo menos 1. |
pix | /send/pix-button | pixType e pixKey obrigatórios. |
Show child attributes
Show child attributes
{
"kind": "location",
"name": "Loja Centro",
"address": "Av. Paulista, 1000",
"latitude": -23.5614,
"longitude": -46.6559
}
