[GH-ISSUE #1010] Overseerr JSON Fails with webook field email in payload body #706

Closed
opened 2026-05-07 00:26:46 +02:00 by BreizhHardware · 4 comments

Originally created by @undaunt on GitHub (Jan 24, 2024).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1010

🐞 Describe the bug
When attempting to test notifications from Overseerr to ntfy, if the line "email": "{{notifyuser_email}}", is included in the webhook template, ntfy responds with an error that email notifications are not enabled.

💻 Components impacted
ntfy server

💡 Screenshots and/or logs
Error sending webhook notification {"type":"TEST_NOTIFICATION","subject":"Test Notification","errorMessage":"Request failed with status code 400","response":{"code":40001,"http":400,"error":"e-mail notifications are not enabled","link":"https://ntfy.sh/docs/config/#e-mail-notifications"}}

🔮 Additional context
If I modify the template from the following:

{
    "topic": "mytopic",
    "notification_type": "{{notification_type}}",
    "subject": "{{subject}}",
    "message": "{{message}}",
    "image": "{{image}}",
    "email": "{{notifyuser_email}}",
    "username": "{{notifyuser_username}}",
    "avatar": "{{notifyuser_avatar}}",
    "{{media}}": {
        "media_type": "{{media_type}}",
        "tmdbId": "{{media_tmdbid}}",
        "imdbId": "{{media_imdbid}}",
        "tvdbId": "{{media_tvdbid}}",
        "status": "{{media_status}}",
        "status4k": "{{media_status4k}}"
    },
    "{{extra}}": []
}

to this

{
    "topic": "mytopic",
    "notification_type": "{{notification_type}}",
    "subject": "{{subject}}",
    "message": "{{message}}",
    "image": "{{image}}",
    "username": "{{notifyuser_username}}",
    "avatar": "{{notifyuser_avatar}}",
    "{{media}}": {
        "media_type": "{{media_type}}",
        "tmdbId": "{{media_tmdbid}}",
        "imdbId": "{{media_imdbid}}",
        "tvdbId": "{{media_tvdbid}}",
        "status": "{{media_status}}",
        "status4k": "{{media_status4k}}"
    },
    "{{extra}}": []
}

then it works without issue. For reference, my URL is https://ntfy.domain.com/?auth=bearertoken

Originally created by @undaunt on GitHub (Jan 24, 2024). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1010 :lady_beetle: **Describe the bug** When attempting to test notifications from Overseerr to ntfy, if the line `"email": "{{notifyuser_email}}",` is included in the webhook template, ntfy responds with an error that email notifications are not enabled. :computer: **Components impacted** ntfy server :bulb: **Screenshots and/or logs** `Error sending webhook notification {"type":"TEST_NOTIFICATION","subject":"Test Notification","errorMessage":"Request failed with status code 400","response":{"code":40001,"http":400,"error":"e-mail notifications are not enabled","link":"https://ntfy.sh/docs/config/#e-mail-notifications"}}` :crystal_ball: **Additional context** If I modify the template from the following: ``` { "topic": "mytopic", "notification_type": "{{notification_type}}", "subject": "{{subject}}", "message": "{{message}}", "image": "{{image}}", "email": "{{notifyuser_email}}", "username": "{{notifyuser_username}}", "avatar": "{{notifyuser_avatar}}", "{{media}}": { "media_type": "{{media_type}}", "tmdbId": "{{media_tmdbid}}", "imdbId": "{{media_imdbid}}", "tvdbId": "{{media_tvdbid}}", "status": "{{media_status}}", "status4k": "{{media_status4k}}" }, "{{extra}}": [] } ``` to this ``` { "topic": "mytopic", "notification_type": "{{notification_type}}", "subject": "{{subject}}", "message": "{{message}}", "image": "{{image}}", "username": "{{notifyuser_username}}", "avatar": "{{notifyuser_avatar}}", "{{media}}": { "media_type": "{{media_type}}", "tmdbId": "{{media_tmdbid}}", "imdbId": "{{media_imdbid}}", "tvdbId": "{{media_tvdbid}}", "status": "{{media_status}}", "status4k": "{{media_status4k}}" }, "{{extra}}": [] } ``` then it works without issue. For reference, my URL is https://ntfy.domain.com/?auth=bearertoken
BreizhHardware 2026-05-07 00:26:46 +02:00
  • closed this issue
  • added the
    🪲 bug
    label
Author
Owner

@wunter8 commented on GitHub (Jan 24, 2024):

It sounds like you didn't enable email notifications on your server

https://docs.ntfy.sh/config/#e-mail-notifications

<!-- gh-comment-id:1908144553 --> @wunter8 commented on GitHub (Jan 24, 2024): It sounds like you didn't enable email notifications on your server https://docs.ntfy.sh/config/#e-mail-notifications
Author
Owner

@undaunt commented on GitHub (Jan 24, 2024):

@wunter8 I'm attempting to post a JSON webhook to ntfy from Overseerr, nothing to do with emails. The templated email line above refers to the fact that my user record in Overseerr has an email. That's why I'm wondering if there's something in the code that makes ntfy think I want to send/receive an email when I do not, based on the JSON payload field name.

<!-- gh-comment-id:1908583651 --> @undaunt commented on GitHub (Jan 24, 2024): @wunter8 I'm attempting to post a JSON webhook to ntfy from Overseerr, nothing to do with emails. The templated email line above refers to the fact that my user record in Overseerr has an email. That's why I'm wondering if there's something in the code that makes ntfy think I want to send/receive an email when I do not, based on the JSON payload field name.
Author
Owner

@wunter8 commented on GitHub (Jan 24, 2024):

Since you're including an "email" field in the JSON body, ntfy thinks you want to forward the notification to that email address

I would expect both of the JSON bodies you posted above to fail, though, because right now ntfy will reject unknown fields (such as notification_type, username, avatar, etc.)

<!-- gh-comment-id:1908634235 --> @wunter8 commented on GitHub (Jan 24, 2024): Since you're including an "email" field in the JSON body, ntfy thinks you want to forward the notification to that email address I would expect both of the JSON bodies you posted above to fail, though, because right now ntfy will reject unknown fields (such as notification_type, username, avatar, etc.)
Author
Owner

@binwiederhier commented on GitHub (Feb 5, 2026):

This is not a bug, but rather wrong usage. If you are posting directly to the base URL, ntfy will interpret the body as JSON publishing and that will interpret the email field, see https://docs.ntfy.sh/publish/#publish-as-json

<!-- gh-comment-id:3850775681 --> @binwiederhier commented on GitHub (Feb 5, 2026): This is not a bug, but rather wrong usage. If you are posting directly to the base URL, ntfy will interpret the body as JSON publishing and that will interpret the email field, see https://docs.ntfy.sh/publish/#publish-as-json
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#706
No description provided.