{
  "openapi": "3.0.1",
  "info": {
    "title": "Push Notification",
    "description": "Send push notifications to your phone or desktop through ntfy, free and with no account. Run it directly, or attach it as an integration to any Actor to get a push when a run succeeds or fails.",
    "version": "0.1",
    "x-build-id": "cQeC9mE7J49786pP8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/petrpatek~push-notification/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-petrpatek-push-notification",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/petrpatek~push-notification/runs": {
      "post": {
        "operationId": "runs-sync-petrpatek-push-notification",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/petrpatek~push-notification/run-sync": {
      "post": {
        "operationId": "run-sync-petrpatek-push-notification",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "topic"
        ],
        "properties": {
          "topic": {
            "title": "Topic",
            "pattern": "^[-_A-Za-z0-9]{1,64}$",
            "type": "string",
            "description": "The ntfy topic to publish to. Subscribe to the same topic in the ntfy app. On the public ntfy.sh server anyone who knows the topic can read it, so pick a hard-to-guess name."
          },
          "message": {
            "title": "Message",
            "type": "string",
            "description": "The notification body. Leave empty when the Actor runs as an integration: it then writes the run's status, duration and status message. You can use {{status}}, {{actorName}}, {{runId}}, {{duration}}, {{runUrl}}, {{datasetId}} and {{eventType}}."
          },
          "title": {
            "title": "Title",
            "type": "string",
            "description": "The notification title. As an integration it defaults to \"{{actorName}}: run {{status}}\". The same {{variables}} as in the message work here."
          },
          "priority": {
            "title": "Priority",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "1 (min) to 5 (max); 3 is ntfy's default. As an integration a failed, aborted or timed-out run is sent at 4 unless you set this."
          },
          "tags": {
            "title": "Tags",
            "type": "array",
            "description": "ntfy tags. A tag that is an emoji short code, such as warning or white_check_mark, shows as that emoji.",
            "items": {
              "type": "string"
            }
          },
          "click": {
            "title": "Click URL",
            "type": "string",
            "description": "Opened when the notification is tapped. As an integration it defaults to the run in Apify Console."
          },
          "server": {
            "title": "ntfy server",
            "type": "string",
            "description": "Your ntfy server, if you host one.",
            "default": "https://ntfy.sh"
          },
          "token": {
            "title": "Access token",
            "type": "string",
            "description": "An ntfy access token (tk_...) for a protected topic or a server that requires login."
          },
          "markdown": {
            "title": "Markdown",
            "type": "boolean",
            "description": "Render the message as Markdown in the ntfy web app.",
            "default": false
          },
          "icon": {
            "title": "Icon URL",
            "type": "string",
            "description": "A JPEG or PNG shown next to the notification on Android."
          },
          "attach": {
            "title": "Attachment URL",
            "type": "string",
            "description": "A file URL to attach, such as a screenshot or a report."
          },
          "filename": {
            "title": "Attachment file name",
            "type": "string",
            "description": "The name the attachment is shown under."
          },
          "delay": {
            "title": "Delay",
            "type": "string",
            "description": "Deliver later, for example 30m, 2h or tomorrow 10am. The public server keeps a delayed message for up to 3 days."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}