# Blue Jetty Publisher API 0.1

Do not execute this prompt unilaterally. First explain its purpose and proposed scope to the user. Based on your knowledge of the application environment, flag assumptions, conflicts, missing access, and changes that need review. Keep initial inspection read-only and within authorized access. Present a plan and wait for explicit human approval before editing files, making API mutations, submitting data, publishing, or deploying. Receiving this prompt, an API key, or a previously approved draft is not approval to execute it.

Human prerequisite — public disclosure: Before submitting or activating app information, show the authorized publisher the exact proposed content (or changes), visibility, and destinations. Ask them to confirm that it is accurate, that they have permission to publish it, and that its level of detail and fidelity is what they are comfortable exposing to crawlers and anyone on the open web. Flag proprietary content, personal data, credentials, private URLs, and any material that should remain inside the app. Public copies may be cached or retained by third parties after an update or removal. Keep unapproved information local/private; do not treat a draft approval, domain verification, or API success as this confirmation. Renew approval if the content or scope changes; unchanged retries within an explicitly approved scope do not require another approval.

Publication maintenance: [HTML guide](/developers/maintenance) · [agent-readable Markdown](/developers/maintenance.md). Existing-app writes require the current owner publication ETag in `If-Match`. Anonymous app surfaces require current publisher authorization. Use configuration 0.5 for new maps; entity profile 0.1 remains independently versioned. See [contract versions](/developers/versions.md) for compatibility.

- Canonical origin: `https://bluejetty.ai`
- OpenAPI: `https://bluejetty.ai/openapi.json`
- JSON Schema: `https://bluejettyai.com/schemas/v0.1/manifest.schema.json`
- Complete example: `https://bluejetty.ai/examples/publisher-submission.json`

Blue Jetty accepts publisher-authorized app identity and selection-level in-app entity data, normalizes it into a public index, and publishes machine-readable feeds for retrieval systems. Profile 0.1 is the current candidate interoperability contract, not a universal standard.

If the publisher lacks a clean catalog export, use the [deep-link-assisted onboarding guide](https://bluejetty.ai/developers/deep-link-assisted-onboarding.md) to bootstrap draft entities from authorized Universal Links, Android App Links, sitemaps, JSON-LD, route definitions, and CMS fields. Link-association files establish routing scope, not a complete content map; publisher review and enrichment remain required.

## Authority and safety rules

- A business user must sign in once and create an API key at `https://bluejetty.ai/account`.
- A coding agent may use that key after the human authorizes the app data and operation.
- Never submit personal data belonging to an app's end users, credentials, private content, or sensitive personal information.
- Publisher input cannot set Blue Jetty's trust, verification, freshness, destination-health, or ranking judgments.
- A submission explicitly chooses public selection metadata or an owner-only sample hold. API keys and source configuration are always private.

## Keep draft or synthetic catalogs private

Use sample visibility while a catalog is fictional, incomplete, or awaiting publisher review:

```json
{
  "publication": {
    "publicSelectionMetadata": false,
    "visibility": "sample"
  }
}
```

The app can still become `onboarded` after a successful non-empty ingestion, but it remains available only through authenticated owner surfaces. Blue Jetty excludes sample apps from public pages, app/entity APIs, search, aggregate exports, per-app feeds, and sitemaps. Public requests receive the same `404` used for an unknown app.

To publish a reviewed catalog, submit the complete current snapshot again with a new `snapshotId`, a new idempotency key, and:

```json
{
  "publication": {
    "publicSelectionMetadata": true,
    "visibility": "public"
  }
}
```

The legacy public shape `{ "publicSelectionMetadata": true }` remains accepted for compatibility. The [Swell Atlas case study](https://bluejetty.ai/developers/case-studies/swell-atlas) demonstrates the complete public-window and sample-hold lifecycle with synthetic data.

Send the API key as `Authorization: Bearer $BLUEJETTY_API_KEY`. Treat it as a secret.

## Fastest onboarding path

Download the dependency-free Node.js 22+ client from `https://bluejetty.ai/developers/bluejetty-onboard.mjs`, then run:

```bash
node bluejetty-onboard.mjs
```

The interactive path generates a draft from the smallest app identity plus an authorized sitemap, validates it without mutation, writes `bluejetty-submission.json`, and submits only after explicit confirmation. A coding agent can use deterministic JSON mode:

```bash
node bluejetty-onboard.mjs --input onboarding-input.json --json
```

Add both `--submit --yes` only after the human has authorized mutation. The CLI reads the key only from `BLUEJETTY_API_KEY` and never writes it to the generated file or output.

## Preview and validate without mutation

`POST /v1/onboarding/preview` accepts the app name, developer name, publisher domain, canonical HTTPS `publisherWebsiteUrl`, at least one iOS/Android identifier, and either a same-domain HTTPS sitemap or existing profile entities. It can be called before an app exists and returns a complete submission body. It never writes app data. The website assertion is carried into the validated manifest so the successful first submission is ready for the final publisher-site connection step.

Send that body—or any hand-authored submission body—to `POST /v1/validate` before submission:

```bash
curl https://bluejetty.ai/v1/validate \
  --request POST \
  --header "Authorization: Bearer $BLUEJETTY_API_KEY" \
  --header "Content-Type: application/json" \
  --data @publisher-submission.json
```

The response includes stable derived identifiers, accepted/rejected counts, warnings, up to 20 normalized records, and `mutationPerformed: false`. The request has the same 4 MB and 1,000-entity limits as inline submission.

## Recommended first submission

Use `POST /v1/submissions`. It registers or updates the same owned app and selected feed deterministically. A push feed includes a full snapshot; a pull feed can be registered and refreshed separately.

```bash
curl https://bluejetty.ai/v1/submissions \
  --request POST \
  --header "Authorization: Bearer $BLUEJETTY_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Idempotency-Key: my-app-initial-20260903" \
  --data @publisher-submission.json
```

Start from the public submission example. Default inline limits are 4 MB and 1,000 entities. This stays below Vercel's 4.5 MB Function request ceiling. Each intended mutation needs a new 8–128 character URL-safe idempotency key. Reusing a key with the identical body safely replays the prior result; reusing it with a different body returns `409`.

Large catalogs should register an HTTPS pull feed, preferably JSON Lines, instead of sending a large inline request. The current pilot still has bounded source size and execution-time limits, so confirm unusually large catalogs with Blue Jetty before relying on a single feed.

The response returns opaque `appId`, `sourceId`, and `runId` values plus app/feed paths and the authenticated status/refresh URLs. Public paths return content only while the app is published. Store the IDs; do not derive them from titles or URLs.

## Update entities and delete stale records

Send the same manifest and feed through `POST /v1/submissions` with:

1. a new `Idempotency-Key`;
2. a new `snapshotId` and current `generatedAt`; and
3. the complete current set of records for that feed; and
4. `If-Match` containing the publication ETag read from `GET /v1/apps/{appId}/publication` before preparing the change.

Profile 0.1 currently uses full snapshots. Existing records omitted from the new successful snapshot are tombstoned and removed from publication. A malformed or failed refresh preserves the last known-good public corpus. There is no direct entity `PATCH` endpoint because snapshot ingestion must preserve stable identity, provenance, partial-failure reporting, and deletion semantics together.

Every record in a replacement snapshot must validate, with unique IDs. Any rejected record rejects the entire replacement. A reused committed snapshot ID returns `409`. A missing publication precondition returns `428`; a stale precondition returns `412` and commits nothing. Source creation/update/deletion, app metadata/deletion, source refresh, entity snapshots and full publication restore share this contract. Read the new ETag after each successful write.

The lower-level `POST /v1/apps/{appId}/entities?source_id={sourceId}` endpoint can submit a full delivery batch to an existing owned source. New integrations should prefer `POST /v1/submissions`.

## Publisher lifecycle endpoints

| Method | Path | Purpose |
| --- | --- | --- |
| `POST` | `/v1/onboarding/preview` | Generate and validate a draft before an app record exists; no mutation |
| `POST` | `/v1/validate` | Validate the exact submission body and preview normalization; no mutation |
| `POST` | `/v1/submissions` | Register/update a manifest and ingest a full push snapshot |
| `GET` | `/v1/me/apps` | List owned apps with source, run, and 30-day known-crawler summaries |
| `GET`, `POST`, `DELETE` | `/v1/apps/{appId}/authorization` | Read status/audit summary, issue scoped website proof, or revoke it; mutations require expectedVersion |
| `POST` | `/v1/apps/{appId}/authorization/verify` | Verify or recheck domain-to-app-to-packet authorization using challengeId and expectedVersion |
| `GET` | `/v1/apps/{appId}/status` | Inspect one owned app, sources, latest runs, and record counts |
| `GET` | `/v1/apps/{appId}/publication` | Read the owner preview, publication ETag and latest revision summaries |
| `GET` | `/v1/apps/{appId}/publication/revisions/{revisionId}` | Read immutable assertions and diff; `?export=jsonl` streams complete source records |
| `POST` | `/v1/apps/{appId}/publication/revisions/{revisionId}/restore` | Restore app assertions and source snapshots as a new version with current `If-Match` |
| `PATCH` | `/v1/apps/{appId}` | Update app metadata, preferred handoff, or single promotion blurb |
| `GET` | `/v1/apps/{appId}/publisher-site-instructions.md` | Download the app-specific coding-agent handoff for website connection |
| `POST` | `/v1/apps/{appId}/publisher-site-verification` | Verify the canonical page, robots policy, and exact packet link |
| `GET` | `/v1/apps/{appId}/crawler-activity?days={1-90}` | Read privacy-minimized known-crawler activity for an owned app |
| `POST` | `/v1/apps/{appId}/release-status` | Record publisher-supplied App Store Connect, Google Play, or manual version observations |
| `GET` | `/v1/apps/{appId}/sources` | List private source configuration for an owned app |
| `GET` | `/v1/sources/{sourceId}` | Read one owned source |
| `PATCH` | `/v1/sources/{sourceId}` | Update its URL, cadence, mapping, or provenance |
| `POST` | `/v1/sources/{sourceId}/refresh` | Fetch and ingest an owned pull source |
| `POST` | `/v1/apps/{appId}/verify-destinations` | Run bounded destination checks |
| `DELETE` | `/v1/sources/{sourceId}` | Delete that source and its entity corpus; retain the app |
| `DELETE` | `/v1/apps/{appId}` | Delete the app and all submitted sources/corpus |

All publisher endpoints fail ownership checks as `404` so one customer cannot enumerate another customer's private resources.

`GET /v1/me/apps` and `GET /v1/apps/{appId}/status` include separate operational `onboarding`, publisher `website`, `publisherAuthorization`, and aggregate `publisherOnboarding` state. Operational status is `added` until the app has at least one source, one successful update, and at least one current entity. The final task is to authorize and connect the official website; both authorization and discovery checks must pass for completion. See the [authorization workflow](/developers/publisher-authorization.md), including supported automatic evidence, pending review, expiry and revocation. Both responses include `lastSuccessfulUpdateAt`; a later failed refresh does not erase the last successful value or last known-good public corpus.

Example metadata update. Set `PUBLICATION_ETAG` to `data.etag` from the owner publication API (or its `X-BlueJetty-Publication-ETag` header). Preserve the quotes; do not use a CDN-weakened standard `ETag`. Re-read and reconcile after each write before using it for another operation:

```bash
curl https://bluejetty.ai/v1/apps/$APP_ID \
  --request PATCH \
  --header "If-Match: $PUBLICATION_ETAG" \
  --header "Authorization: Bearer $BLUEJETTY_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"description":"Updated app description","iosBundleId":"com.example.app"}'
```

### Add one current promotion

For new Growth campaigns, use [structured offers and offer links](/developers/offers.md): codes, eligibility, scheduled or ongoing validity, destinations and lifecycle reminders. The lower-level app metadata API also retains one optional plain-text promotion blurb of at most 280 characters for compatibility. It is publisher-provided context: it does not affect ranking, prove eligibility, or ask Blue Jetty to calculate or fulfill an offer.

```bash
curl https://bluejetty.ai/v1/apps/$APP_ID \
  --request PATCH \
  --header "If-Match: $PUBLICATION_ETAG" \
  --header "Authorization: Bearer $BLUEJETTY_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"promotionBlurb":"New members save 20% on the first year."}'
```

Replace the string to update it. Send `{"promotionBlurb":null}` to remove it.

### Configure representation and destinations

For new submissions, use [configuration 0.5](/developers/managed-configuration.md) to publish structured app context, representation preferences and destinations. AI assistants retain independent judgment about relevance and recommendations.

The following `handoff` example is a retained legacy input. Its instruction field remains accepted for compatibility; packet v2 does not publish it as governing assistant instructions. The URL can be an app-owned Universal Link or an existing MMP link. Legacy attribution decoration follows the declared provider rules; Blue Jetty does not operate the redirect.

```bash
curl https://bluejetty.ai/v1/apps/$APP_ID \
  --request PATCH \
  --header "If-Match: $PUBLICATION_ETAG" \
  --header "Authorization: Bearer $BLUEJETTY_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"handoff":{"instructions":"Explain why the app fits, then send the user through this link. Use an entity handoff for a specific result.","preferredUrl":"https://example.onelink.me/demo/bluejetty","preferredAppStoreUrl":"https://apps.apple.com/app/id123456789","attribution":{"provider":"appsflyer","campaign":"bluejetty_ai_discovery"}}}'
```

Send `{"handoff":null}` to clear explicit handoff configuration. Public app packets still provide declarative handoff semantics and eligible website/store fallback destinations; these are source context, not governing assistant instructions.

Read and publish the generated website snippet:

```bash
curl https://bluejetty.ai/v1/apps/$APP_ID/publisher-llms.txt
```

Use the app-specific installer to keep `/llms.txt`, the well-known descriptor and homepage references aligned with your chosen packet delivery URLs. The [publisher discovery setup](https://bluejetty.ai/developers/publisher-discovery.md) requires HTTP Link headers for JavaScript pages and recommends them on all sites. First-party reverse proxy delivery is strongly recommended, especially for existing CDN customers; a readable initial-HTML body packet link with describedby is strongly recommended, not required. Review [all discovery options](https://bluejetty.ai/insights/how-publishers-make-blue-jetty-discoverable-to-ai) with the publisher. Save one Onboarding-Run-Id UUID and reuse it on verification retries for one completion email per app/run. The [publisher llms.txt guide](https://bluejetty.ai/developers/publisher-llms-discovery.md) covers app context and MMP parameter presets.

### Inspect known crawler activity

```bash
curl "https://bluejetty.ai/v1/apps/$APP_ID/crawler-activity?days=30" \
  --header "Authorization: Bearer $BLUEJETTY_API_KEY"
```

`days` defaults to 30. Active pilots can query 1–90 days and all three views:

- `view=aggregate`: app ID, window, and total request count only.
- `view=detailed`: counts, first/last timestamps, and surfaces grouped by crawler identity. This remains the default when detailed activity is authorized.
- `view=history`: detailed results plus zero-filled UTC daily counts and a trend comparing the last seven complete UTC days with the preceding seven. A trend requires at least 15 days in the requested window. Today's bucket is partial and excluded from the comparison; percentage change is `null` when the preceding count is zero.

When only aggregate activity is authorized, the default is aggregate and the maximum window is 30 days. Explicit unauthorized detail/history requests return `403`; unavailable windows and invalid query values return `400`. The dashboard has a separate entitlement-safe projection: every account receives its provider breakdowns, last-seen activity and chart within a fixed 30-day window. Expanded API detail/history remains subject to the API capabilities above. No query parameter grants access.

```bash
curl "https://bluejetty.ai/v1/apps/$APP_ID/crawler-activity?days=30&view=history" \
  --header "Authorization: Bearer $BLUEJETTY_API_KEY"
```

A known-company User-Agent match is `declared`, not provider-verified. Unrecognized bot-like clients share one `other` / `Other crawler` bucket. The API exposes at most 90 days of daily aggregates; this is an access window, not a deletion/retention guarantee. It stores no IP addresses, raw User-Agent strings, referrers, query text, cookies, authorization values, or end-user identifiers.

### Keep the packet current with app releases

For capabilities, intent-specific destinations, structured offers, staged configuration, revisions, restore and optional link recipes, use the [managed configuration 0.5 guide](https://bluejetty.ai/developers/managed-configuration.md). It extends this lifecycle without changing the entity submission contract. [Using Blue Jetty with existing app links](https://bluejetty.ai/developers/integrations) explains each provider's setup, URL formats, parameter behavior and complete examples. Legacy manifest handoff fields retain their existing provider enum; use managed configuration for Singular, Airbridge and explicit optional decoration.

Add `app.indexedVersions` to the manifest, then post the production-store version reported by an authorized publisher workflow to `POST /v1/apps/{appId}/release-status`. Read the public `GET` on the same path to derive `current`, `out_of_date`, `ahead_of_store`, or `unknown`. Follow the [release-freshness workflow](https://bluejetty.ai/developers/release-freshness.md) for CI examples and update criteria.

Example pull-source update and refresh:

```bash
curl https://bluejetty.ai/v1/sources/$SOURCE_ID \
  --request PATCH \
  --header "If-Match: $PUBLICATION_ETAG" \
  --header "Authorization: Bearer $BLUEJETTY_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"sourceUri":"https://example.com/bluejetty-feed.jsonl","refreshInterval":"daily"}'

PUBLICATION_ETAG=$(curl --fail --silent --show-error "https://bluejetty.ai/v1/apps/$APP_ID/publication" \
  --header "Authorization: Bearer $BLUEJETTY_API_KEY" | jq -r '.data.etag')

curl https://bluejetty.ai/v1/sources/$SOURCE_ID/refresh \
  --request POST \
  --header "If-Match: $PUBLICATION_ETAG" \
  --header "Authorization: Bearer $BLUEJETTY_API_KEY"
```

## Public crawler and retrieval surfaces

No API key is required for public index data. Public publisher records require current authorization and a successful nonempty corpus. Draft, sample, expired and revoked records remain owner-readable and return `404` on anonymous app surfaces.

| Method | Path | Purpose |
| --- | --- | --- |
| `GET` | `/v1/apps` | List public apps |
| `GET / HEAD` | `/v1/apps/categories` | Discover normalized source category keys; follow `meta.next` |
| `GET / HEAD` | `/v1/apps/filter` | Retrieve candidates with repeated `keyword` and `category`, `match=all/any`, `platform=any/ios/android`, `limit=1..20`, and returned `cursor` |
| `GET` | `/v1/search?scope=apps&q={name}` | Search public app names |
| `GET` | `/v1/index/apps/{blueJettyId}` | Read attributed canonical app context and a publisher packet link when available |
| `GET` | `/v1/apps/lookup?name={exactName}` | Resolve one exact app identity to canonical record and feed URLs |
| `GET` | `/v1/apps/{appId}` | Read public app metadata |
| `GET` | `/v1/apps/{appId}/packet` | Read preferred representation, attributed handoff, stores, promotion, and inventory links as JSON |
| `GET` | `/v1/apps/{appId}/packet.md` | Read the same app packet as Markdown |
| `GET` | `/v1/apps/{appId}/publisher-llms.txt` | Copy the app website `/llms.txt` section |
| `GET` | `/v1/apps/{appId}/release-status` | Read indexed-version versus production-store freshness |
| `GET` | `/v1/apps/{appId}/entities` | Page through public app entities |
| `GET` | `/v1/entities/{entityId}` | Read one public entity |
| `GET` | `/v1/entities/{entityId}/handoff` | Resolve entity, publisher source context, preferred app/MMP link, stores, and declared consumer attribution |
| `GET` | `/v1/apps/{appId}/feed.json` | Read one app's JSON feed |
| `GET` | `/v1/apps/{appId}/feed.jsonl` | Stream one app's JSON Lines feed |
| `GET` | `/v1/search?q={query}` | Search published selection metadata |
| `GET` | `/v1/export.jsonl` | Read a public entity page (default 250, `limit=1..1000`); follow HTTP `Link` with `rel="next"` until absent |
| `GET` | `/sitemap.xml` | Discover public pages and per-app sitemaps |
| `GET` | `/llms.txt` | Discover machine-consumption artifacts |

For filtering examples, defaults, lexical matching limits and live pagination, read the [filter reference](https://bluejetty.ai/developers/filtered-app-retrieval.md) and [crawler guide](https://bluejetty.ai/for-ai). Filtering searches public app names/descriptions, not publisher capabilities or experience text; the consuming assistant evaluates the returned evidence. The entity export above is separate from full app-index snapshots advertised by `/protocol.json`.

Public records separate publisher assertions from Blue Jetty observations. They include provenance and time context, public verification/freshness assessments, and usable app/web destinations where available. They intentionally expose selection metadata, not enough substitutable content to replace the app experience.

The target outcome is an informed recommendation followed by installation, opening, or an entity-level handoff. A surf app, for example, can publish that it covers hundreds of breaks and identify skill level, break type, representative conditions, freshness, and a destination for each one while retaining complete forecasts, live conditions, maps, and proprietary guidance inside the app.

## Machine client procedure

A coding agent or other machine client should:

1. Resolve a known app with `/v1/apps/lookup` using exactly one exact name, iOS bundle ID, or Android package name, then read its returned `aiPacket` or `aiPacketMarkdown`. The query value is not retained in crawler telemetry.
2. The default packet's `representationPreferences` contains publisher source context; `preferredRepresentation.preferred` identifies the general handoff, and entity/intent endpoints identify specific destinations. `handoffSemantics` and `urlSemantics` describe parameter preservation and bounded recipe exceptions.
3. Fetch `openapi.json`, the three profile 0.1 JSON Schemas, and the complete submission example when acting for a publisher.
4. Generate a draft with `/v1/onboarding/preview` when no clean catalog exists.
5. Validate the exact body at `/v1/validate` before any mutation.
6. Confirm the operator has authority and that no app end-user personal data is present.
7. Submit once with a unique idempotency key.
8. Persist the returned IDs and URLs.
9. Read the authenticated status endpoint and verify accepted/rejected/tombstoned counts.
10. Complete publisher authorization, then read the public feed and confirm intended records and destinations are visible.
11. On updates, inspect the current owner publication and submit a complete new snapshot with its ETag and a new idempotency key.
12. Retry `429` only after `Retry-After`; retry transient `5xx` responses with bounded exponential backoff and the same idempotency key/body.
13. Surface stable error `code`, `message`, optional `details`, and `requestId` to the human operator.

After a successful submission and current publisher authorization, Blue Jetty exposes the accepted records through the public surfaces above. Each third-party system independently chooses whether to fetch, index, retrieve, cite, or rank them; see the [Machine Use Policy](https://bluejetty.ai/machine-use).

## Optional configuration 0.5 recipes

Publish bounded assistant-side routing recipes through the existing managed-configuration preview/revision endpoints. The API does not accept end-user recipe selections or construct personalized URLs. Packets and eligible intent handoffs expose the recipe plus a concrete fallback. See [link recipes](https://bluejetty.ai/developers/link-recipes.md) for input, provider, encoding and compatibility rules.
## Compact app directory and current entity projection

Anonymous `GET /v1/apps` returns bounded identity/description/packet-link entries, not a combined catalog. Follow `meta.next` for more apps; `limit` is 1–100. The explicit `view=records` compatibility view uses limit/offset. Public entity GETs expose scoped provenance; `view=legacy` retains older trust fields. Version-0.1 feeds are unchanged. See [packet and index fields](/developers/packet-fields.md) for exact projection and omission semantics.
