Skip to main content
POST
/
v1
/
automations
/
{id}
/
toggle
Toggle automation enabled/disabled
curl --request POST \
  --url http://0.0.0.0:3000/v1/automations/{id}/toggle \
  --header 'Authorization: Bearer <token>'
{
  "id": 1,
  "name": "Ligar aquecedor ao anoitecer",
  "trigger": {
    "platform": "sun",
    "event": "sunset"
  },
  "conditions": [],
  "actions": [
    {
      "type": "call_service",
      "entity_id": "switch.aquecedor",
      "service": "turn_on"
    }
  ],
  "enabled": false,
  "user_id": "user_abc123",
  "org_id": null,
  "created_at": "2026-03-17T10:00:00Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Organization-Id
string

ID da organização para contexto (opcional). Quando presente, filtra recursos da org.

Path Parameters

id
integer
required

ID numérico da automação

Response

Automation toggled

id
integer
name
string
trigger
object
conditions
object[]
actions
object[]
enabled
boolean
user_id
string
org_id
string | null
created_at
string<date-time>