Update automation
curl --request PATCH \
--url https://api.notifique.dev/v1/automations/{automationId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Exemplo",
"status": "ENABLED",
"graph": {
"steps": [
{
"stepKey": "string",
"stepType": "trigger"
}
],
"connections": [
{
"from": "5511999999999",
"to": "5511999999999",
"branch": "true"
}
],
"nodeLayout": {}
}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Exemplo',
status: 'ENABLED',
graph: {
steps: [{stepKey: 'string', stepType: 'trigger'}],
connections: [{from: '5511999999999', to: '5511999999999', branch: 'true'}],
nodeLayout: {}
}
})
};
fetch('https://api.notifique.dev/v1/automations/{automationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/automations/{automationId}"
payload = {
"name": "Exemplo",
"status": "ENABLED",
"graph": {
"steps": [
{
"stepKey": "string",
"stepType": "trigger"
}
],
"connections": [
{
"from": "5511999999999",
"to": "5511999999999",
"branch": "true"
}
],
"nodeLayout": {}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(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/{automationId}"
payload := strings.NewReader("{\n \"name\": \"Exemplo\",\n \"status\": \"ENABLED\",\n \"graph\": {\n \"steps\": [\n {\n \"stepKey\": \"string\",\n \"stepType\": \"trigger\"\n }\n ],\n \"connections\": [\n {\n \"from\": \"5511999999999\",\n \"to\": \"5511999999999\",\n \"branch\": \"true\"\n }\n ],\n \"nodeLayout\": {}\n }\n}")
req, _ := http.NewRequest("PATCH", 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
}
Automações
Update automation
Update an automation.
PATCH
/
v1
/
automations
/
{automationId}
Update automation
curl --request PATCH \
--url https://api.notifique.dev/v1/automations/{automationId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Exemplo",
"status": "ENABLED",
"graph": {
"steps": [
{
"stepKey": "string",
"stepType": "trigger"
}
],
"connections": [
{
"from": "5511999999999",
"to": "5511999999999",
"branch": "true"
}
],
"nodeLayout": {}
}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Exemplo',
status: 'ENABLED',
graph: {
steps: [{stepKey: 'string', stepType: 'trigger'}],
connections: [{from: '5511999999999', to: '5511999999999', branch: 'true'}],
nodeLayout: {}
}
})
};
fetch('https://api.notifique.dev/v1/automations/{automationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/automations/{automationId}"
payload = {
"name": "Exemplo",
"status": "ENABLED",
"graph": {
"steps": [
{
"stepKey": "string",
"stepType": "trigger"
}
],
"connections": [
{
"from": "5511999999999",
"to": "5511999999999",
"branch": "true"
}
],
"nodeLayout": {}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(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/{automationId}"
payload := strings.NewReader("{\n \"name\": \"Exemplo\",\n \"status\": \"ENABLED\",\n \"graph\": {\n \"steps\": [\n {\n \"stepKey\": \"string\",\n \"stepType\": \"trigger\"\n }\n ],\n \"connections\": [\n {\n \"from\": \"5511999999999\",\n \"to\": \"5511999999999\",\n \"branch\": \"true\"\n }\n ],\n \"nodeLayout\": {}\n }\n}")
req, _ := http.NewRequest("PATCH", 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
}
Authorizations
ntfAutoBearerAuthntfAutoApiKeyHeader
Authorization: Bearer sk_live_...
Path Parameters
Cuid da automação.
Body
application/json
Maximum string length:
256Available options:
ENABLED, DISABLED Grafo acíclico (DAG) com exatamente um trigger. Arestas a partir de condition exigem branch: true | false.
Show child attributes
Show child attributes
Example:
{ "steps": [ { "stepKey": "string", "stepType": "trigger" } ], "connections": [ { "from": "5511999999999", "to": "5511999999999", "branch": "true" } ], "nodeLayout": {} }
Response
Atualizado (inclui graphJson e graphVersion incrementado quando o grafo muda).
Resposta JSON vazia (sucesso sem payload).
Example:
true
Was this page helpful?

