# JSON API status

![Status page - JSON subscription .png](https://imagedelivery.net/xZXo0QFi-1_4Zimer-T0XQ/569b9732-b0a0-40c9-4928-06995625d200/lg2x =2572x796)

Access your status page data programmatically through a public JSON API endpoint. Poll the endpoint to retrieve current status, historical uptime data, and incident information in a structured format.

## Access the JSON endpoint

Add `/index.json` to the end of any status page URL:

```
[label JSON API endpoint format]
https://status.example.com/index.json
```

This returns a JSON response with complete status page data.

## Response structure

The JSON API returns a [JSON:API](https://jsonapi.org/) compliant response with the following structure:

```json
[label Complete JSON response structure]
{
  "data": {
    "id": "165",
    "type": "status_page",
    "attributes": {
      "company_name": "Your Company",
      "company_url": "https://example.com",
      "contact_url": "https://example.com/support",
      "logo_url": "https://example.com/logo.png",
      "timezone": "America/New_York",
      "subdomain": "your-company-status",
      "custom_domain": "status.example.com",
      "announcement": "Scheduled maintenance tonight at 2am EST",
      "aggregate_state": "operational",
      "created_at": "2025-01-15T10:30:00.000Z",
      "updated_at": "2025-02-16T14:20:00.000Z"
    },
    "relationships": {
      "sections": { "data": [...] },
      "resources": { "data": [...] },
      "status_reports": { "data": [...] }
    }
  },
  "included": [...]
}
```

## Status page attributes

### Main status page data

Located in `data.attributes`:

| Field | Type | Description |
|-------|------|-------------|
| `company_name` | string | Your company name |
| `company_url` | string | Your company website URL |
| `contact_url` | string | Support or contact URL |
| `logo_url` | string | Logo image URL |
| `timezone` | string | Status page timezone |
| `subdomain` | string | Better Stack subdomain |
| `custom_domain` | string | Custom domain if configured |
| `announcement` | string | Current system announcement text |
| `aggregate_state` | string | Overall status indicator |
| `created_at` | string | Status page creation date (ISO 8601) |
| `updated_at` | string | Last update timestamp (ISO 8601) |

### Aggregate state values

The `aggregate_state` field indicates overall system status:

- `operational` - All services working normally
- `degraded` - Some services experiencing issues
- `downtime` - Major service disruption
- `maintenance` - Scheduled maintenance in progress

## Included resources

The `included` array contains detailed information about:

### Status page sections

Sections organize your monitors into logical groups:

```json
[label Section structure]
{
  "id": "163",
  "type": "status_page_section",
  "attributes": {
    "name": "Core Services",
    "position": 1
  }
}
```

### Status page resources

Individual monitors with availability and status history:

```json
[label Resource structure]
{
  "id": "365",
  "type": "status_page_resource",
  "attributes": {
    "status_page_section_id": 163,
    "resource_id": 1499,
    "resource_type": "Monitor",
    "public_name": "API Gateway",
    "explanation": "RESTful API endpoint",
    "position": 0,
    "availability": 99.95,
    "status": "operational",
    "status_history": [
      {
        "day": "2025-02-16",
        "status": "operational",
        "downtime_duration": 0,
        "maintenance_duration": 0
      }
    ]
  }
}
```

#### Resource status values

- `operational` - Service working normally
- `degraded` - Service experiencing issues
- `downtime` - Service unavailable
- `maintenance` - Service under maintenance
- `not_monitored` - Service not being monitored during this period

#### Status history

Each resource includes 90 days of historical data with:

- `day` - Date in YYYY-MM-DD format
- `status` - Service status on that day
- `downtime_duration` - Total downtime in seconds
- `maintenance_duration` - Total maintenance time in seconds

### Status reports

Active incidents and maintenance windows:

```json
[label Status report structure]
{
  "id": "327",
  "type": "status_report",
  "attributes": {
    "title": "Database Connection Issues",
    "report_type": "manual",
    "starts_at": "2025-02-16T10:30:00.000Z",
    "ends_at": null,
    "affected_resources": [
      {
        "status_page_resource_id": "365",
        "status": "downtime"
      }
    ],
    "aggregate_state": "downtime"
  },
  "relationships": {
    "status_updates": {
      "data": [
        { "id": "512", "type": "status_update" }
      ]
    }
  }
}
```

#### Report types

- `manual` - Manually created incident
- `automatic` - Automatically created from monitor failure
- `maintenance` - Scheduled maintenance window

### Status updates

Individual updates posted to incidents:

```json
[label Status update structure]
{
  "id": "512",
  "type": "status_update",
  "attributes": {
    "message": "We've identified the issue and are working on a fix",
    "published_at": "2025-02-16T11:45:00.000Z",
    "published_at_timezone": "America/New_York",
    "notify_subscribers": true,
    "affected_resources": [
      {
        "status_page_resource_id": "365",
        "status": "downtime"
      }
    ]
  }
}
```

## Need help?

Please let us know at hello@betterstack.com.
We're happy to help! 🙏
