# 2s Package Release Watcher

> 2s Package Release Watcher is a paid API for AI agents from 2s.io, paid per call via x402, $0.125/call, status unknown (last checked 2026-09-14).

Registers a webhook watcher that fires a signed callback whenever a new version of a specified npm or PyPI package is released

## Facts

- Endpoint: POST https://2s.io/api/watchers/package-release
- Price: $0.125/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-package-release-watcher-39a57cb9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_K9NRWCbZ6niPMLNf3QNm5

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 2s-package-release-watcher-39a57cb9 -d '<json body>'
```

Example prompt: Set up a watcher on npm for the 'react' package — send a POST to https://myapp.example.com/hooks/releases with my payload {"project":"frontend"} whenever a new version drops, stop after 5 releases, and keep the watcher active for 30 days.

## When to prefer this

Use this endpoint when you need event-driven notifications for new package releases on npm or PyPI without polling — especially when building CI/CD pipelines, dependency update bots, or security monitoring systems that need to react immediately when a library version changes. Prefer this over manual polling or GitHub Action triggers when the package source is PyPI or npm specifically.

## Known failure modes

- Invalid or unsupported registry value (must be npm or pypi)
- Package name not found in the specified registry
- callbackUrl is not a valid http/https URL
- expiresInSeconds exceeds maximum of 7,776,000 (90 days)
- maxFires exceeds maximum of 1000
- Payment not provided or insufficient USDC balance
- Callback URL is unreachable or returns errors when 2s attempts delivery

## How this service works

The (most) everything API: 575+ pay-per-call endpoints for AI agents — ground-truth data, a full AI gateway, and agent infrastructure (storage, queues, watchers). USDC via x402, no signup, no API keys, and upto billing: pay actual usage, not the quote.

## Output

A JSON object with ok: true, an items array containing the created watcher record, total count, and a source object describing the upstream provider URL, license, and provider name.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "name": {
   "type": "string",
   "maxLength": 120,
   "minLength": 1,
   "description": "Package name, e.g. react (npm) or requests (pypi)."
  },
  "label": {
   "type": "string",
   "maxLength": 64,
   "description": "Optional free-text tag."
  },
  "payload": {
   "type": "object",
   "description": "Arbitrary JSON echoed back in every callback.",
   "additionalProperties": {}
  },
  "maxFires": {
   "type": "integer",
   "maximum": 1000,
   "minimum": 1,
   "description": "Stop after this many releases (default 10)."
  },
  "registry": {
   "enum": [
    "npm",
    "pypi"
   ],
   "type": "string",
   "description": "Package registry: npm or pypi."
  },
  "callbackUrl": {
   "type": "string",
   "maxLength": 2048,
   "description": "Signed event POSTed here (verify X-2s-Signature). Any http(s) URL."
  },
  "expiresInSeconds": {
   "type": "integer",
   "maximum": 7776000,
   "minimum": 60,
   "description": "Active window in seconds (default 30d, max 90d)."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-package-release-watcher-39a57cb9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
