docs/en-us/tutorial.md
Open the APP and copy the test URL.
Modify the content and request this URL.
You can send a GET or POST request. If the request is successful, you will receive the push notification immediately.
The URL consists of the push key, parameter title, parameter subtitle, and parameter body. There are three combinations:
/:key/:body
/:key/:title/:body
/:key/:title/:subtitle/:body
curl https://api.day.app/your_key/body?group=groupName©=copyText
When manually appending parameters to the URL, please pay attention to URL encoding issues.
curl -X POST https://api.day.app/your_key \
-d'body=body&group=groupName©=copyText'
curl -X "POST" "https://api.day.app/your_key" \
-H 'Content-Type: application/json; charset=utf-8' \
-d $'{
"body": "Test Body",
"title": "Test Title",
"badge": 1,
"sound": "minuet",
"icon": "https://day.app/assets/images/avatar.jpg",
"group": "test",
"url": "https://mritd.com"
}'
curl -X "POST" "https://api.day.app/push" \
-H 'Content-Type: application/json; charset=utf-8' \
-d '{
"body": "Test Body",
"title": "Test Title",
"device_key": "your_key"
}'
VS Code:
{
"servers": {
"bark": {
"type": "http",
"url": "https://api.day.app/mcp/{key}"
}
}
}
Claude Code:
claude mcp add bark --transport http https://api.day.app/mcp/{key}
or
{
"mcpServers": {
"bark": {
"type": "http",
"url": "https://api.day.app/mcp/{key}"
}
}
}
Note: Replace {key} in the URL with your own key.
List of supported parameters, specific effects can be previewed in the APP.
| Parameter | Description |
|---|---|
| title | Push title |
| subtitle | Push subtitle |
| body | Push content |
| markdown | Push content with basic Markdown. When this is provided, the body field is ignored. |
| device_key | Device key |
| device_keys | Key array, used for batch push. Only supported in JSON requests. |
| level | Push interruption level. |
| critical: Important alert, will ring even in silent mode | |
| active:Default value, the system will immediately light up the screen to display the notification | |
| timeSensitive:Time-sensitive notification, can display the notification in focus mode. | |
| passive:Only adds the notification to the notification list, will not light up the screen. | |
| volume | Important alert notification volume, value range: 0-10, default is 5 if not passed |
| badge | Push badge, can be any number |
| call | Pass "1" to repeat the notification ringtone |
| autoCopy | Pass "1" to automatically copy the push content on iOS14.5 and below, on iOS14.5 and above, you need to long press or pull down the push to copy |
| copy | When copying the push, specify the content to copy, if this parameter is not passed, the entire push content will be copied. |
| sound | Can set different ringtones for the push |
| icon | Set a custom icon for the push, the set icon will replace the default Bark icon. |
| The icon will be automatically cached on the device, the same icon URL will only be downloaded once. | |
| image | Push image URL |
| group | Group messages, pushes will be displayed in the notification center by group. |
| You can also choose to view different groups in the history message list. | |
| ciphertext | Ciphertext for encrypted push |
| isArchive | Pass 1 to save the push, pass other values to not save the push, if not passed, it will be decided by the APP settings whether to save. |
| url | URL to jump to when the push is clicked, supports URL Scheme and Universal Link |
| action | When set to “alert”, tapping the push notification and opening the app will display an action popup. |
| id | When using the same ID value, it will update the corresponding push notification content |
| Requires Bark v1.5.2, bark-server v2.2.5 or above | |
| delete | Pass "1" to delete the notification from the system notification center and APP history, must be used with the id parameter |
| Requires "Background App Refresh" to be enabled in settings, otherwise it will not work. |
Bark supports sending notifications directly via Shortcuts.