HUB
Sign inSign up
apprise logo

caronc/apprise

By caronc

•Updated 1 day ago

Apprise API - Push Notifications that work with just about every platform!

Image
Message queues
API management
Web servers
67

5M+

caronc/apprise repository overview

⁠Apprise API

Take advantage of Apprise⁠ through your network with a user-friendly API.

  • Send notifications to more than 180+ services.
  • An incredibly lightweight gateway to Apprise.
  • A production-ready micro-service at your disposal.
  • A simple website to build, verify and test your configuration with.
  • Group your services with tags, then notify only the ones that need to know.
  • Private by design: messages go straight from your own server to each service, with no third party in between.
  • Reminders⁠ that send a notification later: once, on a repeating schedule, or on a public holiday.
  • An Android and iOS app⁠ to notify and manage your server from your phone.

Apprise API was designed to easily fit into existing (and new) ecosystems that are looking for a simple notification solution.

Paypal Discord Docker Pulls

Visit the Official Documentation⁠ site for more information on the Apprise API.

⁠Screenshots

The built-in Configuration Manager lets you save, review and test your notification setup from any browser:

Configuration

More screenshots: Review⁠ · Notifications⁠

⁠Apprise Mobile

Apprise Mobile is the Android and iOS companion app for Apprise API. Send a message, photo, or file to one destination, a group, or every destination you've configured. The app connects to your running Apprise API server; it is not a standalone notification service.

To connect, open the Configuration Manager in your browser and reveal the Apprise Mobile Quick Setup QR code on any saved configuration. Scanning it from the app adds your server and loads that configuration in one step. See the setup guide⁠ for details.

Screenshots: Dashboard⁠ · Reminders⁠ · URL Builder⁠ · Delivery Report⁠

Visit the Apprise Mobile⁠ page for more details, the privacy policy and terms.

⁠Installation

The following options should allow you to access the API at http://localhost:8000/ from your browser.

Supported architectures: amd64, arm/v7 and arm64. Tags:

  • latest: the latest stable release.
  • edge: the last push to the master branch.
⁠Docker
# Retrieve container
docker pull caronc/apprise:latest

# Start it up
docker run --name apprise \
   -p 8000:8000 \
   --user "$(id -u):$(id -g)" \
   -v /path/to/local/config:/config \
   -v /path/to/local/plugin:/plugin \
   -v /path/to/local/attach:/attach \
   -e APPRISE_STATEFUL_MODE=simple \
   -e APPRISE_WORKER_COUNT=1 \
   -e APPRISE_DEFAULT_FORMAT=text \
   -e TZ=America/Toronto \
   -d caronc/apprise:latest
  • /config holds your saved configuration and reminders. Persistent storage lives under /config/store, so one volume is enough.
  • /plugin is optional and holds your own custom Apprise plugins.
  • /attach holds uploaded attachments.
  • /tmp holds temporary files and is suitable for tmpfs in hardened deployments.

All logs go to stdout and stderr; use docker logs to read them.

⁠Docker Compose
services:
  apprise:
    image: caronc/apprise:latest
    container_name: apprise
    user: "${PUID:-1000}:${PGID:-1000}"
    ports:
      - "8000:8000"
    environment:
      APPRISE_STATEFUL_MODE: simple
      APPRISE_WORKER_COUNT: "1"
      APPRISE_DEFAULT_FORMAT: "text"
      TZ: America/Toronto
    volumes:
      - ./config:/config
      - ./plugin:/plugin
      - ./attach:/attach

For a locked-down setup (read_only, cap_drop: ALL, tmpfs for /tmp), see Hardened Deployments⁠.

⁠Apprise URLs

📣 To send a notification, you first need one or more Apprise URLs⁠ for the services you want to use. Visit https://appriseit.com/services/⁠ to see the ever-growing list.

⁠API Details

⁠Health Checks
PathMethodDescription
/statusGETReturns 200 when the server is healthy and 417 when there is a problem. Set Accept to application/json or text/plain for the output you prefer.
⁠Stateless Solution
PathMethodDescription
/notify/POSTSends notifications to the urls in the payload, or to APPRISE_STATELESS_URLS when none are given.
⁠Persistent (Stateful) Storage Solution
PathMethodDescription
/add/{KEY}POSTSaves Apprise configuration (config + format) or a set of urls.
/del/{KEY}POSTRemoves the configuration (and its login).
/move/{KEY}POSTMoves the configuration to a new Config ID given in to.
/get/{KEY}POSTReturns the saved configuration. Works directly with the Apprise CLI and AppriseConfig(). Alias: /cfg/{KEY}.
/notify/{KEY}POSTSends notifications through the saved configuration. Use tag to pick destinations.
/reminder/{KEY}GET/POSTLists or adds reminders⁠.
/json/urls/{KEY}GETReturns the URLs and tags saved under the key. Add privacy=1 to hide secrets.
/status/{KEY}GETReturns /status, protected by the key's credentials.
/auth/{KEY}GET/POST/DELETEViews, sets or removes the key's login and access mode.

Every stateful endpoint also accepts the Config ID in an X-Apprise-Config-ID header, which keeps it out of the URL.

⁠Other Endpoints
PathMethodDescription
/detailsGETOpens a page that builds Apprise URLs for this server. Use Accept: application/json for the full service list.
/metricsGETPrometheus endpoint for basic metrics.
⁠Notification Payload

Both /notify/ and /notify/{KEY} accept form or JSON payloads:

  • body: Your message. Optional when an attachment is provided.
  • title: An optional title.
  • type: info, success, warning or failure. Defaults to info.
  • format: text, markdown or html.
  • tag: Select saved destinations by tag (stateful only).
  • attach: One or more files or web URLs to attach.
  • template: Values for a saved YAML configuration written with ${NAME} markers (stateful only).

You can also send the message as the whole request body with Content-Type: text/plain, text/markdown or text/html, and set the rest with the X-Apprise-Title, X-Apprise-Type, X-Apprise-Tag and X-Apprise-Template headers.

Add ?stream=yes (or Accept: text/event-stream) to watch delivery progress live.

⁠Example Usage
# Stateless notification
curl -X POST -d 'urls=mailto://user:[email protected]&body=test message' \
    http://localhost:8000/notify

# Stateless notification using JSON
curl -X POST -H "Content-Type: application/json" \
    -d '{"urls": "mailto://user:[email protected]", "body":"test message"}' \
    http://localhost:8000/notify

# Stateful notification via {KEY}
curl -X POST -d "body=test message" http://localhost:8000/notify/abc123

# Notify only destinations tagged devops
curl -X POST -d 'tag=devops&body=test message' \
    http://localhost:8000/notify/abc123

# Send an attachment
curl -X POST -F 'body=test message' -F [email protected] \
    http://localhost:8000/notify/abc123

# Plain text body with headers
curl -X POST -H "Content-Type: text/plain" \
    -H "X-Apprise-Title: Deployment Status" \
    -H "X-Apprise-Tag: devops" \
    --data-raw 'Deployment completed' \
    http://localhost:8000/notify/abc123

# Keep the Config ID out of the URL
curl -X POST -H "X-Apprise-Config-ID: abc123" \
    -d "body=test message" http://localhost:8000/notify
⁠Reminders

Save a notification now and let the server send it later. A reminder can go out once, repeat on a schedule (every weekday at 9:00, every second Tuesday, the first of each month), or arrive on a public holiday every year. Create, pause and test them from the Reminders tab, the mobile app, or the API:

# Every weekday at 9:00 Toronto time, sent to the 'devops' tag of 'abc123'
curl -X POST -H "Content-Type: application/json" \
    -d '{"body": "Stand-up in 5 minutes", "tag": "devops",
         "when": {"tz": "America/Toronto", "cron": "0 0 9 * * Mon-Fri"}}' \
    http://localhost:8000/reminder/abc123

See Reminders⁠ for every option, including attachments and holidays.

⁠Authentication

Apprise API can protect its endpoints with HTTP Basic Auth:

docker run --name apprise \
   -p 8000:8000 \
   -v /path/to/local/config:/config \
   -e APPRISE_AUTH_REQUIRED=yes \
   -e APPRISE_USER=admin \
   -e APPRISE_PASSWORD=your-password-here \
   -d caronc/apprise:latest
  • The administrator can access and manage every Config ID.
  • Each Config ID can have its own login, so people only reach their own configuration.
  • Each Config ID has an access mode: user, locked, public or disabled. locked and public require a specific tag when notifying.
  • Only user access may send stateless notifications, and it must pass its X-Apprise-Config-ID header.
  • Use HTTPS whenever the server is reachable outside a trusted network, and set APPRISE_TRUSTED_ORIGINS.

See Authentication and Access Control⁠ for the full details.

⁠Environment Variables

Below are the most common settings. See the full list⁠ for everything else (storage, pruning, streaming, reminder limits, attachment rules, Kubernetes and nginx overrides).

VariableDescription
PUID / PGIDUser and group ID to run as when no --user is given. Defaults to 1000.
APPRISE_STATEFUL_MODEhash (default), simple (one plain file per Config ID in /config) or disabled.
APPRISE_STATELESS_MODEenabled (default) or disabled.
APPRISE_STATELESS_URLSDefault URLs for /notify/ calls that do not provide any.
APPRISE_CONFIG_LOCKSet to yes to hide configuration content and management from everyone except an authenticated administrator.
APPRISE_AUTH_REQUIREDSet to yes to enable Basic Auth. Defaults to no.
APPRISE_USER / APPRISE_PASSWORDThe administrator login (used with APPRISE_AUTH_REQUIRED=yes).
APPRISE_TRUSTED_ORIGINSComma separated origins allowed to make browser writes, such as https://apprise.example.com. Set this for HTTPS deployments.
STRICT_MODESet to yes to allow only known Apprise routes and add tighter login rate limits.
APPRISE_DEFAULT_FORMATtext, html or markdown for requests that do not set format.
APPRISE_DEFAULT_CONFIG_IDThe Config ID the website opens by default. Defaults to apprise.
APPRISE_DEFAULT_THEMEauto (default, follows the system setting), light or dark.
APPRISE_ADMINShows the configuration list in simple mode. Defaults to yes.
APPRISE_API_ONLYSet to yes to turn off the website and keep only the API.
APPRISE_REMINDER_ENABLEDSet to no to turn off reminders. Defaults to yes.
APPRISE_ALLOW_TEMPLATESSet to no to turn off ${NAME} template support. Defaults to yes.
APPRISE_TEMPLATE_<NAME>Fallback value for a ${NAME} marker in saved YAML configuration.
APPRISE_ASSET_<NAME>Sets any Apprise asset⁠ option, such as APPRISE_ASSET_APP_ID=Operations.
APPRISE_ATTACH_SIZEMaximum attachment size in MB. Defaults to 200 (max 500).
APPRISE_ALLOW_SERVICES / APPRISE_DENY_SERVICESLimit which Apprise services may be used.
APPRISE_WEBHOOK_URLA URL Apprise posts results to after each notification.
APPRISE_WORKER_COUNTNumber of workers. Defaults to (2 * CPUs) + 1.
APPRISE_WORKER_TIMEOUTWorker timeout in seconds. Defaults to 300.
APPRISE_BASE_URLThe subpath to use when hosting behind a proxy.
HTTP_PORTThe port to listen on inside the container. Defaults to 8000.
IPV4_ONLY / IPV6_ONLYListen on only IPv4 or only IPv6. Set one, not both.
LOG_LEVELCRITICAL, ERROR, WARNING, INFO or DEBUG.
TZYour timezone, such as America/Toronto. Defaults to Etc/UTC.

⁠Apprise Integration

⁠Apprise CLI
apprise -vv --body="test message" \
   --config=http://localhost:8000/get/{KEY}
⁠Python
import apprise

# Point our configuration to this API server
config = apprise.AppriseConfig()
config.add('http://localhost:8000/get/{KEY}')

# Create our Apprise instance and send a test message
a = apprise.Apprise()
a.add(config)
a.notify('test message')

For webhooks, custom plugins, Kubernetes, live streaming and the complete API reference, visit the Apprise API Repository⁠ and the Official Documentation⁠.

Tag summary

Content type

Image

Digest

sha256:8a7654c32…

Size

101.9 MB

Last updated

3 days ago

docker pull caronc/apprise