Criar automação
curl --request POST \
--url https://api.notifique.dev/v1/automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"graph": {
"steps": [
{
"stepKey": "<string>",
"stepType": "trigger",
"config": {
"eventName": "<string>"
}
}
],
"connections": [
{
"from": "<string>",
"to": "<string>"
}
],
"nodeLayout": {}
},
"status": "DISABLED"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
graph: {
steps: [{stepKey: '<string>', stepType: 'trigger', config: {eventName: '<string>'}}],
connections: [{from: '<string>', to: '<string>'}],
nodeLayout: {}
},
status: 'DISABLED'
})
};
fetch('https://api.notifique.dev/v1/automations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/automations"
payload = {
"name": "<string>",
"graph": {
"steps": [
{
"stepKey": "<string>",
"stepType": "trigger",
"config": { "eventName": "<string>" }
}
],
"connections": [
{
"from": "<string>",
"to": "<string>"
}
],
"nodeLayout": {}
},
"status": "DISABLED"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/automations"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"graph\": {\n \"steps\": [\n {\n \"stepKey\": \"<string>\",\n \"stepType\": \"trigger\",\n \"config\": {\n \"eventName\": \"<string>\"\n }\n }\n ],\n \"connections\": [\n {\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"nodeLayout\": {}\n },\n \"status\": \"DISABLED\"\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))
}{
"success": true,
"data": {
"id": "<string>",
"name": "<string>",
"triggerEventName": "<string>",
"graphVersion": 123,
"createdAt": "2023-11-07T05:31:56Z"
}
}Automações
Criar automação
Cria uma nova automação.
POST
/
v1
/
automations
Criar automação
curl --request POST \
--url https://api.notifique.dev/v1/automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"graph": {
"steps": [
{
"stepKey": "<string>",
"stepType": "trigger",
"config": {
"eventName": "<string>"
}
}
],
"connections": [
{
"from": "<string>",
"to": "<string>"
}
],
"nodeLayout": {}
},
"status": "DISABLED"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
graph: {
steps: [{stepKey: '<string>', stepType: 'trigger', config: {eventName: '<string>'}}],
connections: [{from: '<string>', to: '<string>'}],
nodeLayout: {}
},
status: 'DISABLED'
})
};
fetch('https://api.notifique.dev/v1/automations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/automations"
payload = {
"name": "<string>",
"graph": {
"steps": [
{
"stepKey": "<string>",
"stepType": "trigger",
"config": { "eventName": "<string>" }
}
],
"connections": [
{
"from": "<string>",
"to": "<string>"
}
],
"nodeLayout": {}
},
"status": "DISABLED"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/automations"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"graph\": {\n \"steps\": [\n {\n \"stepKey\": \"<string>\",\n \"stepType\": \"trigger\",\n \"config\": {\n \"eventName\": \"<string>\"\n }\n }\n ],\n \"connections\": [\n {\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"nodeLayout\": {}\n },\n \"status\": \"DISABLED\"\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))
}{
"success": true,
"data": {
"id": "<string>",
"name": "<string>",
"triggerEventName": "<string>",
"graphVersion": 123,
"createdAt": "2023-11-07T05:31:56Z"
}
}Autorizações
ntfAutoBearerAuthntfAutoApiKeyHeader
Authorization: Bearer sk_live_...
Corpo
application/json
Esta página foi útil?
⌘I

