# Read a shared receipt

- **OpenAPI Version:** `3.2.0`
- **API Version:** `3.1.0`
- **Contact:** Syndai <https://syndai.ai>

## Contents

**Operations**

- [GET /api/v1/public/receipts/{token}](#scalar-operation-get-apiv1publicreceiptstoken)

**Schemas**

- [PublicReceiptView](#scalar-schema-publicreceiptview)
- [ProblemDetail](#scalar-schema-problemdetail)
- [ExternalErrorCode](#scalar-schema-externalerrorcode)

<a id="scalar-context-global-servers"></a>

## Servers

- **URL:** `https://api.syndai.ai`

<a id="scalar-context-global-authentication"></a>

## Authentication

- **CustomerApiKey**: HTTP bearer (`API Key`)

  Customer API key sent as a bearer token

## Tags

### Receipts

Public, unauthenticated reads of a shared run receipt: the receipt, its visual evidence, white-label branding, and an embeddable SVG badge. The token in the share link is the credential; revoking the share makes every route 404.

## Operations

<a id="scalar-operation-get-apiv1publicreceiptstoken"></a>

### Read a shared receipt

- **Method:** `GET`
- **Path:** `/api/v1/public/receipts/{token}`
- **Operation ID:** `getPublicReceipt`
- **Tags:** Receipts

Returns the public receipt for a run share link: what was asked, what was delivered, and how it was verified. No API key; the token in the link is the credential. A revoked, unknown or malformed link returns 404. Responses are never cached, so a revoke takes effect immediately.

**Servers:** [Inherited servers](#scalar-context-global-servers)

#### Authentication

No authentication required.

#### Path parameters

- **`token` (required)**: `string`

#### Responses

##### 200 Request fulfilled, document follows

**Headers:**

- **`cache-control`**

  `string`

**Content type:** `application/json`

[PublicReceiptView](#scalar-schema-publicreceiptview)

**Example:**

```json
{
  "alg": "EdDSA",
  "issued_at": "2026-10-27T09:00:00Z",
  "jwks_url": "https://syndai.ai/.well-known/syndai-receipt-keys.json",
  "kid": "NzbLsXh8uDCcd-6MNwXF4W_7noWXFZAfHkxZsRGC9Xs",
  "payload": {
    "coding_run_id": "3f9c2b7a-6d1e-4c8b-9a2f-1b7e5d4c3a21",
    "criteria": [
      {
        "label": "AC1",
        "verdict": "VERIFIED"
      }
    ],
    "issuer": "https://syndai.ai",
    "tree_sha": "4b825dc642cb6eb9a060e54bf8d69288fbee4904"
  },
  "payload_hash": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae",
  "signature": "c2lnbmF0dXJlLWV4YW1wbGU"
}
```

##### 400, 404

- `400` Bad request syntax or unsupported method
- `404` Resource not found

**Content type:** `application/problem+json`

[ProblemDetail](#scalar-schema-problemdetail)

RFC 7807 problem detail returned for public CaaS errors.

<a id="scalar-example-1"></a>

**Generated example:**

```json
{
  "code": "BUDGET_EXHAUSTED",
  "detail": null,
  "existing_run_id": null,
  "instance": null,
  "status": 1,
  "title": "",
  "type": "about:blank",
  "additionalProperty": "anything"
}
```

##### 429 Rate limit exceeded

**Headers:**

- **`Retry-After`**

  Seconds to wait before retrying the request

  `integer`

**Content type:** `application/problem+json`

[ProblemDetail](#scalar-schema-problemdetail)

RFC 7807 problem detail returned for public CaaS errors.

[Generated example](#scalar-example-1)

##### default Unexpected error

**Content type:** `application/problem+json`

[ProblemDetail](#scalar-schema-problemdetail)

<a id="scalar-example-2"></a>

**Generated example:**

```json
null
```

## Schemas

<a id="scalar-schema-publicreceiptview"></a>

### PublicReceiptView

**Type:** `object`

- **`alg` (required)**: `string`
- **`issued_at` (required)**: `string`, format: `date-time`
- **`jwks_url` (required)**: `string`
- **`kid` (required)**: `string`
- **`payload` (required)**: `object`
- **`payload_hash` (required)**: `string`
- **`signature` (required)**: `string`

**Example:**

```json
{
  "alg": "EdDSA",
  "issued_at": "2026-10-27T09:00:00Z",
  "jwks_url": "https://syndai.ai/.well-known/syndai-receipt-keys.json",
  "kid": "NzbLsXh8uDCcd-6MNwXF4W_7noWXFZAfHkxZsRGC9Xs",
  "payload": {
    "coding_run_id": "3f9c2b7a-6d1e-4c8b-9a2f-1b7e5d4c3a21",
    "criteria": [
      {
        "label": "AC1",
        "verdict": "VERIFIED"
      }
    ],
    "issuer": "https://syndai.ai",
    "tree_sha": "4b825dc642cb6eb9a060e54bf8d69288fbee4904"
  },
  "payload_hash": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae",
  "signature": "c2lnbmF0dXJlLWV4YW1wbGU"
}
```

<a id="scalar-schema-problemdetail"></a>

### ProblemDetail

**Type:** `object`

RFC 7807 problem detail returned for public CaaS errors.

- **`code` (required)**: `string`, possible values: `"BUDGET_EXHAUSTED", "QUOTA_EXCEEDED", "RUN_CONCURRENCY_LIMIT", "CUSTOMER_DISABLED", "REPO_NOT_BOUND", "IDEMPOTENCY_REPLAY", "CONFLICT", "MISSION_BUSY_RETRY", "HITL_REQUEST_CONFLICT", "HITL_REQUEST_SETTLED", "RUN_TERMINATED_BEFORE_RESPONSE", "INVALID_POLICY", "INVALID_SCOPE", "RATE_LIMITED", "INSTALLATION_INCOMPLETE", "SUBSCRIPTION_USAGE_UNAVAILABLE", "INVALID_TOKEN", "ROLE_REQUIRED", "PLAN_UPGRADE_REQUIRED", "EMAIL_MISMATCH", "EXPIRED_TOKEN", "NOT_FOUND", "OVERSCOPE_ACK_REQUIRED", "VERIFY_FAILED", "PUBLISH_IN_FLIGHT", "PUBLISH_UNSUPPORTED_REPO", "PUBLICATION_NOT_LIVE", "NO_APP_DATA", "FEATURE_REQUESTS_NEEDS_MEMBERS", "EMPTY_UPDATE", "BAD_CURSOR", "HUMAN_APPROVAL_REQUIRED", "PROTECTED_PATHS_MANAGED_ONLY", "RUN_IN_FLIGHT", "TEXT_EDIT_REFUSED", "CLI_UPGRADE_REQUIRED", "PRODUCTION_STEP_UP_REQUIRED", "PRICES_UPDATING", "GITHUB_UNAVAILABLE", "PUBLISH_NOT_SET_UP", "VERSION_NOT_DEPLOYED", "INTERNAL_ERROR"`

  Stable error codes surfaced to public CaaS clients.
- **`status` (required)**: `integer`
- **`title` (required)**: `string`
- **`detail`**: `string | null`, default: `null`
- **`existing_run_id`**: `string | null`, default: `null`
- **`instance`**: `string | null`, default: `null`
- **`type`**: `string`, default: `"about:blank"`

<a id="scalar-example-3"></a>

**Generated example:**

```json
{
  "code": "BUDGET_EXHAUSTED",
  "detail": null,
  "existing_run_id": null,
  "instance": null,
  "status": 1,
  "title": "",
  "type": "about:blank",
  "additionalProperty": "anything"
}
```

<a id="scalar-schema-externalerrorcode"></a>

### ExternalErrorCode

**Type:** `string`, possible values: `"BUDGET_EXHAUSTED", "QUOTA_EXCEEDED", "RUN_CONCURRENCY_LIMIT", "CUSTOMER_DISABLED", "REPO_NOT_BOUND", "IDEMPOTENCY_REPLAY", "CONFLICT", "MISSION_BUSY_RETRY", "HITL_REQUEST_CONFLICT", "HITL_REQUEST_SETTLED", "RUN_TERMINATED_BEFORE_RESPONSE", "INVALID_POLICY", "INVALID_SCOPE", "RATE_LIMITED", "INSTALLATION_INCOMPLETE", "SUBSCRIPTION_USAGE_UNAVAILABLE", "INVALID_TOKEN", "ROLE_REQUIRED", "PLAN_UPGRADE_REQUIRED", "EMAIL_MISMATCH", "EXPIRED_TOKEN", "NOT_FOUND", "OVERSCOPE_ACK_REQUIRED", "VERIFY_FAILED", "PUBLISH_IN_FLIGHT", "PUBLISH_UNSUPPORTED_REPO", "PUBLICATION_NOT_LIVE", "NO_APP_DATA", "FEATURE_REQUESTS_NEEDS_MEMBERS", "EMPTY_UPDATE", "BAD_CURSOR", "HUMAN_APPROVAL_REQUIRED", "PROTECTED_PATHS_MANAGED_ONLY", "RUN_IN_FLIGHT", "TEXT_EDIT_REFUSED", "CLI_UPGRADE_REQUIRED", "PRODUCTION_STEP_UP_REQUIRED", "PRICES_UPDATING", "GITHUB_UNAVAILABLE", "PUBLISH_NOT_SET_UP", "VERSION_NOT_DEPLOYED", "INTERNAL_ERROR"`

Stable error codes surfaced to public CaaS clients.
