### GET /v2/servers Source: https://www.pushcut.io/webapi/index Retrieves a list of all currently running automation servers. ```APIDOC ## GET /v2/servers ### Description Gets a list of all currently-running automation servers. ### Method GET ### Endpoint https://api.pushcut.io/v2/servers ### Responses #### Success Response (200) A list of currently-running Automation Servers ```json [ { "id": "string", "name": "string", "isConnected": true, "connectionLostAt": "2019-07-31T13:23:25Z" } ] ``` #### Error Responses - **401** Unauthorized ``` -------------------------------- ### GET /v2/loggedNotifications Source: https://www.pushcut.io/webapi/index Retrieves a list of all currently running automation servers. ```APIDOC ## GET /v2/loggedNotifications ### Description Gets a list of all currently-running automation servers. ### Method GET ### Endpoint https://api.pushcut.io/v2/loggedNotifications ### Responses #### Success Response (200) A list of currently-running Automation Servers ```json [ { "name": "string", "title": "string", "body": "string", "sentAt": "2019-07-31T13:23:25Z" } ] ``` #### Error Responses - **401** Unauthorized ``` -------------------------------- ### Get Devices API Source: https://www.pushcut.io/webapi/index Gets a list of all active devices registered with Pushcut. ```APIDOC ## GET /v1/devices ### Description Gets a list of all active devices. ### Method GET ### Endpoint https://api.pushcut.io/v1/devices ### Parameters #### Query Parameters - **api_key** (string) - Required - Your Pushcut API key for authorization. ### Responses #### Success Response (200) - **devices** (array) - A list of active devices. - **id** (string) - The identifier of the device. #### Response Example (200) ```json [ { "id": "Simon's iPhone" } ] ``` #### Error Response (401) Unauthorized ``` -------------------------------- ### Response Sample for Image Upload Error (JSON) Source: https://www.pushcut.io/webapi/index An example of an error response when uploading an image, indicating an internal issue. This response includes an error message and a detail code. ```json { "error": "Something went wrong.", "detailCode": "INTERNAL_ERROR" } ``` -------------------------------- ### List Online Action Subscriptions Source: https://www.pushcut.io/webapi/index Gets a list of all active webhook subscriptions associated with the API key. Requires an API key for authorization. Returns a 200 success code with subscription details. ```HTTP GET /v1/subscriptions Host: api.pushcut.io Authorization: Bearer YOUR_API_KEY ``` -------------------------------- ### Get Devices List (API) Source: https://www.pushcut.io/webapi/index Retrieves a list of all active devices registered with Pushcut. Requires API key authorization. Returns a JSON array of device objects, each with an 'id'. ```json [ { "id": "Simon's iPhone" } ] ``` -------------------------------- ### GET /v1/subscriptions Source: https://www.pushcut.io/webapi/index Retrieves a list of all active webhook subscriptions created from this API Key. ```APIDOC ## GET /v1/subscriptions ### Description Gets a list of all active webhook subscriptions created from this API Key. ### Method GET ### Endpoint https://api.pushcut.io/v1/subscriptions ### Responses #### Success Response (200) Success #### Error Responses - **401** Unauthorized ``` -------------------------------- ### Get Defined Notifications List (API) Source: https://www.pushcut.io/webapi/index Fetches a list of all pre-defined notifications. Requires API key authorization. The response is a JSON array where each object contains 'id' and 'title' of a notification. ```json [ { "id": "MyNotification", "title": "Notification Title" } ] ``` -------------------------------- ### Get Defined Notifications API Source: https://www.pushcut.io/webapi/index Retrieves a list of all notifications that have been defined within the Pushcut application. ```APIDOC ## GET /v1/notifications ### Description Gets a list of all defined notifications. ### Method GET ### Endpoint https://api.pushcut.io/v1/notifications ### Parameters #### Query Parameters - **api_key** (string) - Required - Your Pushcut API key for authorization. ### Responses #### Success Response (200) - **notifications** (array) - A list of defined notifications. - **id** (string) - The identifier of the notification. - **title** (string) - The title of the notification. #### Response Example (200) ```json [ { "id": "MyNotification", "title": "Notification Title" } ] ``` #### Error Response (401) Unauthorized ``` -------------------------------- ### POST /v1/execute Source: https://www.pushcut.io/webapi/index Executes an Automation Server action. You can specify a shortcut name or a HomeKit scene, along with optional parameters like timeout, delay, and identifier. ```APIDOC ## POST /v1/execute ### Description Executes an Automation Server action. Schedules an Automation Server action request. Specify either a shortcut name or a HomeKit scene. ### Method POST ### Endpoint https://api.pushcut.io/v1/execute ### Parameters #### Query Parameters - **shortcut** (string) - Optional - Example: `shortcut=My Shortcut` - Shortcut name. - **homekit** (string) - Optional - Example: `homekit=Downstairs Lights On` - HomeKit scene. - **timeout** (string) - Optional - Example: `timeout=nowait` - Timeout in seconds, or 'nowait'. - **delay** (string) - Optional - Example: `delay=10s` - Duration in which this request should be executed. Eg: 10s, 15m, 6h. - **identifier** (string) - Optional - Example: `identifier=MyIdentifier` - Only used for delayed requests. Use an identifier to overwrite or cancel a scheduled execution. - **input** (string) - Optional - Value that is passed as input to the shortcut. - **serverId** (string) - Optional - The ID or name of the Automation Server that should execute the action. #### Request Body schema: application/json Pass an input or optional configuration with the request. - **shortcut** (string) - The Shortcut to run. - **input** (string) - Value that is passed as input to the shortcut. - **timeout** (string) - Timeout in seconds, or 'nowait'. - **delay** (string) - Duration in which this request should be executed. Eg: 10s, 15m, 6h. Requires Server Extended subscription. - **identifier** (string) - Only used for delayed requests. Use an identifier to overwrite or cancel a scheduled execution. - **serverId** (string) - The ID or name of the Automation Server that should execute the action. ### Request Example ```json { "input": "my dynamic input" } ``` ### Responses #### Success Response (200) Success #### Accepted Response (202) Accepted (when scheduled with 'nowait') #### Error Responses - **400** Bad Request - **401** Unauthorized - **404** Not Found - **502** Bad Gateway (Automation Server not running) - **504** Gateway Timeout (Automation Server did not respond in time) #### Response Example (400, 404, 502, 504) ```json { "error": "Something went wrong.", "detailCode": "INTERNAL_ERROR" } ``` ``` -------------------------------- ### Execute Automation Server Action Source: https://www.pushcut.io/webapi/index Executes an Automation Server action by scheduling a request. Supports specifying a shortcut or HomeKit scene, timeout, delay, and identifier for scheduled requests. Requires an API key. ```HTTP POST /v1/execute Host: api.pushcut.io Authorization: Bearer YOUR_API_KEY Content-Type: application/json { "shortcut": "My Shortcut", "input": "my dynamic input" } ``` -------------------------------- ### List Active Automation Servers Source: https://www.pushcut.io/webapi/index Retrieves a list of all currently running automation servers. Requires an API key for authorization. Returns a 200 success code with server details. ```HTTP GET /v2/servers Host: api.pushcut.io Authorization: Bearer YOUR_API_KEY ``` -------------------------------- ### Upload an Image (API Call) Source: https://www.pushcut.io/webapi/index Uploads an image to Pushcut, which will be synced to the app and converted to PNG. The image name is specified in the URL. Requires an API key. ```bash PUT /v1/images/{imageName} HTTP/1.1 Host: api.pushcut.io Authorization: Bearer YOUR_API_KEY Content-Type: image/png ``` -------------------------------- ### Response Sample for Subscribing to an Online Action (JSON) Source: https://www.pushcut.io/webapi/index A successful response when subscribing to an online action, returning the unique ID of the created subscription. This ID is used for managing the subscription later. ```json { "id": "1234567890abc" } ``` -------------------------------- ### Response Sample for Moving an Image (JSON) Source: https://www.pushcut.io/webapi/index A successful response after moving an image, typically returning the new name of the image. Other responses indicate errors like bad request, not found, or conflict. ```json { "name": "string" } ``` -------------------------------- ### List Logged Notifications Source: https://www.pushcut.io/webapi/index Retrieves a list of all currently running automation servers. Requires an API key for authorization. Returns a 200 success code with a list of notification objects. ```HTTP GET /v2/loggedNotifications Host: api.pushcut.io Authorization: Bearer YOUR_API_KEY ``` -------------------------------- ### PUT /v1/images/{imageName} Source: https://www.pushcut.io/webapi/index Uploads an image for use by Pushcut. This image will be synced to the app. All images will be converted to a PNG. ```APIDOC ## PUT /v1/images/{imageName} ### Description Uploads an image for use by Pushcut. This image will be synced to the app. All images will be converted to a PNG. ### Method PUT ### Endpoint https://api.pushcut.io/v1/images/{imageName} ### Parameters #### Path Parameters - **imageName** (string) - Required - Example: MyIconImage Name #### Query Parameters None #### Request Body - **image** (binary) - Required - The image file (PNG, JPEG, GIF). ### Request Example (Binary image upload - no JSON example) ### Response #### Success Response (204) Success #### Error Responses - **400** Bad Request - **401** Unauthorized - **404** Not Found ``` -------------------------------- ### POST /v1/images/{imageName}/move Source: https://www.pushcut.io/webapi/index Moves a previously-uploaded image. ```APIDOC ## POST /v1/images/{imageName}/move ### Description Moves a previously-uploaded image. ### Method POST ### Endpoint https://api.pushcut.io/v1/images/{imageName}/move ### Parameters #### Path Parameters - **imageName** (string) - Required - Example: MyIconImage Name #### Query Parameters None #### Request Body - **destination** (string) - Required - The new name of the image. Must differ from the original name. ### Request Example ```json { "destination": "string" } ``` ### Response #### Success Response (200) - **name** (string) - The new name of the image. #### Response Example ```json { "name": "string" } ``` #### Error Responses - **400** Bad Request - **401** Unauthorized - **404** Not Found - **409** Conflict. Indicates that a file at the destination already exists (i.e. there is already an image with this name) - **422** Unprocessable Entity ``` -------------------------------- ### Callback Payload Sample for Online Action (JSON) Source: https://www.pushcut.io/webapi/index The structure of the payload sent to your webhook URL when an online action is executed. It includes action details, optional input, and timestamps. ```json { "id": "1234567890abc", "actionName": "My Online Action", "input": "Optional input", "timestamp": 1564579405, "isoTimestamp": "2019-07-31T13:23:25Z" } ``` -------------------------------- ### POST /v1/cancelExecution Source: https://www.pushcut.io/webapi/index Cancels a scheduled Automation Server action request. ```APIDOC ## POST /v1/cancelExecution ### Description Cancels an Automation Server requests that was scheduled for future execution. ### Method POST ### Endpoint https://api.pushcut.io/v1/cancelExecution ### Parameters #### Query Parameters - **identifier** (string) - Required - Example: `identifier=MyIdentifier` - Identifier of the request. ### Responses #### Success Response (200) Success #### Error Responses - **400** Bad Request - **401** Unauthorized #### Response Example (400) ```json { "error": "Something went wrong.", "detailCode": "INTERNAL_ERROR" } ``` ``` -------------------------------- ### POST /v1/subscriptions Source: https://www.pushcut.io/webapi/index Adds a webhook that is triggered when an online action is executed in Pushcut. If isLocalUrl is set to true, your device will trigger the webhook on its local network. ```APIDOC ## POST /v1/subscriptions ### Description Adds a webhook that is triggered when an online action is executed in Pushcut. If _isLocalUrl_ is set to true, your device will trigger the webhook on its local network. ### Method POST ### Endpoint https://api.pushcut.io/v1/subscriptions ### Parameters #### Query Parameters None #### Request Body - **actionName** (string) - Required - A unique name to identify the online action. - **url** (string) - Required - The URL to which EventData will be posted to. - **isLocalUrl** (boolean) - Optional - If set to true, the device will call the webhook on its local network. ### Request Example ```json { "actionName": "My Online Action", "url": "https://my-server/pushcut-hook", "isLocalUrl": true } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the subscription. #### Response Example ```json { "id": "1234567890abc" } ``` #### Error Responses - **400** Bad Request - **401** Unauthorized ``` -------------------------------- ### Send Smart Notification API Source: https://www.pushcut.io/webapi/index Sends a smart notification to your devices, allowing for dynamic content and customization. ```APIDOC ## POST /v1/notifications/{notificationName} ### Description Sends a smart notification to your devices. You can extend and customize the defined notification by providing dynamic content. ### Method POST ### Endpoint https://api.pushcut.io/v1/notifications/{notificationName} ### Parameters #### Path Parameters - **notificationName** (string) - Required - The name of the notification to send. #### Query Parameters - **api_key** (string) - Required - Your Pushcut API key for authorization. #### Request Body - **id** (string) - Optional - Identifier that uniquely identifies a notification on a device. If provided, the new notification will replace any existing notification with the same id. - **text** (string) - Optional - Text that is used instead of the one defined in the app. - **title** (string) - Optional - Title that is used instead of the one defined in the app. - **input** (string) - Optional - Value that is passed as input to the notification action. - **defaultAction** (object) - Optional - The default action for the notification. - **name** (string) - Required - Name of the action. - **input** (string) - Optional - Input for the action. - **url** (string) - Optional - URL to open. - **homekit** (string) - Optional - HomeKit action to perform. - **runOnServer** (boolean) - Optional - Whether to run the action on the server. - **online** (string) - Optional - Online service action to trigger (e.g., Zapier). - **urlBackgroundOptions** (object) - Optional - Options for background URL requests. - **httpMethod** (string) - Required - HTTP method (e.g., POST). - **httpContentType** (string) - Required - Content type (e.g., application/json). - **httpBody** (string) - Optional - Request body. - **httpHeader** (array) - Optional - Array of HTTP headers. - **key** (string) - Required - Header key. - **value** (string) - Required - Header value. - **shortcut** (string) - Optional - Name of an iOS shortcut to run. - **image** (string) - Optional - Name of an imported image or a URL to an image. - **imageData** (string) - Optional - Base64-encoded image data. Overrides the `image` property. - **sound** (string) - Optional - Name of a sound to use (e.g., "none", "subtle", "loud"). - **actions** (array) - Optional - List of dynamic actions to add or merge with static ones. - **name** (string) - Required - Name of the action. - **input** (string) - Optional - Input for the action. - **url** (string) - Optional - URL to open. - **homekit** (string) - Optional - HomeKit action to perform. - **runOnServer** (boolean) - Optional - Whether to run the action on the server. - **online** (string) - Optional - Online service action to trigger (e.g., Zapier). - **urlBackgroundOptions** (object) - Optional - Options for background URL requests. - **httpMethod** (string) - Required - HTTP method (e.g., POST). - **httpContentType** (string) - Required - Content type (e.g., application/json). - **httpBody** (string) - Optional - Request body. - **httpHeader** (array) - Optional - Array of HTTP headers. - **key** (string) - Required - Header key. - **value** (string) - Required - Header value. - **shortcut** (string) - Optional - Name of an iOS shortcut to run. - **keepNotification** (boolean) - Optional - Whether to keep the notification after the action is performed. - **devices** (array) - Optional - List of devices to send the notification to (defaults to all devices). - **device** (string) - Required - The identifier of the device. - **isTimeSensitive** (boolean) - Optional - Whether the notification should be marked as "Time-Sensitive". - **threadId** (string) - Optional - The "thread-id" for grouping related notifications. - **delay** (string) - Optional - Duration in which this request should be executed (e.g., "10s", "15m", "6h"). Requires Server Extended subscription. ### Request Example ```json { "id": "1snurqjF5vLxoUq09Q358", "text": "My dynamic text", "title": "My dynamic title", "input": "My dynamic input", "defaultAction": { "name": "Open Website", "input": "string", "url": "https://www.pushcut.io", "homekit": "Close Garage Door", "runOnServer": true, "online": "Zapier: Add Timer", "urlBackgroundOptions": { "httpMethod": "POST", "httpContentType": "application/json", "httpBody": "{\"value\": \"[\input\\]\"}", "httpHeader": [ { "key": "API-Key", "value": "SomeKey" } ] }, "shortcut": "My Shortcut" }, "image": "MyFunnyNotificationImage", "imageData": "string", "sound": "subtle", "actions": [ { "name": "A Dynamic Action", "input": "string", "url": "https://www.pushcut.io/", "homekit": "Close Garage Door", "runOnServer": true, "online": "Zapier: Add Timer", "urlBackgroundOptions": { "httpMethod": "POST", "httpContentType": "application/json", "httpBody": "{\"value\": \"[\input\\]\"}", "httpHeader": [ { "key": "API-Key", "value": "SomeKey" } ] }, "shortcut": "My Shortcut", "keepNotification": true } ], "devices": [ "string" ], "isTimeSensitive": true, "threadId": "string", "delay": "1h 30m" } ``` ### Responses #### Success Response (200) - **id** (string) - The identifier of the sent notification. - **notificationId** (string) - The unique ID of the notification. #### Success Response (202) Notification was successfully scheduled. #### Response Example (200) ```json { "id": "1snurqjF5vLxoUq09Q358", "notificationId": "string" } ``` #### Error Response (400) Bad Request #### Error Response (401) Unauthorized #### Error Response (404) Not Found ``` -------------------------------- ### Move an Image (API Call) Source: https://www.pushcut.io/webapi/index Moves a previously uploaded image to a new name. The request body specifies the new destination name. Requires an API key and is subject to conflict errors if the destination name already exists. ```bash POST /v1/images/{imageName}/move HTTP/1.1 Host: api.pushcut.io Authorization: Bearer YOUR_API_KEY Content-Type: application/json { "destination": "NewImageName" } ``` -------------------------------- ### Subscribe to an Online Action (JSON) Source: https://www.pushcut.io/webapi/index Adds a webhook that is triggered when an online action is executed in Pushcut. The 'isLocalUrl' parameter determines if the webhook is called on the local network. Requires an API key for authorization. ```json { "actionName": "My Online Action", "url": "https://my-server/pushcut-hook", "isLocalUrl": true } ``` -------------------------------- ### Move an Image (JSON Payload) Source: https://www.pushcut.io/webapi/index Defines the destination for moving an existing image. The destination name must be different from the original. This operation requires an API key. ```json { "destination": "string" } ``` -------------------------------- ### Cancel Scheduled Automation Server Action Source: https://www.pushcut.io/webapi/index Cancels a previously scheduled Automation Server request using its identifier. Requires an API key for authorization. Returns a 200 success code on cancellation. ```HTTP POST /v1/cancelExecution Host: api.pushcut.io Authorization: Bearer YOUR_API_KEY Content-Type: application/json { "identifier": "MyIdentifier" } ``` -------------------------------- ### Send Smart Notification (API Request) Source: https://www.pushcut.io/webapi/index Sends a customizable smart notification to specified devices. Supports dynamic content, actions, images, sounds, and scheduling. Requires API key authorization. The request body is a JSON object conforming to NotificationDataScheduledNotificationData schema. ```json { "id": "1snurqjF5vLxoUq09Q358", "text": "My dynamic text", "title": "My dynamic title", "input": "My dynamic input", "defaultAction": { "name": "Open Website", "input": "string", "url": "https://www.pushcut.io", "homekit": "Close Garage Door", "runOnServer": true, "online": "Zapier: Add Timer", "urlBackgroundOptions": { "httpMethod": "POST", "httpContentType": "application/json", "httpBody": "{\"value\": \"[\\input\\]\"}", "httpHeader": [ { "key": "API-Key", "value": "SomeKey" } ] }, "shortcut": "My Shortcut" }, "image": "MyFunnyNotificationImage", "imageData": "string", "sound": "subtle", "actions": [ { "name": "A Dynamic Action", "input": "string", "url": "https://www.pushcut.io/", "homekit": "Close Garage Door", "runOnServer": true, "online": "Zapier: Add Timer", "urlBackgroundOptions": { "httpMethod": "POST", "httpContentType": "application/json", "httpBody": "{\"value\": \"[\\input\\]\"}", "httpHeader": [ { "key": "API-Key", "value": "SomeKey" } ] }, "shortcut": "My Shortcut", "keepNotification": true } ], "devices": [ "string" ], "isTimeSensitive": true, "threadId": "string", "delay": "1h 30m" } ``` -------------------------------- ### DELETE /v1/subscriptions/{subscriptionId} Source: https://www.pushcut.io/webapi/index Deletes a webhook subscription. ```APIDOC ## DELETE /v1/subscriptions/{subscriptionId} ### Description Deletes a webhook subscription. ### Method DELETE ### Endpoint https://api.pushcut.io/v1/subscriptions/{subscriptionId} ### Parameters #### Path Parameters - **subscriptionId** (string) - Required - Id that was returned when creating the subscription. #### Query Parameters None #### Request Body None ### Response #### Success Response (200) Success #### Error Responses - **401** Unauthorized ``` -------------------------------- ### Send Smart Notification Response (API) Source: https://www.pushcut.io/webapi/index Handles the response from sending a smart notification. A successful request returns a 200 or 202 status code with a JSON body containing the notification 'id' and 'notificationId'. ```json { "id": "1snurqjF5vLxoUq09Q358", "notificationId": "string" } ``` -------------------------------- ### Remove an Online Action Subscription (API Call) Source: https://www.pushcut.io/webapi/index Deletes a webhook subscription using its unique ID. This operation requires authorization with an API key. ```bash DELETE /v1/subscriptions/{subscriptionId} HTTP/1.1 Host: api.pushcut.io Authorization: Bearer YOUR_API_KEY ``` -------------------------------- ### Delete Submitted Notifications Source: https://www.pushcut.io/webapi/index Deletes submitted notifications for specified devices. Supports filtering by 'onlyScheduled'. Requires an API key for authorization. Returns a 204 success code on completion. ```HTTP DELETE /v1/submittedNotifications/{notificationId}?devices=device1,device2&onlyScheduled=true Host: api.pushcut.io Authorization: Bearer YOUR_API_KEY ``` -------------------------------- ### Cancel Notification API Source: https://www.pushcut.io/webapi/index Attempts to remove or cancel a previously submitted notification. ```APIDOC ## DELETE /v1/notifications/{notificationId} ### Description Attempts to remove/cancel a previously-submitted notification. ### Method DELETE ### Endpoint https://api.pushcut.io/v1/notifications/{notificationId} ### Parameters #### Path Parameters - **notificationId** (string) - Required - The unique ID of the notification to cancel. #### Query Parameters - **api_key** (string) - Required - Your Pushcut API key for authorization. ### Responses #### Success Response (200) Notification successfully cancelled. #### Error Response (401) Unauthorized #### Error Response (404) Notification not found ``` -------------------------------- ### DELETE /v1/submittedNotifications/{notificationId} Source: https://www.pushcut.io/webapi/index Cancels a submitted notification. You can specify which devices to cancel for and whether to only cancel scheduled notifications. ```APIDOC ## DELETE /v1/submittedNotifications/{notificationId} ### Description Cancels a submitted notification. You can specify which devices to cancel for and whether to only cancel scheduled notifications. ### Method DELETE ### Endpoint https://api.pushcut.io/v1/submittedNotifications/{notificationId} ### Parameters #### Path Parameters - **notificationId** (string) - Required - Notification ID #### Query Parameters - **devices** (string) - Optional - Device(s) for which to cancel notifications. Supports lists using the syntax `devices[]=device1&devices[]=device2` or separated by commas. - **onlyScheduled** (boolean) - Optional - Default: false - Where to remove only scheduled notifications (i.e. not remove notifications that were already delivered). ### Responses #### Success Response (204) Success #### Error Responses - **400** Bad Request - **401** Unauthorized #### Response Example (400) ```json { "error": "Something went wrong.", "detailCode": "INTERNAL_ERROR" } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.