Automations
Automation rules
Retrieve all automations in the organization.
Required permissions, when user-scoped authentication is used: AUTOMATION_VIEW.
OAuth2 Bearer token obtained from authentication endpoint
Organization ID (optional). If not provided, the organization, that is associated with the authentication token, will be used.
List of automations
Automation ID
101Automation name
High Temperature AlertUser ID of the automation owner
202Whether the automation is active
trueWhether the automation is shared with sub-organizations and has at least one propagated sub-automation.
falseBad request
Forbidden
Organization not found or access denied
Too many requests
Internal server error
GET /api/v1/organization/automations HTTP/1.1
Host: blynk.cloud
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"id": 101,
"name": "High Temperature Alert",
"ownerId": 202,
"isActive": true,
"isShared": false
}
]Create a new automation in the organization.
Required permissions, when user-scoped authentication is used: AUTOMATION_CREATE.
OAuth2 Bearer token obtained from authentication endpoint
Organization ID (optional). If not provided, the organization, that is associated with the authentication token, will be used.
Request body used to create or update an automation.
Automation ID. Required for update (PUT), ignored on create (POST).
101Automation name.
High Temperature AlertOptional icon identifier.
Whether the automation is active.
truePeriod (in milliseconds) during which repeated action execution is ignored. Must be >= 0.
0Whether the automation is shared as a template.
Whether the automation should be auto-created in sub-organizations. Requires the SHARE_AUTOMATION permission; otherwise silently ignored.
Whether auto-created copies in sub-organizations are enabled by default.
When autoCreateInSubOrg is being turned on, whether to also propagate the automation into existing sub-organizations.
When autoCreateInSubOrg is being turned off (on update), whether to also remove previously auto-created copies from existing sub-organizations.
Automation created
Detailed automation representation returned by create, update, get-single and control endpoints.
101High Temperature AlertUser ID of the automation owner (0 for organization-scoped tokens).
202trueTimestamp (epoch millis) of the last time the automation was triggered.
1700000000000Timestamp (epoch millis) of the next scheduled trigger, when applicable.
0Computed automation status.
COMPLETEPossible values: 0Total duration (in milliseconds) of any wait actions in the automation rule.
0Whether the automation is shared with sub-organizations and has at least one propagated sub-automation.
falseBad request
Forbidden
Organization not found or access denied
Too many requests
Internal server error
POST /api/v1/organization/automations HTTP/1.1
Host: blynk.cloud
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 267
{
"id": 101,
"name": "High Temperature Alert",
"icon": "text",
"automationRule": {
"type": "SCENE",
"trigger": {},
"actions": [
{}
]
},
"isActive": true,
"ignorePeriod": 0,
"shareAsTemplate": true,
"autoCreateInSubOrg": true,
"autoEnable": true,
"applyForExisting": true,
"removeForExisting": true
}{
"id": 101,
"name": "High Temperature Alert",
"icon": "text",
"automationRule": {
"type": "SCENE",
"trigger": {},
"actions": [
{}
]
},
"ownerId": 202,
"isActive": true,
"lastTriggeredAt": 1700000000000,
"nextTriggeredAt": 0,
"status": "COMPLETE",
"ignorePeriod": 0,
"waitDuration": 0,
"shareAsTemplate": true,
"autoCreateInSubOrg": true,
"autoEnable": true,
"isShared": false
}Update an existing automation. The target automation is identified by the id field in the request body.
Required permissions, when user-scoped authentication is used: AUTOMATION_EDIT.
OAuth2 Bearer token obtained from authentication endpoint
Organization ID (optional). If not provided, the organization, that is associated with the authentication token, will be used.
Request body used to create or update an automation.
Automation ID. Required for update (PUT), ignored on create (POST).
101Automation name.
High Temperature AlertOptional icon identifier.
Whether the automation is active.
truePeriod (in milliseconds) during which repeated action execution is ignored. Must be >= 0.
0Whether the automation is shared as a template.
Whether the automation should be auto-created in sub-organizations. Requires the SHARE_AUTOMATION permission; otherwise silently ignored.
Whether auto-created copies in sub-organizations are enabled by default.
When autoCreateInSubOrg is being turned on, whether to also propagate the automation into existing sub-organizations.
When autoCreateInSubOrg is being turned off (on update), whether to also remove previously auto-created copies from existing sub-organizations.
Automation updated
Detailed automation representation returned by create, update, get-single and control endpoints.
101High Temperature AlertUser ID of the automation owner (0 for organization-scoped tokens).
202trueTimestamp (epoch millis) of the last time the automation was triggered.
1700000000000Timestamp (epoch millis) of the next scheduled trigger, when applicable.
0Computed automation status.
COMPLETEPossible values: 0Total duration (in milliseconds) of any wait actions in the automation rule.
0Whether the automation is shared with sub-organizations and has at least one propagated sub-automation.
falseBad request
Forbidden
Automation or organization not found
Too many requests
Internal server error
PUT /api/v1/organization/automations HTTP/1.1
Host: blynk.cloud
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 267
{
"id": 101,
"name": "High Temperature Alert",
"icon": "text",
"automationRule": {
"type": "SCENE",
"trigger": {},
"actions": [
{}
]
},
"isActive": true,
"ignorePeriod": 0,
"shareAsTemplate": true,
"autoCreateInSubOrg": true,
"autoEnable": true,
"applyForExisting": true,
"removeForExisting": true
}{
"id": 101,
"name": "High Temperature Alert",
"icon": "text",
"automationRule": {
"type": "SCENE",
"trigger": {},
"actions": [
{}
]
},
"ownerId": 202,
"isActive": true,
"lastTriggeredAt": 1700000000000,
"nextTriggeredAt": 0,
"status": "COMPLETE",
"ignorePeriod": 0,
"waitDuration": 0,
"shareAsTemplate": true,
"autoCreateInSubOrg": true,
"autoEnable": true,
"isShared": false
}Delete an automation by ID.
Required permissions, when user-scoped authentication is used: AUTOMATION_DELETE.
OAuth2 Bearer token obtained from authentication endpoint
ID of the automation to delete.
Required to delete an automation that is shared with sub-organizations and still has
propagated sub-automations. When true, the parent automation is deleted together with
every copy in the sub-organizations ("delete everywhere"). When false (the default),
deleting such a shared automation is rejected so its sub-org copies never become orphaned.
falseOrganization ID (optional). If not provided, the organization, that is associated with the authentication token, will be used.
Automation deleted
No content
Bad request
Forbidden
Automation or organization not found
Too many requests
Internal server error
DELETE /api/v1/organization/automations?automationId=1 HTTP/1.1
Host: blynk.cloud
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Retrieve a single automation by ID, including its rule, computed status and scheduling details.
Required permissions, when user-scoped authentication is used: AUTOMATION_VIEW.
OAuth2 Bearer token obtained from authentication endpoint
ID of the automation.
Organization ID (optional). If not provided, the organization, that is associated with the authentication token, will be used.
Automation details
Detailed automation representation returned by create, update, get-single and control endpoints.
101High Temperature AlertUser ID of the automation owner (0 for organization-scoped tokens).
202trueTimestamp (epoch millis) of the last time the automation was triggered.
1700000000000Timestamp (epoch millis) of the next scheduled trigger, when applicable.
0Computed automation status.
COMPLETEPossible values: 0Total duration (in milliseconds) of any wait actions in the automation rule.
0Whether the automation is shared with sub-organizations and has at least one propagated sub-automation.
falseBad request
Forbidden
Automation or organization not found
Too many requests
Internal server error
GET /api/v1/organization/automation?automationId=1 HTTP/1.1
Host: blynk.cloud
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": 101,
"name": "High Temperature Alert",
"icon": "text",
"automationRule": {
"type": "SCENE",
"trigger": {},
"actions": [
{}
]
},
"ownerId": 202,
"isActive": true,
"lastTriggeredAt": 1700000000000,
"nextTriggeredAt": 0,
"status": "COMPLETE",
"ignorePeriod": 0,
"waitDuration": 0,
"shareAsTemplate": true,
"autoCreateInSubOrg": true,
"autoEnable": true,
"isShared": false
}Enable (activate) an automation.
Required permissions, when user-scoped authentication is used: AUTOMATION_EDIT.
OAuth2 Bearer token obtained from authentication endpoint
Organization ID (optional). If not provided, the organization, that is associated with the authentication token, will be used.
Request body used by the enable, disable, execute and cancel endpoints.
ID of the target automation.
101Automation enabled
Detailed automation representation returned by create, update, get-single and control endpoints.
101High Temperature AlertUser ID of the automation owner (0 for organization-scoped tokens).
202trueTimestamp (epoch millis) of the last time the automation was triggered.
1700000000000Timestamp (epoch millis) of the next scheduled trigger, when applicable.
0Computed automation status.
COMPLETEPossible values: 0Total duration (in milliseconds) of any wait actions in the automation rule.
0Whether the automation is shared with sub-organizations and has at least one propagated sub-automation.
falseBad request
Forbidden
Automation or organization not found
Too many requests
Internal server error
POST /api/v1/organization/automation/enable HTTP/1.1
Host: blynk.cloud
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"automationId": 101
}{
"id": 101,
"name": "High Temperature Alert",
"icon": "text",
"automationRule": {
"type": "SCENE",
"trigger": {},
"actions": [
{}
]
},
"ownerId": 202,
"isActive": true,
"lastTriggeredAt": 1700000000000,
"nextTriggeredAt": 0,
"status": "COMPLETE",
"ignorePeriod": 0,
"waitDuration": 0,
"shareAsTemplate": true,
"autoCreateInSubOrg": true,
"autoEnable": true,
"isShared": false
}Disable (deactivate) an automation.
Required permissions, when user-scoped authentication is used: AUTOMATION_EDIT.
OAuth2 Bearer token obtained from authentication endpoint
Organization ID (optional). If not provided, the organization, that is associated with the authentication token, will be used.
Request body used by the enable, disable, execute and cancel endpoints.
ID of the target automation.
101Automation disabled
Detailed automation representation returned by create, update, get-single and control endpoints.
101High Temperature AlertUser ID of the automation owner (0 for organization-scoped tokens).
202trueTimestamp (epoch millis) of the last time the automation was triggered.
1700000000000Timestamp (epoch millis) of the next scheduled trigger, when applicable.
0Computed automation status.
COMPLETEPossible values: 0Total duration (in milliseconds) of any wait actions in the automation rule.
0Whether the automation is shared with sub-organizations and has at least one propagated sub-automation.
falseBad request
Forbidden
Automation or organization not found
Too many requests
Internal server error
POST /api/v1/organization/automation/disable HTTP/1.1
Host: blynk.cloud
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"automationId": 101
}{
"id": 101,
"name": "High Temperature Alert",
"icon": "text",
"automationRule": {
"type": "SCENE",
"trigger": {},
"actions": [
{}
]
},
"ownerId": 202,
"isActive": true,
"lastTriggeredAt": 1700000000000,
"nextTriggeredAt": 0,
"status": "COMPLETE",
"ignorePeriod": 0,
"waitDuration": 0,
"shareAsTemplate": true,
"autoCreateInSubOrg": true,
"autoEnable": true,
"isShared": false
}Manually run a scene automation (one that is triggered by the user).
Required permissions, when user-scoped authentication is used: AUTOMATION_EXECUTE.
OAuth2 Bearer token obtained from authentication endpoint
Organization ID (optional). If not provided, the organization, that is associated with the authentication token, will be used.
Request body used by the enable, disable, execute and cancel endpoints.
ID of the target automation.
101Automation executed
Detailed automation representation returned by create, update, get-single and control endpoints.
101High Temperature AlertUser ID of the automation owner (0 for organization-scoped tokens).
202trueTimestamp (epoch millis) of the last time the automation was triggered.
1700000000000Timestamp (epoch millis) of the next scheduled trigger, when applicable.
0Computed automation status.
COMPLETEPossible values: 0Total duration (in milliseconds) of any wait actions in the automation rule.
0Whether the automation is shared with sub-organizations and has at least one propagated sub-automation.
falseBad request (for example, the automation is not a user-triggered scene)
Forbidden
Automation or organization not found
Too many requests
Internal server error
POST /api/v1/organization/automation/execute HTTP/1.1
Host: blynk.cloud
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"automationId": 101
}{
"id": 101,
"name": "High Temperature Alert",
"icon": "text",
"automationRule": {
"type": "SCENE",
"trigger": {},
"actions": [
{}
]
},
"ownerId": 202,
"isActive": true,
"lastTriggeredAt": 1700000000000,
"nextTriggeredAt": 0,
"status": "COMPLETE",
"ignorePeriod": 0,
"waitDuration": 0,
"shareAsTemplate": true,
"autoCreateInSubOrg": true,
"autoEnable": true,
"isShared": false
}Cancel a currently running automation execution.
Required permissions, when user-scoped authentication is used: AUTOMATION_EXECUTE.
OAuth2 Bearer token obtained from authentication endpoint
Organization ID (optional). If not provided, the organization, that is associated with the authentication token, will be used.
Request body used by the enable, disable, execute and cancel endpoints.
ID of the target automation.
101Automation execution cancelled
Detailed automation representation returned by create, update, get-single and control endpoints.
101High Temperature AlertUser ID of the automation owner (0 for organization-scoped tokens).
202trueTimestamp (epoch millis) of the last time the automation was triggered.
1700000000000Timestamp (epoch millis) of the next scheduled trigger, when applicable.
0Computed automation status.
COMPLETEPossible values: 0Total duration (in milliseconds) of any wait actions in the automation rule.
0Whether the automation is shared with sub-organizations and has at least one propagated sub-automation.
falseBad request
Forbidden
Automation or organization not found
Too many requests
Internal server error
POST /api/v1/organization/automation/cancel HTTP/1.1
Host: blynk.cloud
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"automationId": 101
}{
"id": 101,
"name": "High Temperature Alert",
"icon": "text",
"automationRule": {
"type": "SCENE",
"trigger": {},
"actions": [
{}
]
},
"ownerId": 202,
"isActive": true,
"lastTriggeredAt": 1700000000000,
"nextTriggeredAt": 0,
"status": "COMPLETE",
"ignorePeriod": 0,
"waitDuration": 0,
"shareAsTemplate": true,
"autoCreateInSubOrg": true,
"autoEnable": true,
"isShared": false
}Retrieve the execution log for an automation.
Required permissions, when user-scoped authentication is used: AUTOMATION_VIEW.
OAuth2 Bearer token obtained from authentication endpoint
ID of the automation.
Reporting period. Use CUSTOM together with from/to for an explicit range.
DAYStart timestamp (epoch millis), used only when period is CUSTOM.
End timestamp (epoch millis), used only when period is CUSTOM.
Number of records to skip.
0Maximum number of records to return (1-100).
100Organization ID (optional). If not provided, the organization, that is associated with the authentication token, will be used.
Automation log records
A single automation execution log record.
Timestamp (epoch millis) of the log record.
170000000000055Boiler #13Temperature3VIRTUAL42.5trueThe type of action recorded.
Bad request
Forbidden
Automation or organization not found
Too many requests
Internal server error
GET /api/v1/organization/automation/log?automationId=1 HTTP/1.1
Host: blynk.cloud
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"ts": 1700000000000,
"deviceId": 55,
"deviceName": "Boiler #1",
"dataStreamId": 3,
"dataStreamName": "Temperature",
"pin": 3,
"pinType": "VIRTUAL",
"value": 42.5,
"stringValue": "text",
"isOnline": true,
"actionType": "text"
}
]Last updated
Was this helpful?

