For the complete documentation index, see llms.txt. This page is also available as Markdown.

Automations

Automation rules

Get automations

get

Retrieve all automations in the organization.

Required permissions, when user-scoped authentication is used: AUTOMATION_VIEW.

Authorizations
AuthorizationstringRequired

OAuth2 Bearer token obtained from authentication endpoint

Query parameters
orgIdinteger · int32Optional

Organization ID (optional). If not provided, the organization, that is associated with the authentication token, will be used.

Responses
200

List of automations

application/json
idinteger · int32Optional

Automation ID

Example: 101
namestringOptional

Automation name

Example: High Temperature Alert
ownerIdinteger · int64Optional

User ID of the automation owner

Example: 202
isActivebooleanOptional

Whether the automation is active

Example: true
isSharedbooleanOptional

Whether the automation is shared with sub-organizations and has at least one propagated sub-automation.

Example: false
get/api/v1/organization/automations
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 automation

post

Create a new automation in the organization.

Required permissions, when user-scoped authentication is used: AUTOMATION_CREATE.

Authorizations
AuthorizationstringRequired

OAuth2 Bearer token obtained from authentication endpoint

Query parameters
orgIdinteger · int32Optional

Organization ID (optional). If not provided, the organization, that is associated with the authentication token, will be used.

Body

Request body used to create or update an automation.

idinteger · int32Optional

Automation ID. Required for update (PUT), ignored on create (POST).

Example: 101
namestring · max: 255Required

Automation name.

Example: High Temperature Alert
iconstringOptional

Optional icon identifier.

isActivebooleanOptional

Whether the automation is active.

Example: true
ignorePeriodinteger · int32Optional

Period (in milliseconds) during which repeated action execution is ignored. Must be >= 0.

Example: 0
shareAsTemplatebooleanOptional

Whether the automation is shared as a template.

autoCreateInSubOrgbooleanOptional

Whether the automation should be auto-created in sub-organizations. Requires the SHARE_AUTOMATION permission; otherwise silently ignored.

autoEnablebooleanOptional

Whether auto-created copies in sub-organizations are enabled by default.

applyForExistingbooleanOptional

When autoCreateInSubOrg is being turned on, whether to also propagate the automation into existing sub-organizations.

removeForExistingbooleanOptional

When autoCreateInSubOrg is being turned off (on update), whether to also remove previously auto-created copies from existing sub-organizations.

Responses
201

Automation created

application/json

Detailed automation representation returned by create, update, get-single and control endpoints.

idinteger · int32OptionalExample: 101
namestringOptionalExample: High Temperature Alert
iconstringOptional
ownerIdinteger · int64Optional

User ID of the automation owner (0 for organization-scoped tokens).

Example: 202
isActivebooleanOptionalExample: true
lastTriggeredAtinteger · int64Optional

Timestamp (epoch millis) of the last time the automation was triggered.

Example: 1700000000000
nextTriggeredAtinteger · int64Optional

Timestamp (epoch millis) of the next scheduled trigger, when applicable.

Example: 0
statusstring · enumOptional

Computed automation status.

Example: COMPLETEPossible values:
ignorePeriodinteger · int32OptionalExample: 0
waitDurationinteger · int64Optional

Total duration (in milliseconds) of any wait actions in the automation rule.

Example: 0
shareAsTemplatebooleanOptional
autoCreateInSubOrgbooleanOptional
autoEnablebooleanOptional
isSharedbooleanOptional

Whether the automation is shared with sub-organizations and has at least one propagated sub-automation.

Example: false
post/api/v1/organization/automations
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 automation

put

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.

Authorizations
AuthorizationstringRequired

OAuth2 Bearer token obtained from authentication endpoint

Query parameters
orgIdinteger · int32Optional

Organization ID (optional). If not provided, the organization, that is associated with the authentication token, will be used.

Body

Request body used to create or update an automation.

idinteger · int32Optional

Automation ID. Required for update (PUT), ignored on create (POST).

Example: 101
namestring · max: 255Required

Automation name.

Example: High Temperature Alert
iconstringOptional

Optional icon identifier.

isActivebooleanOptional

Whether the automation is active.

Example: true
ignorePeriodinteger · int32Optional

Period (in milliseconds) during which repeated action execution is ignored. Must be >= 0.

Example: 0
shareAsTemplatebooleanOptional

Whether the automation is shared as a template.

autoCreateInSubOrgbooleanOptional

Whether the automation should be auto-created in sub-organizations. Requires the SHARE_AUTOMATION permission; otherwise silently ignored.

autoEnablebooleanOptional

Whether auto-created copies in sub-organizations are enabled by default.

applyForExistingbooleanOptional

When autoCreateInSubOrg is being turned on, whether to also propagate the automation into existing sub-organizations.

removeForExistingbooleanOptional

When autoCreateInSubOrg is being turned off (on update), whether to also remove previously auto-created copies from existing sub-organizations.

Responses
200

Automation updated

application/json

Detailed automation representation returned by create, update, get-single and control endpoints.

idinteger · int32OptionalExample: 101
namestringOptionalExample: High Temperature Alert
iconstringOptional
ownerIdinteger · int64Optional

User ID of the automation owner (0 for organization-scoped tokens).

Example: 202
isActivebooleanOptionalExample: true
lastTriggeredAtinteger · int64Optional

Timestamp (epoch millis) of the last time the automation was triggered.

Example: 1700000000000
nextTriggeredAtinteger · int64Optional

Timestamp (epoch millis) of the next scheduled trigger, when applicable.

Example: 0
statusstring · enumOptional

Computed automation status.

Example: COMPLETEPossible values:
ignorePeriodinteger · int32OptionalExample: 0
waitDurationinteger · int64Optional

Total duration (in milliseconds) of any wait actions in the automation rule.

Example: 0
shareAsTemplatebooleanOptional
autoCreateInSubOrgbooleanOptional
autoEnablebooleanOptional
isSharedbooleanOptional

Whether the automation is shared with sub-organizations and has at least one propagated sub-automation.

Example: false
put/api/v1/organization/automations
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 automation

delete

Delete an automation by ID.

Required permissions, when user-scoped authentication is used: AUTOMATION_DELETE.

Authorizations
AuthorizationstringRequired

OAuth2 Bearer token obtained from authentication endpoint

Query parameters
automationIdinteger · int32Required

ID of the automation to delete.

deleteEverywherebooleanOptional

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.

Default: false
orgIdinteger · int32Optional

Organization ID (optional). If not provided, the organization, that is associated with the authentication token, will be used.

Responses
204

Automation deleted

No content

delete/api/v1/organization/automations
DELETE /api/v1/organization/automations?automationId=1 HTTP/1.1
Host: blynk.cloud
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Get automation

get

Retrieve a single automation by ID, including its rule, computed status and scheduling details.

Required permissions, when user-scoped authentication is used: AUTOMATION_VIEW.

Authorizations
AuthorizationstringRequired

OAuth2 Bearer token obtained from authentication endpoint

Query parameters
automationIdinteger · int32Required

ID of the automation.

orgIdinteger · int32Optional

Organization ID (optional). If not provided, the organization, that is associated with the authentication token, will be used.

Responses
200

Automation details

application/json

Detailed automation representation returned by create, update, get-single and control endpoints.

idinteger · int32OptionalExample: 101
namestringOptionalExample: High Temperature Alert
iconstringOptional
ownerIdinteger · int64Optional

User ID of the automation owner (0 for organization-scoped tokens).

Example: 202
isActivebooleanOptionalExample: true
lastTriggeredAtinteger · int64Optional

Timestamp (epoch millis) of the last time the automation was triggered.

Example: 1700000000000
nextTriggeredAtinteger · int64Optional

Timestamp (epoch millis) of the next scheduled trigger, when applicable.

Example: 0
statusstring · enumOptional

Computed automation status.

Example: COMPLETEPossible values:
ignorePeriodinteger · int32OptionalExample: 0
waitDurationinteger · int64Optional

Total duration (in milliseconds) of any wait actions in the automation rule.

Example: 0
shareAsTemplatebooleanOptional
autoCreateInSubOrgbooleanOptional
autoEnablebooleanOptional
isSharedbooleanOptional

Whether the automation is shared with sub-organizations and has at least one propagated sub-automation.

Example: false
get/api/v1/organization/automation
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 automation

post

Enable (activate) an automation.

Required permissions, when user-scoped authentication is used: AUTOMATION_EDIT.

Authorizations
AuthorizationstringRequired

OAuth2 Bearer token obtained from authentication endpoint

Query parameters
orgIdinteger · int32Optional

Organization ID (optional). If not provided, the organization, that is associated with the authentication token, will be used.

Body

Request body used by the enable, disable, execute and cancel endpoints.

automationIdinteger · int32Required

ID of the target automation.

Example: 101
Responses
200

Automation enabled

application/json

Detailed automation representation returned by create, update, get-single and control endpoints.

idinteger · int32OptionalExample: 101
namestringOptionalExample: High Temperature Alert
iconstringOptional
ownerIdinteger · int64Optional

User ID of the automation owner (0 for organization-scoped tokens).

Example: 202
isActivebooleanOptionalExample: true
lastTriggeredAtinteger · int64Optional

Timestamp (epoch millis) of the last time the automation was triggered.

Example: 1700000000000
nextTriggeredAtinteger · int64Optional

Timestamp (epoch millis) of the next scheduled trigger, when applicable.

Example: 0
statusstring · enumOptional

Computed automation status.

Example: COMPLETEPossible values:
ignorePeriodinteger · int32OptionalExample: 0
waitDurationinteger · int64Optional

Total duration (in milliseconds) of any wait actions in the automation rule.

Example: 0
shareAsTemplatebooleanOptional
autoCreateInSubOrgbooleanOptional
autoEnablebooleanOptional
isSharedbooleanOptional

Whether the automation is shared with sub-organizations and has at least one propagated sub-automation.

Example: false
post/api/v1/organization/automation/enable
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 automation

post

Disable (deactivate) an automation.

Required permissions, when user-scoped authentication is used: AUTOMATION_EDIT.

Authorizations
AuthorizationstringRequired

OAuth2 Bearer token obtained from authentication endpoint

Query parameters
orgIdinteger · int32Optional

Organization ID (optional). If not provided, the organization, that is associated with the authentication token, will be used.

Body

Request body used by the enable, disable, execute and cancel endpoints.

automationIdinteger · int32Required

ID of the target automation.

Example: 101
Responses
200

Automation disabled

application/json

Detailed automation representation returned by create, update, get-single and control endpoints.

idinteger · int32OptionalExample: 101
namestringOptionalExample: High Temperature Alert
iconstringOptional
ownerIdinteger · int64Optional

User ID of the automation owner (0 for organization-scoped tokens).

Example: 202
isActivebooleanOptionalExample: true
lastTriggeredAtinteger · int64Optional

Timestamp (epoch millis) of the last time the automation was triggered.

Example: 1700000000000
nextTriggeredAtinteger · int64Optional

Timestamp (epoch millis) of the next scheduled trigger, when applicable.

Example: 0
statusstring · enumOptional

Computed automation status.

Example: COMPLETEPossible values:
ignorePeriodinteger · int32OptionalExample: 0
waitDurationinteger · int64Optional

Total duration (in milliseconds) of any wait actions in the automation rule.

Example: 0
shareAsTemplatebooleanOptional
autoCreateInSubOrgbooleanOptional
autoEnablebooleanOptional
isSharedbooleanOptional

Whether the automation is shared with sub-organizations and has at least one propagated sub-automation.

Example: false
post/api/v1/organization/automation/disable
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
}

Execute automation

post

Manually run a scene automation (one that is triggered by the user).

Required permissions, when user-scoped authentication is used: AUTOMATION_EXECUTE.

Authorizations
AuthorizationstringRequired

OAuth2 Bearer token obtained from authentication endpoint

Query parameters
orgIdinteger · int32Optional

Organization ID (optional). If not provided, the organization, that is associated with the authentication token, will be used.

Body

Request body used by the enable, disable, execute and cancel endpoints.

automationIdinteger · int32Required

ID of the target automation.

Example: 101
Responses
200

Automation executed

application/json

Detailed automation representation returned by create, update, get-single and control endpoints.

idinteger · int32OptionalExample: 101
namestringOptionalExample: High Temperature Alert
iconstringOptional
ownerIdinteger · int64Optional

User ID of the automation owner (0 for organization-scoped tokens).

Example: 202
isActivebooleanOptionalExample: true
lastTriggeredAtinteger · int64Optional

Timestamp (epoch millis) of the last time the automation was triggered.

Example: 1700000000000
nextTriggeredAtinteger · int64Optional

Timestamp (epoch millis) of the next scheduled trigger, when applicable.

Example: 0
statusstring · enumOptional

Computed automation status.

Example: COMPLETEPossible values:
ignorePeriodinteger · int32OptionalExample: 0
waitDurationinteger · int64Optional

Total duration (in milliseconds) of any wait actions in the automation rule.

Example: 0
shareAsTemplatebooleanOptional
autoCreateInSubOrgbooleanOptional
autoEnablebooleanOptional
isSharedbooleanOptional

Whether the automation is shared with sub-organizations and has at least one propagated sub-automation.

Example: false
post/api/v1/organization/automation/execute
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 running automation

post

Cancel a currently running automation execution.

Required permissions, when user-scoped authentication is used: AUTOMATION_EXECUTE.

Authorizations
AuthorizationstringRequired

OAuth2 Bearer token obtained from authentication endpoint

Query parameters
orgIdinteger · int32Optional

Organization ID (optional). If not provided, the organization, that is associated with the authentication token, will be used.

Body

Request body used by the enable, disable, execute and cancel endpoints.

automationIdinteger · int32Required

ID of the target automation.

Example: 101
Responses
200

Automation execution cancelled

application/json

Detailed automation representation returned by create, update, get-single and control endpoints.

idinteger · int32OptionalExample: 101
namestringOptionalExample: High Temperature Alert
iconstringOptional
ownerIdinteger · int64Optional

User ID of the automation owner (0 for organization-scoped tokens).

Example: 202
isActivebooleanOptionalExample: true
lastTriggeredAtinteger · int64Optional

Timestamp (epoch millis) of the last time the automation was triggered.

Example: 1700000000000
nextTriggeredAtinteger · int64Optional

Timestamp (epoch millis) of the next scheduled trigger, when applicable.

Example: 0
statusstring · enumOptional

Computed automation status.

Example: COMPLETEPossible values:
ignorePeriodinteger · int32OptionalExample: 0
waitDurationinteger · int64Optional

Total duration (in milliseconds) of any wait actions in the automation rule.

Example: 0
shareAsTemplatebooleanOptional
autoCreateInSubOrgbooleanOptional
autoEnablebooleanOptional
isSharedbooleanOptional

Whether the automation is shared with sub-organizations and has at least one propagated sub-automation.

Example: false
post/api/v1/organization/automation/cancel
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
}

Get automation log

get

Retrieve the execution log for an automation.

Required permissions, when user-scoped authentication is used: AUTOMATION_VIEW.

Authorizations
AuthorizationstringRequired

OAuth2 Bearer token obtained from authentication endpoint

Query parameters
automationIdinteger · int32Required

ID of the automation.

periodstringOptional

Reporting period. Use CUSTOM together with from/to for an explicit range.

Default: DAY
frominteger · int64Optional

Start timestamp (epoch millis), used only when period is CUSTOM.

tointeger · int64Optional

End timestamp (epoch millis), used only when period is CUSTOM.

offsetinteger · int32Optional

Number of records to skip.

Default: 0
limitinteger · int32 · max: 100Optional

Maximum number of records to return (1-100).

Default: 100
orgIdinteger · int32Optional

Organization ID (optional). If not provided, the organization, that is associated with the authentication token, will be used.

Responses
200

Automation log records

application/json

A single automation execution log record.

tsinteger · int64Optional

Timestamp (epoch millis) of the log record.

Example: 1700000000000
deviceIdinteger · int32OptionalExample: 55
deviceNamestringOptionalExample: Boiler #1
dataStreamIdinteger · int32OptionalExample: 3
dataStreamNamestringOptionalExample: Temperature
pininteger · int32OptionalExample: 3
pinTypestringOptionalExample: VIRTUAL
valuenumber · doubleOptionalExample: 42.5
stringValuestringOptional
isOnlinebooleanOptionalExample: true
actionTypestringOptional

The type of action recorded.

get/api/v1/organization/automation/log
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?