# Notification payload returning targetName as "undefined" for mentions

**URL:** <https://forum.social.plus/t/notification-payload-returning-targetname-as-undefined-for-mentions/1789>\
**Category:** Beta features\
**Created:** [September 5, 2025, 7:07am UTC](https://forum.social.plus/t/notification-payload-returning-targetname-as-undefined-for-mentions/1789 "2025-09-05T07:07:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abrown1916](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@abrown1916](https://forum.social.plus/u/abrown1916)\
**Post date:** [September 5, 2025, 7:07am UTC](https://forum.social.plus/t/notification-payload-returning-targetname-as-undefined-for-mentions/1789/1 "2025-09-05T07:07:16Z")

</div>

We are seeing an issue with the notification tray history endpoint where mention notifications sometimes return `targetName` as `”undefined”`, which also causes the `description` field to read awkwardly (e.g., “UserX has mentioned you in a comment in undefined”)

Here’s an example payload from our environment:

```auto
{
 "targetType": "comment",
  "verb": "mention",
  "targetName": "undefined",
  "parentTargetType": "post",
  "parentTargetId": "6862fd41020414d0a3f769d5",
  "targetId": "68b8a91565078eda567a5637",
  "actors": [{ "name": "TheWatchGuy" }],
  "description": "TheWatchGuy has mentioned you in a comment in undefined."
}

```

For comparison, here’s a case where it works correctly

```auto
{
  "targetType": "comment",
  "verb": "mention",
  "targetName": "Wrist Time",
  "parentTargetType": "post",
  "parentTargetId": "68a5d533de362aeea9ec6a01",
  "targetId": "68b88fac65078eda56775163",
  "actors": [{ "name": "MicroRotor7482" }],
  "description": "MicroRotor7482 has mentioned you in a comment in Wrist Time."
}

```

Questions:

1. Is `targetName` supposed to always resolve to the post/community name for mention notifications?
2. is there a recommended workaround to ensure `description` doesn’t come back with `”undefined”`?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [September 8, 2025, 7:16am UTC](https://forum.social.plus/t/notification-payload-returning-targetname-as-undefined-for-mentions/1789/2 "2025-09-08T07:16:13Z")

</div>

Hello @abrown1916 , Thank you for raising this issue and for providing the payload examples.

Our team suggests using the following endpoint instead for more reliable results:  
👉 [Notification Tray API](https://api.docs.social.plus/#tag/notification-tray/get/api/v1/notification-tray)
