Bark Push Notification
Send push notifications to iOS via Bark API.
Setup
Bark API endpoint: https://api.day.app/{device_key}
Device key can be:
- Set via environment variable:
BARK_KEY - Provided in each request
Sending Notifications
Simple Push (GET)
curl "https://api.day.app/$BARK_KEY/标题/内容"
With Parameters (GET)
curl "https://api.day.app/$BARK_KEY/标题/内容?badge=1&sound=minuet"
JSON Push (POST)
curl -X POST "https://api.day.app/$BARK_KEY" \
-H 'Content-Type: application/json' \
-d '{"title": "标题", "body": "内容", "badge": 1}'
Parameters
| 参数 | 说明 |
|---|---|
| title | 推送标题 |
| body | 推送内容 |
| subtitle | 副标题 |
| badge | 角标数字 |
| sound | 铃声名称 |
| image | 图片URL |
| url | 点击跳转URL |
| group | 分组 |
| level | 中断级别 (critical/active/timeSensitive/passive) |
Common Sounds
- default
- minut
- alarm
- bird
- bell
- cha_ching
- doorbell
- droplet
- horn
- light
- rimba
- siren
- spinebreak
- spring
- streak
- sword
- tip