Criar, atualizar ou excluir resposta rápida
curl --request POST \
--url https://api.wppfy.com/quickreply/edit \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"shortCut": "saudacao1",
"id": "rb9da9c03637452",
"delete": false,
"text": "Olá! Como posso ajudar hoje?",
"file": "https://exemplo.com/arquivo.pdf",
"docName": "apresentacao.pdf"
}
'import requests
url = "https://api.wppfy.com/quickreply/edit"
payload = {
"shortCut": "saudacao1",
"id": "rb9da9c03637452",
"delete": False,
"text": "Olá! Como posso ajudar hoje?",
"file": "https://exemplo.com/arquivo.pdf",
"docName": "apresentacao.pdf"
}
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
shortCut: 'saudacao1',
id: 'rb9da9c03637452',
delete: false,
text: 'Olá! Como posso ajudar hoje?',
file: 'https://exemplo.com/arquivo.pdf',
docName: 'apresentacao.pdf'
})
};
fetch('https://api.wppfy.com/quickreply/edit', 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/quickreply/edit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'shortCut' => 'saudacao1',
'id' => 'rb9da9c03637452',
'delete' => false,
'text' => 'Olá! Como posso ajudar hoje?',
'file' => 'https://exemplo.com/arquivo.pdf',
'docName' => 'apresentacao.pdf'
]),
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/quickreply/edit"
payload := strings.NewReader("{\n \"shortCut\": \"saudacao1\",\n \"id\": \"rb9da9c03637452\",\n \"delete\": false,\n \"text\": \"Olá! Como posso ajudar hoje?\",\n \"file\": \"https://exemplo.com/arquivo.pdf\",\n \"docName\": \"apresentacao.pdf\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.wppfy.com/quickreply/edit")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"shortCut\": \"saudacao1\",\n \"id\": \"rb9da9c03637452\",\n \"delete\": false,\n \"text\": \"Olá! Como posso ajudar hoje?\",\n \"file\": \"https://exemplo.com/arquivo.pdf\",\n \"docName\": \"apresentacao.pdf\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/quickreply/edit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"shortCut\": \"saudacao1\",\n \"id\": \"rb9da9c03637452\",\n \"delete\": false,\n \"text\": \"Olá! Como posso ajudar hoje?\",\n \"file\": \"https://exemplo.com/arquivo.pdf\",\n \"docName\": \"apresentacao.pdf\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Operação concluída com sucesso",
"quickReplies": [
{
"shortcut": "<string>",
"content": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"category": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}Respostas Rápidas
Criar, atualizar ou excluir resposta rápida
Gerencia templates de respostas rápidas para agilizar o atendimento. Suporta mensagens de texto e mídia.
- Para criar: não inclua o campo
id - Para atualizar: inclua o
idexistente - Para excluir: defina
delete: truee inclua oid
Observação: Templates originados do WhatsApp (onWhatsApp=true) não podem ser modificados ou excluídos.
POST
/
quickreply
/
edit
Criar, atualizar ou excluir resposta rápida
curl --request POST \
--url https://api.wppfy.com/quickreply/edit \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"shortCut": "saudacao1",
"id": "rb9da9c03637452",
"delete": false,
"text": "Olá! Como posso ajudar hoje?",
"file": "https://exemplo.com/arquivo.pdf",
"docName": "apresentacao.pdf"
}
'import requests
url = "https://api.wppfy.com/quickreply/edit"
payload = {
"shortCut": "saudacao1",
"id": "rb9da9c03637452",
"delete": False,
"text": "Olá! Como posso ajudar hoje?",
"file": "https://exemplo.com/arquivo.pdf",
"docName": "apresentacao.pdf"
}
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
shortCut: 'saudacao1',
id: 'rb9da9c03637452',
delete: false,
text: 'Olá! Como posso ajudar hoje?',
file: 'https://exemplo.com/arquivo.pdf',
docName: 'apresentacao.pdf'
})
};
fetch('https://api.wppfy.com/quickreply/edit', 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/quickreply/edit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'shortCut' => 'saudacao1',
'id' => 'rb9da9c03637452',
'delete' => false,
'text' => 'Olá! Como posso ajudar hoje?',
'file' => 'https://exemplo.com/arquivo.pdf',
'docName' => 'apresentacao.pdf'
]),
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/quickreply/edit"
payload := strings.NewReader("{\n \"shortCut\": \"saudacao1\",\n \"id\": \"rb9da9c03637452\",\n \"delete\": false,\n \"text\": \"Olá! Como posso ajudar hoje?\",\n \"file\": \"https://exemplo.com/arquivo.pdf\",\n \"docName\": \"apresentacao.pdf\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.wppfy.com/quickreply/edit")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"shortCut\": \"saudacao1\",\n \"id\": \"rb9da9c03637452\",\n \"delete\": false,\n \"text\": \"Olá! Como posso ajudar hoje?\",\n \"file\": \"https://exemplo.com/arquivo.pdf\",\n \"docName\": \"apresentacao.pdf\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/quickreply/edit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"shortCut\": \"saudacao1\",\n \"id\": \"rb9da9c03637452\",\n \"delete\": false,\n \"text\": \"Olá! Como posso ajudar hoje?\",\n \"file\": \"https://exemplo.com/arquivo.pdf\",\n \"docName\": \"apresentacao.pdf\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Operação concluída com sucesso",
"quickReplies": [
{
"shortcut": "<string>",
"content": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"category": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}Autorizações
Corpo
application/json
Atalho para acesso rápido ao template
Exemplo:
"saudacao1"
Tipo da mensagem
Opções disponíveis:
text, audio, myaudio, ptt, document, video, image Necessário para atualizações/exclusões, omitir para criação
Exemplo:
"rb9da9c03637452"
Definir como true para excluir o template
Obrigatório para mensagens do tipo texto
Exemplo:
"Olá! Como posso ajudar hoje?"
URL ou Base64 para tipos de mídia
Exemplo:
"https://exemplo.com/arquivo.pdf"
Nome do arquivo opcional para tipo documento
Exemplo:
"apresentacao.pdf"
⌘I
