""" An API token (never its secret). """ type ApiToken { id: ID! name: String! role: TokenRole! """ The first 8 characters after `jmi_`. """ prefix: String! createdBy: UserRef! createdAt: DateTime! expiresAt: DateTime lastUsedAt: DateTime lastUsedIp: String } """ Who made an audit entry. """ type AuditActor { kind: AuditActorKind! id: ID label: String } """ Who made an audit entry. """ enum AuditActorKind { USER PLATFORM_ADMIN SYSTEM STRIPE } """ One audit log entry. """ type AuditEntry { id: ID! ts: DateTime! actor: AuditActor! """ `area.verb`, e.g. `monitor.updated`. """ action: String! target: AuditTarget ip: String """ Changed fields and non-secret values; `api_token` when a token made it. """ data: JSON! } """ A page of a list. """ type AuditEntryConnection { nodes: [AuditEntry!]! pageInfo: PageInfo! } """ What an audit entry is about. """ type AuditTarget { type: String! id: String } """ Status of the subscription. """ enum BillingStatus { TRIALING ACTIVE PAST_DUE CANCELED } """ A notification channel. """ enum ChannelKind { EMAIL SMS PUSHOVER DISCORD PAGERDUTY SLACK WEBHOOK VOICE TEAMS } """ One check result. """ type CheckResult { ts: DateTime! location: String! """ The location whose slot a substitute ran. """ slotLocation: String workKind: WorkKind! outcome: Outcome! errorKind: ErrorKind errorDetail: String statusCode: Int latencyMs: Int timings: CheckTimings! tlsNotAfter: DateTime resolvedIp: String metrics: JSON } """ A page of a list. """ type CheckResultConnection { nodes: [CheckResult!]! pageInfo: PageInfo! } """ Phase timings of a check. """ type CheckTimings { dnsMs: Int connectMs: Int tlsMs: Int ttfbMs: Int totalMs: Int } """ Somewhere notifications go: an email address, a phone (SMS or calls), a Pushover user, a Discord webhook, a PagerDuty service, a Slack channel, a Microsoft Teams channel or a customer webhook. """ type Contact { id: ID! name: String! kind: ChannelKind! """ Kind-specific settings; secrets are never returned (`secretSet`). """ config: JSON! """ Voice only: the SMS credits each call to this number uses. """ creditsPerCall: Int secretSet: Boolean! notifyOn: [NotifyOn!]! """ Added to new monitors automatically. """ autoAttach: Boolean! status: ContactStatus! disabledReason: ContactDisabledReason verifiedAt: DateTime lastDeliveryAt: DateTime lastError: String consecutiveFailures: Int! monitorCount: Int! """ Pass as `ifMatch` to updates. """ version: Int! createdAt: DateTime! updatedAt: DateTime! """ Monitors that notify this contact. """ monitors(first: Int, after: String): MonitorConnection! """ Notifications to this contact, newest first. """ notifications(first: Int, after: String): NotificationConnection! } """ A page of a list. """ type ContactConnection { nodes: [Contact!]! pageInfo: PageInfo! } """ Why a contact is disabled. """ enum ContactDisabledReason { USER BOUNCED COMPLAINT OPTED_OUT INVALID UNSUBSCRIBED FAILING ABUSE } """ A new contact (REST `ContactInput`). """ input ContactInput { name: String! kind: ChannelKind! """ Email `{"address"}`, SMS and voice `{"phone"}`, Pushover `{"device", ...}`, Discord `{}`, PagerDuty `{"region"}`, Slack `{}`, webhook `{}`, Teams `{}`. """ config: JSON! """ Write-only: Pushover `{"user_key"}`, Discord `{"webhook_url"}`, PagerDuty `{"routing_key"}`, Slack `{"webhook_url"}`, webhook `{"url"}`, Teams `{"webhook_url"}`. """ secret: JSON """ Default `[DOWN, RECOVERED]`. """ notifyOn: [NotifyOn!] autoAttach: Boolean } """ Changes to a contact (REST `ContactPatch`); the kind cannot change. """ input ContactPatch { name: String """ A new email address or phone number sends a new verification code. """ config: JSON """ Omitted keeps the stored secret. """ secret: JSON notifyOn: [NotifyOn!] autoAttach: Boolean } """ `{ id, name, kind }` of a contact. """ type ContactRef { id: ID! name: String! kind: ChannelKind! } """ Status of a contact. """ enum ContactStatus { UNVERIFIED ACTIVE DISABLED } """ An RFC 3339 UTC timestamp with milliseconds, e.g. `2026-10-06T12:00:00.000Z`. """ scalar DateTime """ One delivery attempt of a notification. """ type Delivery { id: ID! attempt: Int! status: DeliveryStatus! httpStatus: Int errorCode: String error: String providerStatus: ProviderStatus providerStatusAt: DateTime startedAt: DateTime! latencyMs: Int! } """ Status of one delivery attempt. """ enum DeliveryStatus { SENT FAILED_RETRYABLE FAILED_PERMANENT AMBIGUOUS } """ Why a check failed. """ enum ErrorKind { DNS_FAILURE BLOCKED_ADDRESS CONNECT_TIMEOUT CONNECTION_REFUSED CONNECTION_RESET HOST_UNREACHABLE TLS_ERROR CERT_EXPIRED TIMEOUT PROTOCOL_ERROR STATUS_MISMATCH ASSERTION_FAILED TOO_MANY_REDIRECTS REDIRECT_BLOCKED PACKET_LOSS SLOW_RESPONSE CERT_EXPIRING DOMAIN_EXPIRING DOMAIN_EXPIRED DOMAIN_NOT_FOUND RDAP_UNAVAILABLE HEARTBEAT_MISSED HEARTBEAT_FAILED NETWORK_UNREACHABLE ICMP_UNAVAILABLE RESOURCE_EXHAUSTED PROBE_OVERLOADED INTERNAL } """ One ping a heartbeat monitor received. """ type HeartbeatPing { ts: DateTime! kind: PingKind! """ `GET`, `HEAD` or `POST`. """ method: String! remoteIp: String userAgent: String } """ An outage or degradation of a monitor, from first failure to recovery. """ type Incident { id: ID! severity: IncidentSeverity! status: IncidentStatus! currentStatus: IncidentCurrentStatus! flapping: Boolean! firstFailureAt: DateTime! openedAt: DateTime! resolvedAt: DateTime resolution: Resolution durationS: Int! acknowledgedAt: DateTime """ `null` with `acknowledgedAt` set: acknowledged through Pushover. """ acknowledgedBy: UserRef cause: String! causeDetail: JSON! remindersSent: Int! notificationCount: Int! """ The monitor's id and name. """ monitorRef: MonitorRef! """ The monitor. """ monitor: Monitor! """ The incident's timeline. """ events: [IncidentEvent!]! """ Notifications sent about the incident. """ notifications: [Notification!]! } """ A page of a list. """ type IncidentConnection { nodes: [Incident!]! pageInfo: PageInfo! } """ Current status of an incident's monitor. """ enum IncidentCurrentStatus { UP DOWN DEGRADED NO_DATA } """ One event of an incident. """ type IncidentEvent { id: ID! ts: DateTime! type: IncidentEventType! actor: UserRef data: JSON! } """ Type of an incident event. """ enum IncidentEventType { CHECK_FAILED OPENED STATUS_CHANGED LOCATION_FAILED LOCATION_RECOVERED NO_DATA DATA_RESUMED FLAPPING_STARTED FLAPPING_ENDED ACKNOWLEDGED REMINDER_SENT REMINDERS_EXHAUSTED NOTE RESOLVED NO_CONTACTS NOTIFICATION_SENT NOTIFICATION_FAILED NOTIFICATION_SUPPRESSED NOTIFICATION_UNDELIVERED } """ Worst status an incident reached. """ enum IncidentSeverity { DOWN DEGRADED } """ Whether an incident is open. """ enum IncidentStatus { OPEN RESOLVED } """ A scalar that can represent any JSON value. """ scalar JSON """ A check location. """ type Location { id: ID! """ Short code, e.g. `lon1`; monitors name locations by code. """ code: String! name: String! region: Region! countryCode: String! ipv6: Boolean! """ Active and with at least one eligible probe. """ available: Boolean! } """ How a monitor's locations are chosen. """ enum LocationMode { REGIONS LOCATIONS } """ Active locations and their regions. """ type Locations { regions: [RegionInfo!]! locations: [Location!]! } """ A member of an organisation. """ type Member { user: MemberUser! role: Role! joinedAt: DateTime! lastActiveAt: DateTime } """ The user of a membership. """ type MemberUser { id: ID! name: String! email: String! totpEnabled: Boolean! } """ A monitor: what is checked, from where, and its live state. """ type Monitor { id: ID! name: String! kind: MonitorKind! """ Check settings for the kind; secret values are never returned. """ spec: JSON! intervalS: Int! """ Execution budget derived from the spec. """ timeoutMs: Int! """ `null` for `DOMAIN_EXPIRY`: each lookup runs from one location, chosen each day; and for `HEARTBEAT`, which runs no checks. """ locations: MonitorLocations """ `HEARTBEAT` only: the URL its job requests each time it runs. """ pingUrl: String failureThreshold: Int! recoveryThreshold: Int! degradedAfterMs: Int reminderIntervalS: Int labels: [String!]! contactIds: [ID!]! runState: RunState! systemPauseReason: SystemPauseReason state: MonitorState! """ Uptime over the last 24 hours; `null` when nothing was observed. """ uptime24h: Float """ Create and update responses only: `does_not_resolve`, `two_locations`. """ warnings: [String!]! """ Pass as `ifMatch` to updates. """ version: Int! createdAt: DateTime! updatedAt: DateTime! """ Check results, newest first (default the last 24 h, at most 7 days per request). `first` 1-1000 (default 50). """ results( from: DateTime, to: DateTime, """ Location code """ location: String, outcome: Outcome, first: Int, after: String ): CheckResultConnection! """ `HEARTBEAT` only: the newest pings, newest first (the newest 100 are kept). `first` 1-100 (default 50). """ pings(first: Int): [HeartbeatPing!]! """ Uptime over standard windows (default all four), or over `from`..`to`. """ uptime(windows: [TimeWindow!], from: DateTime, to: DateTime): [Uptime!]! """ Status periods between `from` and `to`. """ timeline(from: DateTime, to: DateTime): [StatusPeriod!]! """ Response times per location over a window. """ series(range: TimeWindow! = LAST_24H): Series! """ This monitor's incidents, newest first. """ incidents(first: Int, after: String): IncidentConnection! """ The open incident, if any. """ openIncident: Incident """ Contacts notified about this monitor. """ contacts: [Contact!]! } """ A page of a list. """ type MonitorConnection { nodes: [Monitor!]! pageInfo: PageInfo! } """ A new monitor (REST `MonitorInput`). """ input MonitorInput { name: String! kind: MonitorKind! """ Check settings for the kind, e.g. `{"url": "https://example.com/"}`. """ spec: JSON! """ 30, 60, 120, 300, 600, 900, 1800 or 3600, at least the plan minimum. `DOMAIN_EXPIRY`: 86400 only. `HEARTBEAT`: the period between pings, 60-604800 (no plan minimum). """ intervalS: Int! """ Required, except for `DOMAIN_EXPIRY` and `HEARTBEAT`, which must omit it. """ locations: MonitorLocationsInput """ 1-10, default 2; `DOMAIN_EXPIRY` and `HEARTBEAT` 1 only. """ failureThreshold: Int """ 1-10, default 2; `DOMAIN_EXPIRY` and `HEARTBEAT` 1 only. """ recoveryThreshold: Int """ `HTTP_ADV` only; `null` = off. """ degradedAfterMs: Int """ 900-86400; `null` = no reminders. """ reminderIntervalS: Int labels: [String!] """ Omitted: the contacts marked auto-attach. """ contactIds: [ID!] paused: Boolean } """ Check type of a monitor. """ enum MonitorKind { ICMP HTTP HTTP_ADV TCP SSL_EXPIRY DOMAIN_EXPIRY IMAP SMTP HEARTBEAT } """ State of one location of a monitor. """ type MonitorLocationState { code: String! status: SlotStatus! """ Code of the location standing in for this one, if any. """ substitute: String lastResultAt: DateTime latencyMs: Int errorKind: ErrorKind } """ A monitor's locations. """ type MonitorLocations { mode: LocationMode! regions: [Region!] codes: [String!] """ Location codes the monitor runs from now. """ resolved: [String!]! } """ Where a monitor checks from. """ input MonitorLocationsInput { mode: LocationMode! """ With `mode: REGIONS`. """ regions: [Region!] """ Location codes, with `mode: LOCATIONS`. """ codes: [String!] } """ Changes to a monitor (REST `MonitorPatch`); the kind cannot change. """ input MonitorPatch { name: String """ Merged into the stored spec (JSON Merge Patch): arrays are replaced whole; `null` members clear. """ spec: JSON intervalS: Int locations: MonitorLocationsInput failureThreshold: Int recoveryThreshold: Int degradedAfterMs: Int reminderIntervalS: Int labels: [String!] contactIds: [ID!] """ `false` runs the same checks as `resumeMonitor`. """ paused: Boolean } """ `{ id, name }` of a monitor. """ type MonitorRef { id: ID! name: String! } """ Sort of the monitor list. """ enum MonitorSort { CREATED_AT NAME STATUS STATUS_SINCE } """ Live state of a monitor. """ type MonitorState { status: MonitorStatus! statusSince: DateTime! lastResultAt: DateTime openIncidentId: ID locations: [MonitorLocationState!]! """ `HEARTBEAT` only: when the newest ping arrived. """ lastPingAt: DateTime } """ Status of a monitor. """ enum MonitorStatus { UNKNOWN UP DOWN DEGRADED NO_DATA PAUSED } type Mutation { """ Create a monitor (member role). `idempotencyKey` (8-64 characters `[A-Za-z0-9_-]`) makes a retry return the first result. """ createMonitor(orgId: ID, input: MonitorInput!, idempotencyKey: String): Monitor! """ Change a monitor (member role). `ifMatch` is the `version` you read; a stale one fails with `precondition_failed`. """ updateMonitor(orgId: ID, id: ID!, patch: MonitorPatch!, ifMatch: Int): Monitor! """ Delete a monitor and its history (member role). Returns its id. """ deleteMonitor(orgId: ID, id: ID!, ifMatch: Int): ID! """ Pause a monitor (member role): no checks, no alerts. """ pauseMonitor(orgId: ID, id: ID!): Monitor! """ Resume a paused monitor (member role); checks plan limits. """ resumeMonitor(orgId: ID, id: ID!): Monitor! """ Replace the contacts a monitor notifies (member role). """ setMonitorContacts(orgId: ID, id: ID!, contactIds: [ID!]!): Monitor! """ Acknowledge an open incident (member role): stops reminders. """ acknowledgeIncident(orgId: ID, id: ID!): Incident! """ Add a note (1-2000 characters) to an incident's timeline (member role). """ addIncidentNote(orgId: ID, id: ID!, body: String!): IncidentEvent! """ Create a contact (member role). Email, SMS, voice and Teams contacts start unverified and are sent a code (see `verifyContact`). """ createContact(orgId: ID, input: ContactInput!, idempotencyKey: String): Contact! """ Change a contact (member role). """ updateContact(orgId: ID, id: ID!, patch: ContactPatch!, ifMatch: Int): Contact! """ Delete a contact (member role). Returns its id. """ deleteContact(orgId: ID, id: ID!, ifMatch: Int): ID! """ Re-enable a disabled contact (member role). """ enableContact(orgId: ID, id: ID!): Contact! """ Stop notifying a contact (member role). """ disableContact(orgId: ID, id: ID!): Contact! """ Send (again) the verification code of an email, SMS, voice or Teams contact, or re-check a Pushover, Discord, PagerDuty, Slack or webhook one (member role). """ sendContactVerification(orgId: ID, id: ID!): Boolean! """ Verify an email, SMS, voice or Teams contact with the code it received (member role). """ verifyContact(orgId: ID, id: ID!, code: String!): Contact! """ Send a test notification to a contact (member role). Returns the notification's id; follow it with `organization { notification(id) }`. """ sendContactTest(orgId: ID, id: ID!, idempotencyKey: String): ID! """ Replace the monitors that notify a contact (member role). """ setContactMonitors(orgId: ID, id: ID!, monitorIds: [ID!]!): Contact! } """ One notification to one contact. """ type Notification { id: ID! kind: NotificationKind! channel: ChannelKind! status: NotificationStatus! statusReason: NotificationStatusReason contact: ContactRef monitorId: ID incidentId: ID attempts: Int! nextAttemptAt: DateTime createdAt: DateTime! finishedAt: DateTime lastError: String deliveries: [Delivery!]! } """ A page of a list. """ type NotificationConnection { nodes: [Notification!]! pageInfo: PageInfo! } """ Kind of a notification. """ enum NotificationKind { DOWN RECOVERED DEGRADED FLAPPING REMINDER TEST FALLBACK ACCOUNT_NOTICE PUSHOVER_CANCEL } """ Status of a notification. """ enum NotificationStatus { PENDING SENDING SENT FAILED CANCELLED SUPPRESSED HELD } """ Why a notification has its status. """ enum NotificationStatusReason { SMS_CAP ANOMALY_BRAKE NOTIFY_HOLD CONTACT_DISABLED MONITOR_DELETED MONITOR_PAUSED PERMANENT_FAILURE GAVE_UP MAINTENANCE } """ Which changes notify a contact. """ enum NotifyOn { DOWN RECOVERED DEGRADED } """ Plan and subscription status of an organisation. """ type OrgBilling { plan: Plan! status: BillingStatus! } """ `{ id, name }` of an organisation. """ type OrgRef { id: ID! name: String! } """ Status of an organisation. """ enum OrgStatus { ACTIVE SUSPENDED DELETING } """ An organisation and everything in it. """ type Organization { id: ID! name: String! timezone: String! status: OrgStatus! """ Set while the organisation is scheduled for deletion. """ purgeAfter: DateTime """ The caller's role (an API token's effective role). """ myRole: Role! billing: OrgBilling! createdAt: DateTime! """ Monitor counts, open incidents and recent changes. """ overview: Overview! """ Monitors, filtered and sorted. `first` 1-500 (default 50). """ monitors( status: [MonitorStatus!], kind: [MonitorKind!], label: String, runState: [RunState!], contactId: ID, """ Substring of the name or target """ search: String, sort: MonitorSort, direction: SortDirection, first: Int, after: String ): MonitorConnection! """ One monitor. """ monitor(id: ID!): Monitor! """ Incidents, newest first. `first` 1-200 (default 50). """ incidents(status: IncidentStatus, monitorId: ID, severity: IncidentSeverity, from: DateTime, to: DateTime, first: Int, after: String): IncidentConnection! """ One incident, with its events and notifications. """ incident(id: ID!): Incident! """ Contacts. `first` 1-200 (default 50). """ contacts(kind: ChannelKind, status: ContactStatus, first: Int, after: String): ContactConnection! """ One contact. """ contact(id: ID!): Contact! """ The notification log, newest first. `first` 1-200 (default 50). """ notifications(contactId: ID, incidentId: ID, monitorId: ID, status: NotificationStatus, kind: NotificationKind, first: Int, after: String): NotificationConnection! """ One notification and its delivery attempts. """ notification(id: ID!): Notification! """ Members and their roles. """ members: [Member!]! """ The audit log, newest first (admin role). `first` 1-200 (default 50). """ auditLog( """ Exact action, e.g. `monitor.updated` """ action: String, """ Actor user id """ actor: ID, first: Int, after: String ): AuditEntryConnection! """ Effective plan limits and current usage: `{entitlements, usage}`. """ entitlements: JSON! } """ Outcome of a check. """ enum Outcome { UP DEGRADED DOWN ERROR } """ The organisation's dashboard summary. """ type Overview { monitors: OverviewMonitors! """ Newest first, at most 20. """ openIncidents: [Incident!]! """ The last 20 status changes. """ recentChanges: [OverviewChange!]! usage: OverviewUsage! } """ A recent status change. """ type OverviewChange { monitor: MonitorRef! from: MonitorStatus to: MonitorStatus! at: DateTime! incidentId: ID } """ Counts of monitors by status. """ type OverviewMonitors { total: Int! up: Int! down: Int! degraded: Int! noData: Int! unknown: Int! paused: Int! } """ Plan usage on the overview. """ type OverviewUsage { monitorsUsed: Int! monitorsLimit: Int! smsCreditsUsed: Int! smsCreditsLimit: Int! smsPeriodEnd: DateTime! } """ Paging state of a connection. """ type PageInfo { """ Pass as `after` for the next page. """ endCursor: String hasNextPage: Boolean! } """ Whether a heartbeat's job reported success or failure. """ enum PingKind { SUCCESS FAIL } """ A plan. """ enum Plan { TRIAL STARTER PRO BUSINESS } """ What the provider reported later. """ enum ProviderStatus { DELIVERED UNDELIVERED FAILED BOUNCED COMPLAINT ACKNOWLEDGED } type Query { """ The calling API token, its organisation and effective role; `null` when signed in with a session. """ token: TokenInfo """ An organisation. `id` defaults to an API token's own organisation; it is required with a session. """ organization(id: ID): Organization! """ Active check locations and their regions (public). """ locations: Locations! } """ A region of locations. """ enum Region { EU NA SA AS OC AF } """ A region. """ type RegionInfo { code: Region! name: String! } """ How an incident ended. """ enum Resolution { RECOVERED PAUSED } """ A member's role. """ enum Role { OWNER ADMIN MEMBER VIEWER } """ Whether the scheduler runs a monitor. """ enum RunState { ACTIVE PAUSED SYSTEM_PAUSED } """ The response-time chart of a monitor. """ type Series { range: String! stepS: Int! from: DateTime! to: DateTime! series: [SeriesLine!]! bands: [SeriesBand!]! } """ A non-up period in a series. """ type SeriesBand { from: DateTime! to: DateTime! status: MonitorStatus! } """ Response times of one location: `[unix seconds, latency ms or null]`. """ type SeriesLine { location: String! points: [[Int]!]! } """ Status of one location of a monitor. """ enum SlotStatus { UP DOWN DEGRADED NO_DATA } """ Sort direction. """ enum SortDirection { ASC DESC } """ A period with one status. """ type StatusPeriod { status: MonitorStatus! startedAt: DateTime! endedAt: DateTime incidentId: ID } """ Why the system paused a monitor. """ enum SystemPauseReason { BILLING PLAN_LIMIT ORG_SUSPENDED ORG_DELETING ADMIN } """ A standard time window (uptime windows, series ranges). """ enum TimeWindow { LAST_24H LAST_7D LAST_30D LAST_90D } """ The calling API token. """ type TokenInfo { token: ApiToken! org: OrgRef! """ `min(token role, creator's current role)`: what the token may do. """ effectiveRole: TokenRole! } """ An API token's role. """ enum TokenRole { ADMIN MEMBER VIEWER } """ Uptime over a window. """ type Uptime { """ `24h`, `7d`, `30d`, `90d`; `null` for an explicit `from`/`to`. """ window: String from: DateTime! to: DateTime! """ `null` when nothing was observed. """ uptimeRatio: Float observedS: Int! downS: Int! degradedS: Int! noDataS: Int! pausedS: Int! unknownS: Int! } """ `{ id, name }` of a user. """ type UserRef { id: ID! name: String! } """ Why a check ran. """ enum WorkKind { ROUND RECHECK SHADOW CANARY PREVIEW TRACE } """ Directs the executor to include this field or fragment only when the `if` argument is true. """ directive @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT """ Directs the executor to skip this field or fragment when the `if` argument is true. """ directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT schema { query: Query mutation: Mutation }