FugokuFugoku Docs
Mask

Notifications

Notification endpoints and user notifications

Notifications

Manage notification endpoints (webhooks and email) and user notifications for your project.

Notification Endpoints

List Notification Endpoints

GET /v1/notifications/endpoints
curl https://api.fugoku.com/v1/notifications/endpoints \
  -H "X-Fugoku-API-Key: $FUGOKU_API_TOKEN"

Response:

{
  "data": [
    {
      "id": "ep-abc123",
      "type": "notification-endpoints",
      "attributes": {
        "type": "webhook",
        "url": "https://example.com/hooks/fugoku",
        "email": null,
        "events": ["instance.created", "instance.stopped"],
        "enabled": true,
        "createdAt": "2026-08-01T00:00:00Z"
      }
    }
  ],
  "meta": { "page": 1, "limit": 20, "total": 1, "totalPages": 1 }
}

Create Notification Endpoint

POST /v1/notifications/endpoints

Request Body:

FieldTypeRequiredDescription
typestringYeswebhook or email
urlstringFor webhookWebhook URL (required if type is webhook)
emailstringFor emailEmail address (required if type is email)
eventsarrayYesArray of event names to subscribe to
secretstringNoHMAC signing secret for webhook verification
enabledbooleanNoEnable immediately (default true)
curl -X POST https://api.fugoku.com/v1/notifications/endpoints \
  -H "X-Fugoku-API-Key: $FUGOKU_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "webhook",
    "url": "https://example.com/hooks/fugoku",
    "events": ["instance.created", "instance.stopped", "job.failed"],
    "secret": "my-webhook-secret"
  }'

Delete Notification Endpoint

DELETE /v1/notifications/endpoints/:id

Returns 204 No Content.

Test Notification Endpoints

POST /v1/notifications/test

Sends a test notification to all enabled endpoints for the project.

curl -X POST https://api.fugoku.com/v1/notifications/test \
  -H "X-Fugoku-API-Key: $FUGOKU_API_TOKEN"

Response:

{
  "data": {
    "type": "notification-test",
    "attributes": {
      "total": 2,
      "results": [
        { "endpointId": "ep-abc123", "type": "webhook", "success": true },
        { "endpointId": "ep-def456", "type": "email", "success": true }
      ]
    }
  }
}

User Notifications

List Notifications

GET /v1/notifications
curl https://api.fugoku.com/v1/notifications \
  -H "X-Fugoku-API-Key: $FUGOKU_API_TOKEN"

Create Notification

POST /v1/notifications

Request Body:

FieldTypeRequiredDescription
titlestringYesNotification title (1–200 chars)
messagestringYesNotification message (1–5000 chars)
typestringNoinfo, warning, error, success (default info)

Mark Notification as Read

PATCH /v1/notifications/:id
curl -X PATCH https://api.fugoku.com/v1/notifications/notif-abc123 \
  -H "X-Fugoku-API-Key: $FUGOKU_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "read": true }'

Mark All as Read

PATCH /v1/notifications

Marks all unread notifications for the project as read.

Delete Notification

DELETE /v1/notifications/:id

Returns 204 No Content.

Delete All Notifications

DELETE /v1/notifications

Deletes all notifications for the project. Returns 204 No Content.

On this page