API Reference
The Vigilare REST API. All endpoints return JSON. Authenticated endpoints require a Bearer token obtained from POST /auth/login.
https://api.vigilare.cloudAuthorization: Bearer <id_token>application/jsonAuthentication
Sign up and log in. Login returns JWT tokens; pass the id_token as a Bearer token on all protected endpoints.
/auth/signupCreate a new tenant account
Request body
| Name | Type | Description |
|---|---|---|
| email* | string | Account email address |
| password* | string | Minimum 8 characters |
| name* | string | Display name (1–200 chars) |
Response
{
"tenant_id": "01JABCDE...",
"user_id": "01JABCDF...",
"message": "Account created successfully. You can now log in."
}/auth/loginAuthenticate and obtain JWT tokens
Use id_token as the Bearer token in the Authorization header for subsequent requests.
Request body
| Name | Type | Description |
|---|---|---|
| email* | string | Account email |
| password* | string | Account password |
Response
{
"access_token": "eyJ...",
"id_token": "eyJ...",
"refresh_token": "eyJ...",
"expires_in": 3600,
"token_type": "Bearer"
}Profile
Read and update the authenticated user's profile and tenant information.
/me🔐 Auth requiredGet current user and tenant
Response
{
"user": {
"user_id": "01JABCDF...",
"email": "alice@example.com",
"name": "Alice",
"role": "owner",
"created_at": "2026-04-01T10:00:00+00:00"
},
"tenant": {
"tenant_id": "01JABCDE...",
"name": "Acme Inc",
"plan": "team",
"status": "active",
"created_at": "2026-04-01T10:00:00+00:00"
}
}/me🔐 Auth requiredUpdate display name
Request body
| Name | Type | Description |
|---|---|---|
| name* | string | New display name (1–200 chars) |
Response
{ "name": "Alice Smith" }Accounts
Connect, verify, and manage monitored AWS accounts. The two-step connect → verify flow provisions the cross-account IAM role and starts the monitoring pipeline.
/accounts🔐 Auth requiredConnect an AWS account
Returns a Terraform snippet and CLI script to provision the cross-account IAM role. Call /verify once the role is in place.
Request body
| Name | Type | Description |
|---|---|---|
| aws_account_id* | string | 12-digit AWS account ID |
| display_name | string | Human-readable label (max 200 chars) |
| tags | string[] | Arbitrary string tags for filtering |
Response
{
"aws_account_id": "123456789012",
"external_id": "abc123...",
"sentinel_account_id": "987654321098",
"status": "PENDING",
"terraform_snippet": "module \"vigilare_onboarding\" { ... }",
"fallback_cli_script": "aws iam create-role ..."
}/accounts/{account_id}/verify🔐 Auth requiredVerify IAM role and activate monitoring
Assumes the cross-account role via STS. On success, status changes to ACTIVE and the first scan is triggered immediately.
Response
{
"aws_account_id": "123456789012",
"status": "ACTIVE",
"first_scan_execution_arn": "arn:aws:states:..."
}/accounts🔐 Auth requiredList connected accounts
Response
{
"accounts": [
{
"aws_account_id": "123456789012",
"display_name": "Production",
"status": "ACTIVE",
"current_srs": 82,
"last_scan_at": "2026-05-22T10:00:00+00:00",
"tags": ["prod"]
}
],
"total": 1
}/accounts/{account_id}🔐 Auth requiredGet account details
Response
{
"aws_account_id": "123456789012",
"display_name": "Production",
"status": "ACTIVE",
"current_srs": 82,
"connected_at": "2026-04-01T10:00:00+00:00",
"last_scan_at": "2026-05-22T10:00:00+00:00",
"last_successful_scan_at": "2026-05-22T10:00:00+00:00",
"tags": ["prod"]
}/accounts/{account_id}/signals🔐 Auth requiredList findings for an account
Query parameters
| Name | Type | Description |
|---|---|---|
| severity | string | Filter by severity: CRITICAL, HIGH, MEDIUM, or LOW |
| scenario | string | Filter by scenario type (e.g. iam, billing) |
| since | string | ISO 8601 timestamp — return findings after this time |
| limit | integer | Max results per page (1–200, default 50) |
| next_token | string | Pagination cursor from the previous response |
Response
{
"signals": [
{
"signal_id": "01JABCDG...",
"scenario": "iam",
"severity": "HIGH",
"title": "Root account login detected",
"description": "Root account login from 203.0.113.5",
"detected_at": "2026-05-22T09:45:00+00:00",
"resolved_at": null
}
],
"count": 1,
"next_token": null
}/accounts/{account_id}/score-history🔐 Auth requiredGet risk score history
Query parameters
| Name | Type | Description |
|---|---|---|
| days | integer | Number of days of history to return (default 30) |
Response
{
"history": [
{ "date": "2026-05-22", "srs": 82 },
{ "date": "2026-05-21", "srs": 79 }
]
}/accounts/{account_id}/recovery-checklist🔐 Auth requiredGet suspension recovery checklist
Returns a prioritised remediation checklist tailored to the account's active findings.
Response
{
"checklist": [
{
"step": 1,
"title": "Remove offending IAM policies",
"description": "...",
"docs_url": "https://docs.aws.amazon.com/..."
}
]
}/accounts/{account_id}/scan🔐 Auth requiredTrigger a manual scan
Manual scans count toward the scan rate limit. Frequent manual scans on the Solo plan may be throttled.
Response
{
"message": "Scan started",
"execution_arn": "arn:aws:states:..."
}/accounts/{account_id}/panic🔐 Auth requiredGenerate emergency response package
Produces a signed S3 URL containing a full export of findings, risk scores, and remediation guidance. URL expires after 15 minutes.
Response
{
"message": "Panic package generated",
"download_url": "https://s3.amazonaws.com/..."
}/accounts/{account_id}/export🔐 Auth requiredExport findings as CSV
Available on Team, Agency, and Enterprise plans.
Response
CSV file download (Content-Type: text/csv)
/accounts/{account_id}🔐 Auth requiredDisconnect an account
Stops all scheduled scans and marks the account as DISCONNECTED. The IAM role in your AWS account is not removed automatically.
Response
{ "message": "Account disconnected" }Alert Rules
Configure when and how you receive alerts. A rule fires when the Security Risk Score drops below min_srs or a specified scenario is detected.
/alert-rules🔐 Auth requiredList alert rules
Response
{
"rules": [
{
"rule_id": "01JABCDI...",
"name": "Critical alerts to PagerDuty",
"min_srs": 50,
"scenarios": ["iam", "billing"],
"channels": [{ "type": "pagerduty", "routing_key": "abc123" }],
"enabled": true
}
],
"count": 1
}/alert-rules🔐 Auth requiredCreate an alert rule
Request body
| Name | Type | Description |
|---|---|---|
| name* | string | Rule label (1–200 chars) |
| min_srs | integer | Score threshold 0–100 that triggers the rule (default 40) |
| scenarios | string[] | Scenario filter — empty means all scenarios |
| channels* | ChannelConfig[] | At least one delivery channel (email, slack, pagerduty) |
| enabled | boolean | Whether the rule is active (default true) |
Response
{
"rule_id": "01JABCDI...",
"name": "Critical alerts to PagerDuty",
"min_srs": 50,
"scenarios": ["iam"],
"channels": [{ "type": "pagerduty", "routing_key": "abc123" }],
"enabled": true,
"created_at": "2026-05-22T10:00:00+00:00"
}/alert-rules/{rule_id}🔐 Auth requiredUpdate an alert rule
Request body
| Name | Type | Description |
|---|---|---|
| name | string | New rule name |
| min_srs | integer | New score threshold |
| scenarios | string[] | Replacement scenario list |
| channels | ChannelConfig[] | Replacement channel list |
| enabled | boolean | Enable or disable the rule |
Response
Updated rule object
/alert-rules/{rule_id}🔐 Auth requiredDelete an alert rule
Response
{ "message": "Alert rule deleted" }Alerts
Query fired alert events and acknowledge them to suppress duplicate notifications.
/alerts🔐 Auth requiredList alert events
Query parameters
| Name | Type | Description |
|---|---|---|
| limit | integer | Results per page (1–200, default 50) |
| next_token | string | Pagination cursor |
Response
{
"alerts": [
{
"alert_id": "01JABCDJ...",
"aws_account_id": "123456789012",
"rule_id": "01JABCDI...",
"srs_at_trigger": 38,
"scenarios_triggered": ["iam"],
"fired_at": "2026-05-22T09:50:00+00:00",
"acknowledged_at": null
}
],
"count": 1,
"next_token": null
}/alerts/{alert_id}/ack🔐 Auth requiredAcknowledge an alert
Acknowledged alerts are suppressed from re-notification until the underlying finding changes.
Response
{
"alert_id": "01JABCDJ...",
"acknowledged_at": "2026-05-22T10:00:00+00:00"
}Users
Manage team members on your tenant. Only owners and admins can invite or remove users. Only owners can change roles.
/users🔐 Auth requiredList team members
Response
{
"users": [
{
"user_id": "01JABCDF...",
"email": "alice@example.com",
"name": "Alice",
"role": "owner",
"created_at": "2026-04-01T10:00:00+00:00"
}
],
"total": 1
}/users/invite🔐 Auth requiredInvite a new team member
Request body
| Name | Type | Description |
|---|---|---|
| email* | string | Email address of the invitee |
| name* | string | Display name |
| role | string | One of: admin, member, viewer (default member) |
Response
{
"user_id": "01JABCDK...",
"email": "bob@example.com",
"name": "Bob",
"role": "member",
"message": "Invitation sent. The user will receive an email with login instructions."
}/users/{user_id}🔐 Auth requiredChange a user's role
Only owners can promote or demote users. The account owner role cannot be changed.
Request body
| Name | Type | Description |
|---|---|---|
| role* | string | New role: admin, member, or viewer |
Response
{
"user_id": "01JABCDK...",
"role": "admin",
"updated_at": "2026-05-22T10:00:00+00:00"
}/users/{user_id}🔐 Auth requiredRemove a team member
Cannot remove yourself or the account owner.
Response
204 No Content
Billing
Retrieve plan information and manage subscriptions via Stripe.
/billing/plansList available plans
Response
{
"plans": [
{
"id": "solo",
"name": "Solo",
"price_usd_month": 29,
"account_limit": 1,
"scan_interval_minutes": 15,
"features": ["Email alerts", "IAM monitoring", "Billing anomaly detection"]
}
]
}/billing/checkout🔐 Auth requiredCreate a Stripe checkout session
Request body
| Name | Type | Description |
|---|---|---|
| plan_id* | string | Plan identifier: solo, team, agency, or enterprise |
| success_url* | string | Redirect URL on successful payment |
| cancel_url* | string | Redirect URL when the user cancels |
Response
{
"checkout_url": "https://checkout.stripe.com/pay/cs_..."
}/billing/portal🔐 Auth requiredGet Stripe customer portal URL
Redirects the user to Stripe's self-serve portal to manage subscriptions, invoices, and payment methods.
Response
{
"portal_url": "https://billing.stripe.com/session/..."
}Integrations
Connect third-party services. Slack uses a standard OAuth 2.0 flow.
/integrations/slack/oauth-start🔐 Auth requiredStart the Slack OAuth flow
Redirect the user to oauth_url to authorise the Vigilare Slack app. Slack will callback to /webhooks/slack/install.
Response
{
"oauth_url": "https://slack.com/oauth/v2/authorize?..."
}Error responses
All errors return a JSON body with an error field.
| Status | Meaning |
|---|---|
| 400 | Bad request — request body failed validation |
| 401 | Unauthorized — missing or invalid Bearer token |
| 403 | Forbidden — insufficient role, or plan limit exceeded |
| 404 | Resource not found |
| 409 | Conflict — resource already exists |
| 422 | Unprocessable — cross-account role assumption failed |
| 429 | Rate limited — too many requests |
| 500 | Internal server error |
Need help with the API?
Our support team can help with integration questions, custom rate limits, and enterprise contracts.
Contact support