Skip to main content
PATCH
/
v1
/
automations
/
{automationId}
Atualizar automação
curl --request PATCH \
  --url https://api.notifique.dev/v1/automations/{automationId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "status": "ENABLED"
}
'
{
  "success": true,
  "data": {
    "id": "<string>",
    "name": "<string>",
    "status": "ENABLED",
    "triggerEventName": "<string>",
    "graphJson": {
      "steps": [
        {
          "stepKey": "<string>",
          "stepType": "trigger",
          "config": {
            "eventName": "<string>"
          }
        }
      ],
      "connections": [
        {
          "from": "<string>",
          "to": "<string>",
          "branch": "true"
        }
      ],
      "nodeLayout": {}
    },
    "graphVersion": 123,
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Authorization: Bearer sk_live_...

Path Parameters

automationId
string
required

Cuid da automação.

Body

application/json
name
string
Maximum string length: 256
status
enum<string>
Available options:
ENABLED,
DISABLED
graph
object

Grafo acíclico (DAG) com exatamente um trigger. Arestas a partir de condition exigem branch: true | false.

Response

Atualizado (inclui graphJson e graphVersion incrementado quando o grafo muda).

success
enum<boolean>
required
Available options:
true
data
object
required