> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pcnaid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AgenticOps API overview

> The externally reachable HTTP surface for AgenticOps, including health, OAuth, webhooks, billing, and the authenticated admin API.

# AgenticOps API overview

AgenticOps is a Shopify embedded app. The externally reachable HTTP surface is the app's base origin. Endpoints below are given as path-only references; substitute the app's HTTPS origin.

## Health

Public health routes report build identity.

```bash theme={null}
curl --fail-with-body "${APP_ORIGIN:?Set APP_ORIGIN}/health"
```

* `GET /health` — returns `{ "ok": true, "app": "supervised-operator", "build": ..., "at": ... }`.
* `GET /healthz` — same response, used for health checks.

## OAuth and install

The app uses Shopify OAuth to install and authenticate.

* `GET /install` and `GET /auth/install` — start Shopify OAuth.
* `GET /auth/callback` — complete Shopify OAuth.

## App routes

The embedded admin UI is served under the app routes. These require an authenticated Shopify admin session.

* `GET /` and `GET /app` — App Home.
* `GET /app/recommendations`, `GET /app/actions`, `GET /app/plans`, `GET /app/settings`, `GET /app/support` — embedded admin pages.

## Policy redirects

Public policy routes permanently redirect to the canonical documentation:

* `GET /privacy` → Privacy Policy (301)
* `GET /terms` → Terms of Service (301)
* `GET /legal` → Terms of Service (301)
* `GET /legal/privacy` → Privacy Policy (301)
* `GET /legal/terms` → Terms of Service (301)

## Webhooks

Signed Shopify webhooks are handled at:

* `POST /webhooks/app_uninstalled`
* `POST /webhooks/app_subscriptions_update`
* `POST /webhooks/shop_update`
* `POST /webhooks/privacy` — GDPR compliance topics (`customers/data_request`, `customers/redact`, `shop/redact`)
* `POST /webhooks/signals` — `products/create`, `products/update`, `inventory_levels/update`, `orders/create`

Webhook HMAC signatures are verified before handling. See the [webhooks reference](https://docs.pcnaid.com/nodes/shopify/agenticops/developer/webhooks/index.md) for topics and handling.

## Billing

Billing routes use Shopify's Admin Billing API.

* `GET /billing/plans` — lists available tiers, prices, trial periods, mutation limits, and rollback retention.
* `POST /billing/plan-navigation` — renews the app session and returns a signed, one-use plan-navigation token.
* `POST /billing/subscribe` — body `{ "tier": "core" }`; returns a Shopify confirmation URL.
* `POST /billing/upgrade` — body `{ "tier": "growth" }`; changes an existing subscription.
* `POST /billing/cancel` — cancels the active subscription.
* `GET /billing/status` — returns the shop's real subscription state plus `effectiveTier`, `entitlementSource`, and `developerLabel`.

## Authenticated admin API

The embedded admin UI is backed by an authenticated admin API under `/api/*`. These routes require a valid Shopify admin session (App Bridge ID token) and are used only by the embedded UI; they are not a general public API. They expose the same store-facing workflows described in the [merchant guides](https://docs.pcnaid.com/nodes/shopify/agenticops/merchant/guides/index.md): reading the dashboard and setup state, reviewing and acting on recommendations, and updating settings and supervision policies.

## App proxy and extensions

AgenticOps has no app proxy and no storefront extensions. It is an embedded admin app only.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.