API And Webhooks

The Bitaic API and webhook layer lets engineering, operations, and automation teams retrieve monitoring data, manage monitored resources, configure alert behavior, export operational data, and deliver real-time events into internal systems.

When To Use API Versus Webhooks

NeedUseTypical workflow
Read current or historical state on demand.APIQuery targets, alerts, checks, health metrics, Windows events, or exports from a script, dashboard, or internal tool.
Create or update configuration from automation.APIManage monitored targets, endpoint checks, alert thresholds, integration settings, and agent metadata.
React when something changes.WebhooksSend alert, recovery, certificate, DNS, health, Windows event, or agent-state notifications to another system.
Connect Bitaic to incident or workflow tools.Integrations and webhooksUse a built-in integration where one exists, and use webhooks for custom routing or in-house automation.

Authentication And Authorization

  • API requests use a Bitaic API token in the Authorization: Bearer <token> header.
  • API tokens are created and rotated from Bitaic App settings by users with permission to manage API access.
  • Requests are authorized against the calling user, workspace, organization, and role-based permissions.
  • Administrative API activity is part of the Bitaic audit trail so teams can review configuration and access changes.
Permission requirement

Create and rotate API tokens from an account role that can manage API access, then scope each automation token to the resources and actions it actually needs.

Secret handling

Store API tokens in a secrets manager or protected runtime variable, not in source code, command history, or committed configuration files.

Base URL And Versioning

Base URLhttps://api.bitaic.com/v1
Content typeSend and receive JSON with Content-Type: application/json.
TimestampsUse ISO 8601 UTC timestamps in request and response payloads.
Version pathThe /v1 path identifies the stable API version used by current monitoring products and integrations.

Resource Model

ResourcePurposeCommon fields
TargetsMonitored infrastructure objects such as endpoints, domains, DNS records, certificates, hosts, and Windows event sources.id, name, type, status, created_at, updated_at.
ChecksEndpoint, certificate, DNS, domain, health, and Windows event checks attached to monitored targets.id, target_id, check_type, state, checked_at.
MetricsTime-series and current values for uptime, response time, DNS latency, certificate days remaining, health usage, and event counts.metric, value, unit, target_id, observed_at.
AlertsAlert records created from threshold crossings, status changes, monitored failures, and recoveries.id, severity, state, summary, opened_at, resolved_at.
AgentsInstalled collectors and their status, version, last report time, and associated monitoring products.id, name, agent_type, version, status, last_seen_at.
IntegrationsNotification, incident, webhook, and API-connected routing configuration.id, provider, enabled, created_at, updated_at.

Endpoint Reference

MethodPathPurposeUse case
GET/v1/targetsList monitored targets.Inventory the resources Bitaic is monitoring.
GET/v1/targets/{target_id}Retrieve one monitored target.Inspect target metadata, current state, and check coverage.
POST/v1/endpoint-checksCreate an endpoint availability check.Add a URL to Endpoint Monitoring automation.
GET/v1/metrics/healthRetrieve health metric values.Feed CPU, memory, disk, and disk I/O data into reports.
GET/v1/events/windowsList Windows event matches.Review event IDs, levels, sources, and event alert context.
GET/v1/alertsList alerts.Read active and resolved alert records for operations review.
PATCH/v1/alerts/{alert_id}Update an alert.Acknowledge, annotate, or resolve an alert from automation.
GET/v1/agentsList agents.Check installed collector status and freshness.
POST/v1/webhooks/subscriptionsCreate a webhook subscription.Deliver selected events to a configured HTTPS endpoint.

Request And Response Shape

API responses use a predictable envelope so applications can log a request ID, handle pagination, and parse the returned resource payload.

GET /v1/alerts?state=open&severity=critical HTTP/1.1
Host: api.bitaic.com
Authorization: Bearer <token>
Accept: application/json
{
  "data": [
    {
      "id": "alert_01J5Z8P2A9W8H2XP0J4K3V7B8C",
      "severity": "critical",
      "state": "open",
      "summary": "Endpoint response time exceeded threshold",
      "target_id": "target_01J5Z8M4Q9K7P6N2H1W8R5T3A1",
      "opened_at": "2026-08-18T14:30:00Z"
    }
  ],
  "pagination": {
    "next_cursor": "cursor_eyJwYWdlIjoyfQ"
  },
  "request_id": "req_01J5Z8T6N9QVH6CY7W0Z6QG1F2"
}

Pagination, Filtering, And Limits

  • List endpoints support cursor pagination with a next_cursor value when more records are available.
  • Common filters include state, severity, target_id, type, from, and to.
  • Metric and event queries should use bounded time windows so exports and dashboards stay responsive.
  • API clients should handle 429 responses by honoring Retry-After and retrying with backoff.
  • Retried writes should use an idempotency key when the client cannot safely determine whether the first request completed.

Errors And Recovery

StatusMeaningRecovery
400Request body, query, or parameter is invalid.Fix the field named in the error payload and retry.
401Authentication token is missing, expired, or invalid.Rotate or reissue the token, then retry the request.
403The authenticated principal lacks permission.Use an account or role with access to the requested resource.
404The resource does not exist in the active workspace.Check the resource ID and workspace context.
409The requested write conflicts with current state.Reload the resource, apply the current state, and retry.
429The client has exceeded the current rate limit.Honor Retry-After, reduce concurrency, and use backoff.
5xxBitaic could not complete the request.Retry safe requests with backoff and include the request ID.
{
  "error": {
    "code": "invalid_request",
    "message": "The severity filter must be one of info, warning, critical.",
    "field": "severity"
  },
  "request_id": "req_01J5Z8W6YF5QA20NHJ9FE7J7VQ"
}

Webhook Events

EventWhen it firesCommon consumers
alert.createdA new alert opens.Incident tools, chat channels, ticketing systems.
alert.updatedAn alert changes severity, owner, note, or routing state.Incident records, automation workflows.
alert.resolvedAn alert returns to clear or resolved state.Incident closure, status summaries, reporting.
endpoint.check_failedAn endpoint availability check fails.On-call routing, service dashboards.
endpoint.recoveredAn endpoint returns to healthy state.Recovery automation, incident updates.
ssl.expiringA certificate enters its configured expiration window.Renewal workflows, ticket queues.
ssl.renewedA certificate check observes a renewed certificate.Renewal confirmation, compliance evidence.
domain.status_changedA monitored domain status changes.Domain operations, escalation workflows.
dns.lookup_failedA DNS lookup cannot resolve successfully.Network operations, incident workflows.
dns.record_mismatchA DNS answer differs from the configured expected value.Change review, DNS operations.
health.threshold_exceededA health metric crosses its configured threshold.Capacity workflows, operations alerts.
health.recoveredA health metric returns to clear state.Recovery workflows, status summaries.
windows_event.matchedA configured Windows event rule matches an event.Windows operations, security review workflows.
agent.offlineAn agent stops reporting within its expected window.Collector health automation, operations channels.
agent.recoveredAn agent resumes reporting.Recovery automation, operational reports.

Webhook Payload And Security

Webhook deliveries use HTTPS, include a unique event ID, and provide the event name, delivery timestamp, workspace context, and related resource payload. Receivers should verify the signature before processing the event.

Receiver validation

Reject unsigned deliveries, failed signature checks, stale timestamps, and duplicate event IDs before triggering downstream automation.

POST /bitaic/webhooks HTTP/1.1
Host: automation.example.com
Content-Type: application/json
X-Bitaic-Event: alert.created
X-Bitaic-Delivery: whd_01J5Z91CBA9W37F68JTE7W8JEV
X-Bitaic-Timestamp: 2026-08-18T14:30:00Z
X-Bitaic-Signature: sha256=<signature>
{
  "event_id": "evt_01J5Z91CBA9W37F68JTE7W8JEV",
  "event_type": "alert.created",
  "created_at": "2026-08-18T14:30:00Z",
  "workspace_id": "workspace_01J5Z82DB7YV6PRPK6K4WSGJ5X",
  "data": {
    "alert": {
      "id": "alert_01J5Z8P2A9W8H2XP0J4K3V7B8C",
      "severity": "critical",
      "state": "open",
      "summary": "Endpoint response time exceeded threshold",
      "target_id": "target_01J5Z8M4Q9K7P6N2H1W8R5T3A1"
    }
  }
}
  • Validate X-Bitaic-Signature with the webhook signing secret before accepting the payload.
  • Reject stale deliveries by checking X-Bitaic-Timestamp.
  • Treat event_id and X-Bitaic-Delivery as idempotency values to prevent duplicate processing.
  • Respond with a 2xx status after successful processing.
  • Bitaic retries failed deliveries for temporary errors and records delivery attempts for troubleshooting.

Data Export

API exports support operational reporting, compliance review, backup, and downstream analytics. Export requests should include the product area, target scope, time window, and desired output format.

POST /v1/exports HTTP/1.1
Host: api.bitaic.com
Authorization: Bearer <token>
Content-Type: application/json

{
  "resource": "alerts",
  "format": "csv",
  "from": "2026-08-01T00:00:00Z",
  "to": "2026-08-18T23:59:59Z"
}

Security Notes

  • Use least-privilege tokens for automation and rotate them on a regular schedule.
  • Separate read-only reporting tokens from tokens that can create, update, or delete configuration.
  • Restrict webhook receivers to HTTPS endpoints controlled by your organization.
  • Log request_id, event_id, and delivery IDs in downstream systems for support and audit review.
  • Avoid forwarding secrets, credentials, or unnecessary sensitive details through webhook payloads or exports.

Related Workflows