Aller au contenu

Integrations

Ce contenu n’est pas encore disponible dans votre langue.

Apprise API is meant to be a single notification gateway. Instead of building direct webhooks to Discord, Slack, email, and SMS in every project, send to Apprise API and let it route the message.

If you want to…Recommended Approach
Avoid embedding Python in your applicationApprise API (Stateful or Stateless)
Keep notification logic out of your codebaseApprise API (Stateful)
Use Apprise as a simple HTTP gatewayApprise API (Stateless)
Send notifications from scripts or the command lineApprise CLI or Apprise Python Library
Stateless API Integration

If you cannot (or do not want to) store configuration server-side, you can also use stateless notifications:

  • POST /notify

Stateless calls include the destination Apprise URLs in the request payload.

See the endpoint reference for the full list of supported paths.

Stateful API Integration

For stateful notifications (recommended for most integrations), you call one endpoint:

  • POST /notify/{KEY}

Where {KEY} identifies a configuration saved on the server. Your client code stays small and stable, while the Apprise API instance holds the actual notification URLs and any routing tags.

Given:

  • scheme: http or https
  • host: the Apprise API hostname or IP
  • port: optional, omit for 80 (http) or 443 (https)
  • key: your saved configuration key

Construct:

  • BASE = {scheme}://{host}
  • If a non-default port is used: BASE = {scheme}://{host}:{port}
  • NOTIFY = {BASE}/notify/{key}

Apprise API accepts both form and JSON payloads in many cases. For integrations, JSON is usually easiest.

  • body (required): message content
  • title (optional): message title
  • type (optional): info (default), success, warning, or failure
  • format (optional): text (default), markdown, or html
  • tag (optional, stateful): route to a subset of saved URLs

Tags are only meaningful for stateful calls (/notify/{KEY}), because the server already knows which URLs belong to that key.

Tag matching logic:

  • Space, +, or & means AND (intersection)
  • Comma or | means OR (union)

Examples:

  • "devops,admin" notifies URLs tagged devops OR admin
  • "devops critical" notifies URLs tagged devops AND critical

To send attachments, use multipart/form-data.

  • Use attach (recommended) or attachment as the field name
  • The attachment value can be:
    • a local file upload
    • a remote URL that Apprise API downloads and forwards

If a third-party tool cannot change its JSON keys, Apprise API can map incoming fields to Apprise fields using query parameters.

Syntax:

  • ?:incoming_field=apprise_field

Example:

  • A tool sends {"message": "Server Down"}
  • Map it to Apprise body with ?:message=body

See the API usage documentation for more details.

Terminal window
# Minimal stateless notification using curl
curl -X POST "http://localhost:8000/notify" \
-H "Content-Type: application/json" \
-d '{
"urls": [
"discord://TOKEN/CHANNEL",
"mailto://user:pass@example.com"
],
"body": "Hello from Apprise (stateless)"
}'
Terminal window
# Stateless notification with an attachment
curl -X POST "http://localhost:8000/notify" \
-F 'payload={
"urls": ["discord://TOKEN/CHANNEL"],
"title": "Build Complete",
"body": "Artifact attached"
};type=application/json' \
-F "attach=@/path/to/file.txt"
Questions or Feedback?

Documentation

Notice a typo or an error? Report it or contribute a fix .

Technical Issues

Having trouble with the code? Open an issue on GitHub:

Made with love from Canada