# Authorize your Blue Jetty app packet

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.

Connect three things: the official publisher website, the mobile app's store identity, and its exact Blue Jetty packet. Blue Jetty records this authorization separately from publisher-authored capabilities, offers, routing preferences and content timestamps.

## The two-step setup

1. [Map and submit the app](/developers/app-mapping.md). The current onboarding flow needs a successful non-empty entity submission. It remains owner-readable until authorization is current.
2. Authorize the packet and link it from your website. Both checks must be current for `publisherOnboarding.status` to be `complete`.

Keep the website's SEO `rel="canonical"` pointing to its own canonical page. A Blue Jetty packet is additional app metadata, not a replacement canonical for the website. An `llms.txt` link makes the packet discoverable; that link alone does not prove authority over an app.

## Before issuing proof

Set `publisherWebsiteUrl`, platform identifiers, and the corresponding `appStoreUrl` / `playStoreUrl` through the app API. Each identified platform needs its official HTTPS store URL. The website hostname must be exact: `example.com` and `www.example.com` are separate proof targets. MMP links belong in handoff configuration, not in the publisher-identity website field.

Before changing those app fields, GET `/v1/apps/{appId}/publication` and send its `data.etag` token in `If-Match` on the app PATCH. The app-wide publication version and this guide's authorization version are separate. See [maintenance](/developers/maintenance.md).

Blue Jetty automatically checks an iOS app's exact store ID, bundle ID and HTTPS seller website from Apple's lookup response. For Android, it fetches the exact Google Play listing and checks the canonical listing package, application package metadata and HTTPS developer website against the proven publisher domain. Store website comparisons accept the same hostname with or without one leading `www.`; other subdomains remain distinct. The authorization file still proves the exact submitted hostname and record binding. Every platform in the record must be independently corroborated. Expo/EAS builds use this same process; routine Android onboarding requires no operator review or new app build.

Use the official store website domain for Blue Jetty authorization; store relationship comparisons accept the same hostname with or without one leading `www.`. Other subdomains remain distinct. The issued ownership-proof URL still requires its exact host and path, without redirects. Missing, conflicting or inaccessible listing metadata remains unverified. Correct the listing/identity and retry; contact **legal@bluejettyai.com** for exceptional unresolved cases. An exceptional operator review remains separately labeled `operator_review`, expires within 30 days and never replaces the website proof. Automatic checks are labeled `store_lookup` and retain their source URL and timestamp. A website-hosted AASA or `assetlinks.json` declaration alone cannot authorize another publisher's app.

After verification, follow `data.agentInstructions` to authenticated `GET /v1/apps/{appId}/status` and report `data.completionReport` to the publisher. **✅ Fully onboarded** requires `fullyOnboarded: true`; otherwise explain the remaining steps. A 200 verification response confirms authorization only, not every onboarding check.

Finish [publisher discovery setup](https://bluejetty.ai/developers/publisher-discovery.md) with both packet links in `/llms.txt`, the credential-free `/.well-known/bluejetty.json`, and homepage discovery through HTTP Link headers or the HTML head. HTTP headers are required when executable JavaScript is detected. First-party proxy delivery is strongly recommended, especially with a CDN, and 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. These references are separate from the randomized ownership proof below.

## API workflow

All routes below require `Authorization: Bearer $BLUEJETTY_API_KEY` and are private/no-store. Keep the key out of the website, packet, logs and agent conversation.

### 1. Read the current version

`GET /v1/apps/{appId}/authorization`

The `data` object includes `status`, `reason`, `version`, `proofState`, `challengeId`, `challengeExpiresAt`, `publisherAuthorization`, up to 30 recent audit events and the review contact. It never returns the token or its digest. A new record starts unverified with version `0`.

### 2. Issue the designation

`POST /v1/apps/{appId}/authorization`

```json
{ "expectedVersion": 0 }
```

Use the actual current version, not always zero. The response includes `version`, `challengeId`, `expiresAt`, `fileUrl`, `file`, and instructions. Save this response securely: the proof token is returned only here. Issuing a replacement invalidates the previous proof. A stale version returns `409` instead of overwriting a newer operation.

Publish the returned `file` JSON exactly at `fileUrl`, under `https://YOUR-EXACT-HOST/.well-known/bluejetty/CHALLENGE-ID.json`. Return `200` and `Content-Type: application/json`, without a redirect, login wall or bot challenge. The JSON is a scoped publisher designation, not an API credential. Leave it in place for subsequent checks. Initial challenges expire after 24 hours.

### 3. Verify, then connect discovery

`POST /v1/apps/{appId}/authorization/verify`

```json
{ "challengeId": "UUID-FROM-ISSUE", "expectedVersion": 1 }
```

Replace both example values. Blue Jetty fetches the file, checks its exact scope, and independently corroborates the app-domain relationship. `200` means current verified authorization. `422` includes a safe status/reason for remediation; domain-control-only is not verified app authority. Every completed check advances the version, so GET the latest state before retrying. Concurrent or stale checks return `409`. Limits are five issue/check operations per app per minute and twenty per organization per minute.

Add both selected packet URLs to the publisher website's root `/llms.txt`, each once for this app, with JSON as the default entry and Markdown as the alternative. One website can list multiple different Blue Jetty apps. Use `GET /v1/apps/{appId}/publisher-llms.txt` for the snippet and the owner-only `publisher-site-instructions.md` route for the complete discovery task, including the descriptor and applicable homepage references. Reuse the saved `Onboarding-Run-Id` UUID when calling POST `/v1/apps/{appId}/publisher-site-verification`, then GET `/v1/apps/{appId}/status` to inspect `data.completionReport`. The proof's historical `packetUrl` is an exact authorization binding; it does not override the selected discovery URLs or JSON-first retrieval preference.

## Revalidation, changes and revocation

- Verified authorization lasts up to 24 hours after a successful check. A successful check schedules revalidation approximately six hours later; a ten-minute scheduler processes oldest-due work in bounded batches. Failures use bounded exponential retry. Integrations can also recheck using the current challenge ID and version. Expired authorization makes publisher app surfaces private until successfully rechecked.
- A transient fetch failure removes the current verified result; a later successful recheck can restore it. A confirmed `404`/`410` removal of an already-consumed proof revokes it and requires a new challenge. A missing file on the first attempt can be fixed and retried before challenge expiry.
- Changing organization, publisher website, app identifiers or store URLs invalidates authorization, even if the old values are later restored. Changing app descriptions or a configuration revision inside the existing scope does not require new consent.
- `DELETE /v1/apps/{appId}/authorization` with `{"expectedVersion":CURRENT_VERSION}` revokes the proof, removes the record from anonymous publisher surfaces and releases its identity claims. Owner data, revisions and billing state remain. Use app/source deletion for data removal.
- Expiry does not silently reassign an app identity to another account. Ownership conflicts and recovery go through review, with fresh proof required for any reassignment. Payment and pilot access never grant publisher authority.

## What machines receive

Public publisher representations include an allowlisted verified `publisherAuthorization`: method, scope, exact domain, packet URL, platform identities, independent evidence sources, verification/check times and validity end. `relationshipEvidence` identifies each platform's store lookup or operator review, its actual observation time and validity window. Overall validity never extends past the underlying relationship evidence. Owner status still returns an unverified object with null proof fields and empty evidence arrays when proof is absent or stale; anonymous publisher app endpoints return `404`. Tokens, token digests, internal organization IDs, reviewer/case identifiers, account membership, and private audit history are not part of public provenance.

This additive object is documented as `PublisherAuthorization` in [OpenAPI](/openapi.json). App/entity JSON, packets, feeds, lookup/search, handoff responses and HTML structured data use the same evaluated state. JSON-LD preserves the object under `https://bluejettyai.com/vocab#publisherAuthorization` as a JSON literal; this is a Blue Jetty extension, not a Schema.org verification endorsement.

Existing `verificationStatus`, destination health, freshness and website-link checks keep their original meanings. Existing records are not automatically promoted. Sample apps remain private even if their owner rehearses authorization. Publisher text remains source material for an agent, not instructions that override its user or system rules.

## Proof data retention

Only a digest of the proof token is persisted. Current consumed proof state is retained for revalidation; unused, failed or revoked proof material becomes eligible for cleanup after 30 days. Minimal authorization event and operator-review history becomes eligible after 90 days. Cleanup is bounded, so these are eligibility windows rather than guarantees of deletion at an exact instant. Identity reservations persist until explicit revocation or app deletion so expiry cannot enable silent reassignment.
