---
title: "Create a new notification"
method: POST
path: "/notifications/global"
tags: ["notifications"]
---

# Create a new notification

`POST /notifications/global`

## Request

- Base URL: `https://staging.api-golang.boilerplate.hng.tech/api/v1`
- URL: `https://staging.api-golang.boilerplate.hng.tech/api/v1/notifications/global`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger/docs/notifications/global/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- object
  - `message` string, required

## Response `201`

Notification created successfully

- object
  - `status` string
  - `message` string
  - `status_code` integer
  - `data` object
    - `notifications` object[]
      - `notification_id` string
      - `userId` string
      - `message` string
      - `is_read` boolean
      - `created_at` string, date-time

## Other responses

- `400`: Invalid request
- `401`: Unauthorized request

## Changes

- **2024-08-09** `dbbe685d3440`: 1 info
  - endpoint added
- **2024-08-07** `06cecc2ac126`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger/changes/notifications/global/post.md)

---

[API](https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger.md) - [All operations](https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger/llms.txt) - [OpenAPI document](https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger/revisions/2d1d3ed96bb9?raw)
