### Send Notification with Attachments (curl) Source: https://www.simplepush.io/api/index Provides examples of sending push notifications with various attachments using curl. Supports images, videos, GIFs, and RTSP livestreams. Attachments can be provided as direct URLs or as objects with thumbnail and video properties. ```curl curl https://simplepu.sh -d '{"key": "HuxgBB", "msg": "message", "attachments": ["https://upload.wikimedia.org/wikipedia/commons/e/ee/Sample_abc.jpg", "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4", "https://upload.wikimedia.org/wikipedia/commons/d/d3/Newtons_cradle_animation_book_2.gif"]}' ``` ```curl curl https://simplepu.sh -d '{"key": "HuxgBB", "msg": "message", "attachments": [{"thumbnail": "https://upload.wikimedia.org/wikipedia/commons/e/ee/Sample_abc.jpg", "video": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4"]}' ``` ```curl curl https://simplepu.sh -d '{"key": "HuxgBB", "msg": "message", "attachments": ["rtsp://rtspstream.com/pattern"]}' ``` -------------------------------- ### Send Message via GET Request (curl) Source: https://www.simplepush.io/api/index Illustrates sending push notifications using GET requests with curl. Different URL structures are used to include a message, title, and event. Requires a valid API key. ```curl curl https://simplepu.sh/HuxgBB/message ``` ```curl curl https://simplepu.sh/HuxgBB/title/message ``` ```curl curl https://simplepu.sh/HuxgBB/title/message/event/event ``` -------------------------------- ### Actions API - GET Actions Source: https://www.simplepush.io/api/index Send an actionable notification that triggers HTTP GET requests when an action is selected. ```APIDOC ## POST / (GET Actions) ### Description Send an actionable push notification where selecting an action triggers an HTTP GET request to a specified URL. ### Method POST ### Endpoint https://simplepu.sh ### Parameters #### Request Body - **key** (string) - Required - The key that identifies your device(s) - **message** (string) - Required - The message for your notification - **title** (string) - Optional - An optional title for your notification - **actions** (array of objects) - Required - An array of action objects, each containing a `name` (string) and a `url` (string) for the GET request. ### Request Example ```json { "key": "HuxgBB", "title": "title", "msg": "message", "actions": [ {"name": "yes", "url": "https://your.domain/yes"}, {"name": "no", "url": "https://your.domain/no"} ] } ``` ### Response #### Success Response (200) _No specific success response body is detailed for this request._ ``` -------------------------------- ### Send GET Actionable Notification (curl) Source: https://www.simplepush.io/api/index Illustrates sending an actionable notification where each action triggers an HTTP GET request to a specified URL. Actions are defined as an array of objects, each with a name and a URL. ```curl curl https://simplepu.sh -d '{"key": "HuxgBB", "title": "title", "msg": "message", "actions": [{"name": "yes", "url": "https://your.domain/yes"}, {"name": "no", "url": "https://your.domain/no"}]}' ``` -------------------------------- ### Message API - GET Request Source: https://www.simplepush.io/api/index Send a push notification using a GET request. The endpoint structure varies based on the included parameters. ```APIDOC ## GET //[title]/[message]/[event]/[event] ### Description Send a push notification using a GET request. The endpoint structure varies based on the included parameters (key, message, title, event). ### Method GET ### Endpoint https://simplepu.sh//[title]/[message]/[event]/[event] ### Parameters #### Path Parameters - **key** (string) - Required - The key that identifies your device(s) - **message** (string) - Required - The message for your notification - **title** (string) - Optional - An optional title for your notification - **event** (string) - Optional - An optional event which modifies the behavior of your notification ### Request Example #### Simple message ```bash curl https://simplepu.sh/HuxgBB/message ``` #### Message with title ```bash curl https://simplepu.sh/HuxgBB/title/message ``` #### Message with title and event ```bash curl https://simplepu.sh/HuxgBB/title/message/event/event ``` ### Response #### Success Response (200) _No specific success response body is detailed for this request._ ``` -------------------------------- ### Send Feedback Actionable Notification (curl) Source: https://www.simplepush.io/api/index Shows how to send an actionable notification with predefined feedback actions ('yes', 'no') using a POST request with curl. The response includes a feedback ID for later querying. ```curl curl https://simplepu.sh -d '{"key": "HuxgBB", "title": "title", "msg": "message", "actions": ["yes", "no"]}' ``` -------------------------------- ### Query Feedback API (curl) Source: https://www.simplepush.io/api/index Demonstrates how to query the Feedback API to check the status of a selected action using a feedback ID obtained from sending an actionable notification. Requires the feedback ID and a base URL. ```curl curl https://simplepu.sh/1/feedback/5e885b1d33c547bbac78bda8cdaf7be7 ``` -------------------------------- ### Feedback API Source: https://www.simplepush.io/api/index Query the Feedback API to retrieve the status and details of a selected action from a feedback action notification. ```APIDOC ## GET //feedback/ ### Description Query the Feedback API to check if an action was selected for a given `feedbackId`. ### Method GET ### Endpoint https://simplepu.sh//feedback/ ### Parameters #### Path Parameters - **feedback_id** (string) - Required - The feedback ID obtained from sending a feedback action notification. ### Request Example ```bash curl https://simplepu.sh/1/feedback/5e885b1d33c547bbac78bda8cdaf7be7 ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the query was successful. - **action_selected** (string) - The name of the action that was selected. - **action_selected_at** (integer) - Timestamp when the action was selected. - **action_delivered_at** (integer) - Timestamp when the action was delivered. #### Response Example ```json { "success": true, "action_selected": "yes", "action_selected_at": 1646869812, "action_delivered_at": 1646869812 } ``` ``` -------------------------------- ### Send Message via POST Request (curl) Source: https://www.simplepush.io/api/index Demonstrates sending a push notification using a POST request with curl. Parameters can be sent either as URL-encoded form data or as a JSON object. Requires a valid API key, message, and optionally a title and event. ```curl curl --data 'key=HuxgBB&title=title&msg=message&event=event' https://simplepu.sh ``` ```curl curl https://simplepu.sh -d '{"key": "HuxgBB", "title": "title", "msg": "message", "event": "event"}' ``` -------------------------------- ### Actions API - Feedback Actions Source: https://www.simplepush.io/api/index Send an actionable notification with feedback actions. A feedback ID is returned upon sending. ```APIDOC ## POST / (Feedback Actions) ### Description Send an actionable push notification with predefined feedback actions. A `feedbackId` is returned, which can be used to query the selected action. ### Method POST ### Endpoint https://simplepu.sh ### Parameters #### Request Body - **key** (string) - Required - The key that identifies your device(s) - **message** (string) - Required - The message for your notification - **title** (string) - Optional - An optional title for your notification - **actions** (array of strings) - Required - An array of strings representing the feedback actions (e.g., `["yes", "no"]`). ### Request Example ```json { "key": "HuxgBB", "title": "title", "msg": "message", "actions": ["yes", "no"] } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the status of the request (e.g., "OK"). - **feedbackId** (string) - A unique identifier for the actionable notification. #### Response Example ```json { "status": "OK", "feedbackId": "5e885b1d33c547bbac78bda8cdaf7be7" } ``` ``` -------------------------------- ### Message API - POST Request Source: https://www.simplepush.io/api/index Send a push notification using a POST request. Parameters can be sent as form data or JSON. ```APIDOC ## POST /
### Description Send a push notification with a message, and optionally a title and event.
Parameters can be encoded as form data or JSON. ### Method POST ### Endpoint https://simplepu.sh ### Parameters #### Query Parameters - **key** (string) - Required - The key that identifies your device(s) - **message** (string) - Required - The message for your notification - **title** (string) - Optional - An optional title for your notification - **event** (string) - Optional - An optional event which modifies the behavior of your notification ### Request Example #### Form Data ```bash curl --data 'key=HuxgBB&title=title&msg=message&event=event' https://simplepu.sh ``` #### JSON ```json { "key": "HuxgBB", "title": "title", "msg": "message", "event": "event" } ``` ### Response #### Success Response (200) _No specific success response body is detailed for this request._ ``` -------------------------------- ### Attachments API Source: https://www.simplepush.io/api/index Send push notifications with various types of attachments, including pictures, videos, GIFs, and RTSP streams. ```APIDOC ## POST / (Attachments) ### Description Send a push notification with embedded attachments such as pictures, videos, or GIFs. Attachments can be provided as direct URLs or as objects with additional properties like thumbnails. ### Method POST ### Endpoint https://simplepu.sh ### Parameters #### Request Body - **key** (string) - Required - The key that identifies your device(s) - **msg** (string) - Required - The message for your notification - **attachments** (array) - Optional - An array of attachment URLs (strings) or attachment objects. - Attachment Object Structure: - **thumbnail** (string) - Optional - URL for the thumbnail image. - **video** (string) - Optional - URL for the video. - URL (string) - For non-video attachments like images or GIFs, or for RTSP streams. ### Request Example #### Multiple attachments (image, video, GIF) ```bash curl https://simplepu.sh -d '{"key": "HuxgBB", "msg": "message", "attachments": ["https://upload.wikimedia.org/wikipedia/commons/e/ee/Sample_abc.jpg", "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4", "https://upload.wikimedia.org/wikipedia/commons/d/d3/Newtons_cradle_animation_book_2.gif"]}' ``` #### Video with thumbnail ```bash curl https://simplepu.sh -d '{"key": "HuxgBB", "msg": "message", "attachments": [{"thumbnail": "https://upload.wikimedia.org/wikipedia/commons/e/ee/Sample_abc.jpg", "video": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4"}]}' ``` #### RTSP livestream (experimental) ```bash curl https://simplepu.sh -d '{"key": "HuxgBB", "msg": "message", "attachments": ["rtsp://rtspstream.com/pattern"]}' ``` ### Response #### Success Response (200) _No specific success response body is detailed for this request._ ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.