Creates a new notification.

POST
/api/v1/notifications
AuthorizationBearer <token>

In: header

id?string
signing_key?string

Optional signing key for securing webhook notifications

type?NotificationType

Notification type enum used by both config file and API

Value in"webhook"
urlstring

Response Body

curl -X POST "https://loading/api/v1/notifications" \  -H "Content-Type: application/json" \  -d '{    "url": "string"  }'
{
  "data": {
    "has_signing_key": true,
    "id": "string",
    "type": "webhook",
    "url": "string"
  },
  "error": "string",
  "pagination": {
    "current_page": 0,
    "per_page": 0,
    "total_items": 0
  },
  "success": true
}
{
  "data": null,
  "message": "Bad Request",
  "success": false
}
{
  "data": null,
  "message": "Unauthorized",
  "success": false
}
{
  "data": null,
  "message": "Notification with this ID already exists",
  "success": false
}
{
  "data": null,
  "message": "Internal Server Error",
  "success": false
}