API reference
Wave-1 curated endpoints
Base path /api/v1. Unless noted, tenant automation keys require the listed scope. Responses are JSON.
Scope reference
| Scope | Typical use |
|---|---|
integrations:READER | List connections, read webhook event history |
integrations:OPERATOR | Create and revoke integration connections |
integration_hub:READER | Hub overview and credential readiness |
Automation discovery
GET /api/v1/automation/health
Scope: integrations:READER or integration_hub:READER. Lightweight health check for monitors.
curl -sS "https://<host>/api/v1/automation/health" \
-H "Authorization: Bearer mjt_<secret>"
GET /api/v1/automation/capabilities
Scope: same as health. Returns allowlisted paths and scopes effective for the presented key.
Integration hub
GET /api/v1/integration-hub/overview
Scope: integration_hub:READER. Summary of connectors and hub status for the tenant.
GET /api/v1/integration-hub/credential-readiness
Scope: integration_hub:READER. Indicates which connectors are ready for credential binding (no secret values in response).
Integration connections
GET /api/v1/integrations/connections
Scope: integrations:READER. Lists connections with safe metadata fields only.
POST /api/v1/integrations/connections
Scope: integrations:OPERATOR. Creates a connection. Request body fields depend on connector type; refer to in-product connector documentation.
curl -sS -X POST "https://<host>/api/v1/integrations/connections" \
-H "Authorization: Bearer mjt_<secret>" \
-H "Content-Type: application/json" \
-d '{"connectorKey":"example","displayName":"ERP sync"}'
POST /api/v1/integrations/connections/:id/revoke
Scope: integrations:OPERATOR. Disables a connection and stops future sync until re-provisioned.
GET /api/v1/integrations/connections/:id/events
Scope: integrations:READER. Paginated delivery and processing log for webhook-related activity on the connection.
Platform operations (mjs_ keys only)
These routes require a platform operator key and PLATFORM_ADMIN-class authorization. Not available to tenant automation keys.
GET /api/v1/platform/monitoring
Snapshot of platform health metrics for operator dashboards.
Platform alerting channels (high level)
GET /api/v1/platform/alerting/channels— list channelsPOST /api/v1/platform/alerting/channels— create (EMAIL, WEBHOOK, SLACK, GRAFANA, HTTP kinds)PATCH /api/v1/platform/alerting/channels/:id— update settingsDELETE /api/v1/platform/alerting/channels/:id— remove channelGET /api/v1/platform/alerting/rulesandPUT /api/v1/platform/alerting/rules— read/update routing rules
Infrastructure-as-code snippet
Example using the Terraform HTTP provider to probe automation health (store the bearer token in your secret store, not in plain Terraform variables in shared repos):
data "http" "mjs_automation_health" {
url = "https://<host>/api/v1/automation/health"
method = "GET"
request_headers = {
Authorization = var.mjs_automation_bearer # sourced from vault
}
}
HTTP status 401 or 403 usually indicates missing entitlement, wrong scope, or a route outside the allowlist. Confirm with /automation/capabilities.