# إنشاء إشعارات عبر API

**URL:** <https://meta.discourse.org/t/creating-notifications-via-the-api/173769>\
**Category:** Development\
**Tags:** notifications, rest-api\
**Created:** [17 ديسمبر 2020، 10:55ص UTC](https://meta.discourse.org/t/creating-notifications-via-the-api/173769 "2020-12-17T10:55:49Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![ootwch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ootwch/32/141093_2.png) [@ootwch](https://meta.discourse.org/u/ootwch)\
**Post date:** [29 فبراير 2024، 3:34ص UTC](https://meta.discourse.org/t/creating-notifications-via-the-api/173769/12 "2024-02-29T03:34:53Z")

</div>

لا يعمل هذا معي…

```plaintext
POST https://XXX/notifications
Api-Key:XXX
Api-Username:system
Content-Type:application/json
Accept:application/json

{
    "notification_type":9,
    "user_id": 123,
    "post_number": 1,
    "topic_id": 956,
    "data": {
        "topic_title": "Test",
        "original_post_id": 2222,
        "original_post_type": 1,
        "original_username": "User.Name",
        "revision_number": 1,
        "display_username": "Text"
            }

}

```

أتلقى كرد:

```plaintext

{
  "errors": [
    "Data can't be blank"
  ],
  "error_type": "record_invalid"
}

```

خطأ في التنسيق، سوء فهم؟ أم أنني أفتقد شيئًا في `data`؟

لا يمكنني حقًا عكس هندسة هذا من الويب - أو هل يتم استدعاء هذه الواجهة البرمجية في مكان ما؟

---

_[View the full topic](https://meta.discourse.org/t/creating-notifications-via-the-api/173769)._
