curl --request POST \
--url https://api.multchats.com/v2/automation/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"automationTypebotId": "<string>",
"integrations": [
"<string>"
],
"tagId": "<string>",
"specificMessage": "<string>",
"inAttendance": false,
"delayMinutes": 123,
"moveToQueue": true
}
'import requests
url = "https://api.multchats.com/v2/automation/create"
payload = {
"name": "<string>",
"description": "<string>",
"automationTypebotId": "<string>",
"integrations": ["<string>"],
"tagId": "<string>",
"specificMessage": "<string>",
"inAttendance": False,
"delayMinutes": 123,
"moveToQueue": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
automationTypebotId: '<string>',
integrations: ['<string>'],
tagId: '<string>',
specificMessage: '<string>',
inAttendance: false,
delayMinutes: 123,
moveToQueue: true
})
};
fetch('https://api.multchats.com/v2/automation/create', 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.multchats.com/v2/automation/create",
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([
'name' => '<string>',
'description' => '<string>',
'automationTypebotId' => '<string>',
'integrations' => [
'<string>'
],
'tagId' => '<string>',
'specificMessage' => '<string>',
'inAttendance' => false,
'delayMinutes' => 123,
'moveToQueue' => true
]),
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://api.multchats.com/v2/automation/create"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"automationTypebotId\": \"<string>\",\n \"integrations\": [\n \"<string>\"\n ],\n \"tagId\": \"<string>\",\n \"specificMessage\": \"<string>\",\n \"inAttendance\": false,\n \"delayMinutes\": 123,\n \"moveToQueue\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.multchats.com/v2/automation/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"automationTypebotId\": \"<string>\",\n \"integrations\": [\n \"<string>\"\n ],\n \"tagId\": \"<string>\",\n \"specificMessage\": \"<string>\",\n \"inAttendance\": false,\n \"delayMinutes\": 123,\n \"moveToQueue\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.multchats.com/v2/automation/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"automationTypebotId\": \"<string>\",\n \"integrations\": [\n \"<string>\"\n ],\n \"tagId\": \"<string>\",\n \"specificMessage\": \"<string>\",\n \"inAttendance\": false,\n \"delayMinutes\": 123,\n \"moveToQueue\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"trigger": {}
}
}{
"success": false,
"message": "Erro ao enviar mensagem"
}Criar gatilho de automação
Cria um novo gatilho de automação. O campo specificMessage é obrigatório quando triggerType é RECEIVE_SPECIFIC_MESSAGE. O campo tagId é obrigatório quando triggerType é ADD_TAG_TO_CONTACT ou REMOVE_TAG_FROM_CONTACT.
curl --request POST \
--url https://api.multchats.com/v2/automation/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"automationTypebotId": "<string>",
"integrations": [
"<string>"
],
"tagId": "<string>",
"specificMessage": "<string>",
"inAttendance": false,
"delayMinutes": 123,
"moveToQueue": true
}
'import requests
url = "https://api.multchats.com/v2/automation/create"
payload = {
"name": "<string>",
"description": "<string>",
"automationTypebotId": "<string>",
"integrations": ["<string>"],
"tagId": "<string>",
"specificMessage": "<string>",
"inAttendance": False,
"delayMinutes": 123,
"moveToQueue": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
automationTypebotId: '<string>',
integrations: ['<string>'],
tagId: '<string>',
specificMessage: '<string>',
inAttendance: false,
delayMinutes: 123,
moveToQueue: true
})
};
fetch('https://api.multchats.com/v2/automation/create', 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.multchats.com/v2/automation/create",
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([
'name' => '<string>',
'description' => '<string>',
'automationTypebotId' => '<string>',
'integrations' => [
'<string>'
],
'tagId' => '<string>',
'specificMessage' => '<string>',
'inAttendance' => false,
'delayMinutes' => 123,
'moveToQueue' => true
]),
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://api.multchats.com/v2/automation/create"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"automationTypebotId\": \"<string>\",\n \"integrations\": [\n \"<string>\"\n ],\n \"tagId\": \"<string>\",\n \"specificMessage\": \"<string>\",\n \"inAttendance\": false,\n \"delayMinutes\": 123,\n \"moveToQueue\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.multchats.com/v2/automation/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"automationTypebotId\": \"<string>\",\n \"integrations\": [\n \"<string>\"\n ],\n \"tagId\": \"<string>\",\n \"specificMessage\": \"<string>\",\n \"inAttendance\": false,\n \"delayMinutes\": 123,\n \"moveToQueue\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.multchats.com/v2/automation/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"automationTypebotId\": \"<string>\",\n \"integrations\": [\n \"<string>\"\n ],\n \"tagId\": \"<string>\",\n \"specificMessage\": \"<string>\",\n \"inAttendance\": false,\n \"delayMinutes\": 123,\n \"moveToQueue\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"trigger": {}
}
}{
"success": false,
"message": "Erro ao enviar mensagem"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Nome do gatilho
1 - 255Descrição do gatilho
1 - 255Tipo do gatilho
RECEIVE_ANY_MESSAGE, RECEIVE_FIRST_MESSAGE, RECEIVE_SPECIFIC_MESSAGE, ADD_TAG_TO_CONTACT, REMOVE_TAG_FROM_CONTACT, RECEIVE_WEBHOOK, SERVICE_CONTINUITY ID da integração Typebot
^c[a-z0-9]{24}$IDs das integrações vinculadas ao gatilho
^c[a-z0-9]{24}$Tipo de chat que o gatilho deve considerar
CONTACT, GROUP, ALL ID da tag (obrigatório para ADD_TAG_TO_CONTACT e REMOVE_TAG_FROM_CONTACT)
^c[a-z0-9]{24}$Mensagem específica (obrigatório para RECEIVE_SPECIFIC_MESSAGE)
Executar apenas quando o chat estiver em atendimento
Atraso em minutos antes de executar a automação
Tipo de transferência após a automação
ALL, USER, AUTOMATION, API, AUTOMATION_AND_API Mover o chat para a fila após a automação

