curl --request POST \
--url http://0.0.0.0:3000/v1/scripts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Acender luzes da sala",
"icon": "mdi:lightbulb",
"color": "#FFC107",
"actions": [
{
"type": "call_service",
"entity_id": "light.sala",
"service": "turn_on"
}
]
}
'{
"id": 1,
"name": "Acender luzes da sala",
"icon": "mdi:lightbulb",
"color": "#FFC107",
"enabled": true,
"actions": [
{
"type": "call_service",
"entity_id": "light.sala",
"service": "turn_on"
}
],
"user_id": "user_abc123",
"org_id": null,
"created_at": "2026-03-17T10:00:00Z"
}curl --request POST \
--url http://0.0.0.0:3000/v1/scripts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Acender luzes da sala",
"icon": "mdi:lightbulb",
"color": "#FFC107",
"actions": [
{
"type": "call_service",
"entity_id": "light.sala",
"service": "turn_on"
}
]
}
'{
"id": 1,
"name": "Acender luzes da sala",
"icon": "mdi:lightbulb",
"color": "#FFC107",
"enabled": true,
"actions": [
{
"type": "call_service",
"entity_id": "light.sala",
"service": "turn_on"
}
],
"user_id": "user_abc123",
"org_id": null,
"created_at": "2026-03-17T10:00:00Z"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
ID da organização para contexto (opcional). Quando presente, filtra recursos da org.