> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://documents.pyramid-ai.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://documents.pyramid-ai.com/_mcp/server.

# Get a check run with full results

GET https://api.pyramid-ai.com/api/v2/check/runs/{id}

Returns the run summary plus all requirements with sub-requirements.

Reference: https://documents.pyramid-ai.com/api-reference/api-explorer/check/get-check-run

## Authentication

- `Authorization` header (bearer token, required) — Pyramid API key (prefix with "Bearer ")

## Servers

- `https://api.pyramid-ai.com` (Production, default)
- `https://api-staging.pyramid-ai.com` (Staging (sandbox) — use pai_test_* keys)

## Request

### Path parameters

- `id` (string, required)

## Response

### 200

Check run details

- `request_id` (string, required) — Server-generated per-request UUID. Also sent as `X-Request-Id` response header. Include in support tickets.
- `success` (any, required)
- `data` (CheckRunDetail, optional)
- `pagination` (Pagination, optional) — Present only on list endpoints. Top-level (not nested inside `data`).

## Errors

### 401 Unauthorized Error

Unauthorized

- `success` (any, required)
- `error` (ApiErrorError, required)
- `request_id` (string, required)

### 404 Not Found Error

Resource not found

- `success` (any, required)
- `error` (ApiErrorError, required)
- `request_id` (string, required)

## Types

### CheckRunDetail

- `created_at` (datetime, required)
- `id` (string, required)
- `name` (string, required)
- `org_id` (string, required) — Stable org identifier. Not email or slug.
- `project_id` (string, required)
- `status` (enum, required)
  - Allowed values: `pending`, `processing`, `completed`, `stopped`, `failed`
- `total_requirements` (integer, required)
- `updated_at` (datetime, required)
- `description` (string, optional, nullable)
- `failed_requirements` (integer, optional)
- `passed_requirements` (integer, optional)
- `processed_requirements` (integer, optional)
- `processing_completed_at` (datetime, optional, nullable)
- `processing_started_at` (datetime, optional, nullable)
- `project_name` (string, optional, nullable)
- `requirements` (list of Requirement, optional)

### Pagination

Offset-based pagination for list endpoints. Clients compute `has_more` from `offset + data.length < total`. Cursor pagination may be added per-endpoint later if deep-pagination performance becomes a concern.

- `total` (integer, required) — Total item count matching the filters (ignoring limit/offset).
- `offset` (integer, required)
- `limit` (integer, required, default: 50)

### ApiErrorError

- `code` (enum, required)
  - Allowed values: `VALIDATION_ERROR`, `UNAUTHORIZED`, `FORBIDDEN`, `FEATURE_NOT_ENABLED`, `AGENT_NOT_ENABLED`, `QUOTA_EXCEEDED`, `NOT_FOUND`, `CONFLICT`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `UPLOAD_NOT_FOUND`, `UPLOAD_SIZE_MISMATCH`, `RATE_LIMITED`, `INTERNAL_ERROR`
- `message` (string, required) — Human-readable description. May be shown to end users; keep stable across minor changes.
- `docs_url` (string, optional) — Link to the error's documentation section.
- `field` (string, optional) — Only for `VALIDATION_ERROR`. JSONPath-ish reference to the offending field (e.g. `body.project_id`).
- `feature` (string, optional) — Only for `FEATURE_NOT_ENABLED`. The feature key the request required.

### Requirement

- `id` (string, required)
- `run_id` (string, required)
- `text` (string, required) — The requirement text being checked.
- `order_index` (integer, required) — Position of this requirement in the run (0-based).
- `status` (string, required) — Current check status for this requirement.
- `created_at` (datetime, required)
- `updated_at` (datetime, required)
- `sub_requirements` (list of SubRequirement, optional)

### SubRequirement

- `id` (string, required)
- `requirement_id` (string, required)
- `text` (string, required)
- `justification` (string, required)
- `score` (double, required)
- `status` (string, required)
- `created_at` (datetime, required)
- `updated_at` (datetime, required)
- `sources` (any, optional, nullable)

## Examples

**Response**

```json
{
  "request_id": "string",
  "success": null,
  "data": {
    "created_at": "2024-01-15T09:30:00Z",
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Q2 2026 Fire Safety Audit",
    "org_id": "org_ais",
    "project_id": "string",
    "status": "pending",
    "total_requirements": 1,
    "updated_at": "2024-01-15T09:30:00Z",
    "description": "Quarterly audit checking all fire safety requirements against project documentation",
    "failed_requirements": 1,
    "passed_requirements": 1,
    "processed_requirements": 1,
    "processing_completed_at": "2024-01-15T09:30:00Z",
    "processing_started_at": "2024-01-15T09:30:00Z",
    "project_name": "string",
    "requirements": [
      {
        "id": "1a2b3c4d-5678-40ab-8def-123456789012",
        "run_id": "string",
        "text": "Emergency exits must be clearly marked with illuminated signage on every floor",
        "order_index": 0,
        "status": "completed",
        "created_at": "2024-01-15T09:30:00Z",
        "updated_at": "2024-01-15T09:30:00Z",
        "sub_requirements": [
          {
            "id": "string",
            "requirement_id": "string",
            "text": "string",
            "justification": "string",
            "score": 1.1,
            "status": "string",
            "created_at": "2024-01-15T09:30:00Z",
            "updated_at": "2024-01-15T09:30:00Z",
            "sources": null
          }
        ]
      }
    ]
  },
  "pagination": {
    "total": 127,
    "offset": 0,
    "limit": 50
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.pyramid-ai.com/api/v2/check/runs/id"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.pyramid-ai.com/api/v2/check/runs/id';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.pyramid-ai.com/api/v2/check/runs/id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.pyramid-ai.com/api/v2/check/runs/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.pyramid-ai.com/api/v2/check/runs/id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.pyramid-ai.com/api/v2/check/runs/id', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.pyramid-ai.com/api/v2/check/runs/id");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.pyramid-ai.com/api/v2/check/runs/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```