LaserData Cloud
API Reference

Notifications

Manage notification channels and event subscriptions to receive alerts via Slack, webhook, or email.

API Variables
ld-api-key
{tenant_id}

Set variables to auto-fill all examples and run requests in-browser.

The Notifications API routes platform and deployment events to external channels. Channels can be scoped to the tenant or to a specific division. All endpoints use the main API at https://api.laserdata.cloud.

Required permissions: notifications:read to list/get, notifications:manage to create/update/delete.

Notification Types

List Notification Types

GET
/notifications/types

List all available event types that can be subscribed to.

bash
curl https://api.laserdata.cloud/notifications/types \
-H "ld-api-key: YOUR_API_KEY"
[
  { "type": "deployment_created", "name": "Deployment created" },
  { "type": "deployment_initialized", "name": "Deployment initialized" },
  { "type": "high_cpu_usage", "name": "High CPU usage" },
  { "type": "node_unreachable", "name": "Node unreachable" }
]
Deployment events
deployment_createddeployment_initializeddeployment_upgradeddeployment_deleteddeployment_certificates_rotateddeployment_secrets_rotated
Invitation events
invitation_createdinvitation_acceptedinvitation_rejected
Tenant events
tenant_config_updatedtenant_join_requestedmember_joined
Organization events
division_createddivision_updateddivision_deletedenvironment_createdenvironment_updatedenvironment_deleted
Health alerts
high_cpu_usagehigh_memory_usagehigh_disk_usagenode_unreachablecpu_usage_resolvedmemory_usage_resolveddisk_usage_resolvednode_reachable
Other
certificate_expiringbilling_limit_reached

Channels

A channel is a delivery destination. Supported kinds: slack (incoming webhook), webhook (HTTPS POST with JSON payload), email. Destinations are encrypted at rest.

Create a Tenant Channel

POST
/tenants/{tenant_id}/channels

Create a notification channel scoped to the entire tenant.

bash
curl -X POST https://api.laserdata.cloud/tenants/{tenant_id}/channels \
-H "ld-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "channel": "slack",
  "name": "production-alerts",
  "destination": "https://hooks.slack.com/services/T00/B00/xxx",
  "settings": {
    "slack": {
      "channel": "#alerts",
      "username": "LaserData"
    }
  },
  "remarks": "Primary alerting channel"
}'
FieldRequiredDescription
channelYesChannel kind: slack, webhook, email
nameYesUnique name (1-100 chars)
destinationYesTarget URL or email address
settingsNoChannel-specific settings (Slack channel/username, webhook headers, etc.)
remarksNoNotes (max 500 chars)

Returns 201 Created.

Create a Division Channel

POST
/tenants/{tenant_id}/divisions/{division_id}/channels

Create a notification channel scoped to a specific division.

bash
curl -X POST https://api.laserdata.cloud/tenants/{tenant_id}/divisions/{division_id}/channels \
-H "ld-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "channel": "webhook",
  "name": "ops-webhook",
  "destination": "https://example.com/webhooks/laserdata"
}'

List Channels

GET
/tenants/{tenant_id}/channels

List all notification channels for the tenant.

bash
curl "https://api.laserdata.cloud/tenants/{tenant_id}/channels?page=1&results=10&channel=slack" \
-H "ld-api-key: YOUR_API_KEY"
{
  "total_pages": 1,
  "total_results": 1,
  "page": 1,
  "items": [
    {
      "id": 1,
      "owner_kind": "tenant",
      "owner_id": 100,
      "channel": "slack",
      "name": "production-alerts",
      "enabled": true,
      "created_at": "2025-06-01T10:00:00Z",
      "updated_at": "2025-06-01T10:00:00Z"
    }
  ]
}

Division-scoped: GET /tenants/{tenant_id}/divisions/{division_id}/channels

Query ParameterDescription
channelFilter by kind: slack, webhook, email
pagePage number
resultsItems per page (max 100)

Get Channel

GET
/tenants/{tenant_id}/channels/{channel_id}

Retrieve a specific channel by ID. Includes destination and settings (omitted in list).

bash
curl https://api.laserdata.cloud/tenants/{tenant_id}/channels/{channel_id} \
-H "ld-api-key: YOUR_API_KEY"
{
  "id": 1,
  "owner_kind": "tenant",
  "owner_id": 100,
  "channel": "slack",
  "name": "production-alerts",
  "enabled": true,
  "destination": "https://hooks.slack.com/services/T00/B00/xxx",
  "settings": {
    "slack": {
      "channel": "#alerts",
      "username": "LaserData"
    }
  },
  "remarks": "Primary alerting channel",
  "created_at": "2025-06-01T10:00:00Z",
  "updated_at": "2025-06-01T10:00:00Z"
}

Division-scoped: GET /tenants/{tenant_id}/divisions/{division_id}/channels/{channel_id}

Update Channel

PUT
/tenants/{tenant_id}/channels/{channel_id}

Update a channel's name, destination, settings, or enabled state. All fields optional.

bash
curl -X PUT https://api.laserdata.cloud/tenants/{tenant_id}/channels/{channel_id} \
-H "ld-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "name": "updated-channel-name",
  "destination": "https://hooks.slack.com/services/T00/B00/new",
  "enabled": false
}'

Set enabled: false to temporarily disable a channel without deleting it. Returns 204 No Content.

Division-scoped: PUT /tenants/{tenant_id}/divisions/{division_id}/channels/{channel_id}

Test Channel

POST
/tenants/{tenant_id}/channels/{channel_id}/test

Send a test notification to verify the channel is reachable and correctly configured. Rate limited to one test per 10 seconds.

bash
curl -X POST https://api.laserdata.cloud/tenants/{tenant_id}/channels/{channel_id}/test \
-H "ld-api-key: YOUR_API_KEY"

Returns 204 No Content.

Division-scoped: POST /tenants/{tenant_id}/divisions/{division_id}/channels/{channel_id}/test

Delete Channel

DELETE
/tenants/{tenant_id}/channels/{channel_id}

Delete a channel and all its subscriptions.

bash
curl -X DELETE https://api.laserdata.cloud/tenants/{tenant_id}/channels/{channel_id} \
-H "ld-api-key: YOUR_API_KEY"

Returns 204 No Content.

Division-scoped: DELETE /tenants/{tenant_id}/divisions/{division_id}/channels/{channel_id}


Subscriptions

Subscriptions link event types to a channel with optional scope filters. A channel with no subscriptions receives all events.

Create Subscription

POST
/tenants/{tenant_id}/channels/{channel_id}/subscriptions

Subscribe a channel to one or more event types. Optionally filter by tenant, division, environment, or deployment IDs.

bash
curl -X POST https://api.laserdata.cloud/tenants/{tenant_id}/channels/{channel_id}/subscriptions \
-H "ld-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "message_types": ["deployment_created", "deployment_deleted", "node_unreachable"],
  "scope_division_ids": [1],
  "scope_environment_ids": [10, 20]
}'
FieldRequiredDescription
message_typesYesNon-empty array of event type strings
scope_tenant_idsNoLimit to specific tenants
scope_division_idsNoLimit to specific divisions
scope_environment_idsNoLimit to specific environments
scope_deployment_idsNoLimit to specific deployments

Scope filters are ANDed. An omitted or empty scope level matches all resources. Returns 201 Created.

Division-scoped: POST /tenants/{tenant_id}/divisions/{division_id}/channels/{channel_id}/subscriptions

Set Subscriptions (Replace All)

PUT
/tenants/{tenant_id}/channels/{channel_id}/subscriptions

Atomically replace all subscriptions for a channel in a single transaction.

bash
curl -X PUT https://api.laserdata.cloud/tenants/{tenant_id}/channels/{channel_id}/subscriptions \
-H "ld-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "subscriptions": [
    {
      "message_types": ["deployment_created", "deployment_deleted"],
      "scope_division_ids": [1]
    },
    {
      "message_types": ["high_cpu_usage", "high_memory_usage", "high_disk_usage"],
      "scope_deployment_ids": [611298765432109056, 611298765432109057]
    }
  ]
}'

All existing subscriptions are deleted and replaced with the provided list. Returns 204 No Content.

Division-scoped: PUT /tenants/{tenant_id}/divisions/{division_id}/channels/{channel_id}/subscriptions

List Subscriptions

GET
/tenants/{tenant_id}/channels/{channel_id}/subscriptions

List all subscriptions for a channel.

bash
curl "https://api.laserdata.cloud/tenants/{tenant_id}/channels/{channel_id}/subscriptions?page=1&results=10" \
-H "ld-api-key: YOUR_API_KEY"
{
  "total_pages": 1,
  "total_results": 1,
  "page": 1,
  "items": [
    {
      "id": 1,
      "channel_id": 100,
      "message_types": ["deployment_created", "deployment_deleted"],
      "scope_tenants": [{ "id": 1, "name": "Acme Corp" }],
      "scope_divisions": [{ "id": 10, "name": "Platform Eng" }],
      "created_at": "2025-06-01T10:00:00Z",
      "updated_at": "2025-06-01T10:00:00Z"
    }
  ]
}

Scope arrays are omitted when empty. Scope entries include both id and name.

Division-scoped: GET /tenants/{tenant_id}/divisions/{division_id}/channels/{channel_id}/subscriptions

Get Subscription

GET
/tenants/{tenant_id}/channels/{channel_id}/subscriptions/{subscription_id}

Retrieve a specific subscription with full scope details.

bash
curl https://api.laserdata.cloud/tenants/{tenant_id}/channels/{channel_id}/subscriptions/{subscription_id} \
-H "ld-api-key: YOUR_API_KEY"
{
  "id": 1,
  "channel_id": 100,
  "message_types": ["deployment_created", "deployment_deleted"],
  "scope_tenants": [{ "id": 1, "name": "Acme Corp" }],
  "scope_divisions": [{ "id": 10, "name": "Platform Eng" }],
  "scope_environments": [{ "id": 100, "name": "Production" }],
  "scope_deployments": [{ "id": 611298765432109056, "name": "prod-cluster" }],
  "created_at": "2025-06-01T10:00:00Z",
  "updated_at": "2025-06-01T10:00:00Z"
}

Division-scoped: GET /tenants/{tenant_id}/divisions/{division_id}/channels/{channel_id}/subscriptions/{subscription_id}

Delete Subscription

DELETE
/tenants/{tenant_id}/channels/{channel_id}/subscriptions/{subscription_id}

Remove a single subscription from a channel.

bash
curl -X DELETE https://api.laserdata.cloud/tenants/{tenant_id}/channels/{channel_id}/subscriptions/{subscription_id} \
-H "ld-api-key: YOUR_API_KEY"

Returns 204 No Content.

Division-scoped: DELETE /tenants/{tenant_id}/divisions/{division_id}/channels/{channel_id}/subscriptions/{subscription_id}


Notification History

Browse Notifications

GET
/tenants/{tenant_id}/channels/{channel_id}/notifications

Browse delivery history for a channel: event content, type, and timestamp.

bash
curl "https://api.laserdata.cloud/tenants/{tenant_id}/channels/{channel_id}/notifications?page=1&results=10" \
-H "ld-api-key: YOUR_API_KEY"
{
  "total_pages": 1,
  "total_results": 5,
  "page": 1,
  "items": [
    {
      "id": 1,
      "tenant_id": 100,
      "division_id": 10,
      "environment_id": 1,
      "deployment_id": 611298765432109056,
      "message_type": "deployment_initialized",
      "content": "Deployment prod-cluster has been initialized",
      "created_at": "2025-06-01T10:30:00Z"
    }
  ]
}

Division-scoped: GET /tenants/{tenant_id}/divisions/{division_id}/channels/{channel_id}/notifications

On this page