canonical: https://jentic.com/apis/newie.co/newie

# Newie Public API

Jentic publishes the only available OpenAPI specification for Newie Public API, keeping it validated and agent-ready. The Newie Public API offers a REST hooks implementation for provider integrations with the Newie creator-payments platform. Providers can verify their API token and create or destroy webhook subscriptions for purchase, subscription, payment, and payout events. Authentication uses an X-API-TOKEN header generated inside the Newie app.

## For AI agents

Subscribe to Newie purchase, subscription, payment, and payout webhook events so an agent reacts to creator-economy revenue activity without polling.

## Scope

Does not handle payment processing, payout disbursement, or creator account management - use for REST hook subscription lifecycle against Newie events only.

## Capabilities

- Verify a Newie API token before establishing webhook subscriptions
- Create REST hook subscriptions for purchase, subscription, payment, and payout events
- Destroy an existing REST hook subscription to stop receiving events
- Authenticate every request with an X-API-TOKEN header retrieved from the Newie provider app
- Use a single subscription pattern across the four event types Newie supports

## Use cases

### Real-Time Creator Revenue Webhooks

Creator platforms and revenue dashboards subscribe to Newie purchase, subscription, payment, and payout events so transactions appear instantly in their tooling. POST /restHooks_create registers a callback URL for the chosen event type and Newie pushes payloads to that URL as events occur, eliminating polling and matching the REST hooks pattern.

Example prompt: Call POST /restHooks_create with the desired event type ('purchase' or 'subscription' or 'payment' or 'payout') and the receiver URL; record the returned subscription id for later teardown.

### Provider Token Validation

Before a provider integration goes live, GET /api_testAuth confirms the X-API-TOKEN issued in the Newie app is accepted. This catches misconfigured environment variables or rotated tokens during deployment instead of failing silently when real revenue events would be missed.

Example prompt: Send GET /api_testAuth with the configured X-API-TOKEN; block deployment if the response is not 200 so misconfigured credentials never reach production.

### Webhook Lifecycle Management

Operations teams wire DELETE /restHooks_destroy into deprovisioning flows so when a customer cancels their integration the corresponding Newie subscription is torn down cleanly. This avoids stale receivers continuing to ingest payload they no longer have permission to handle.

Example prompt: On a customer cancellation event, call DELETE /restHooks_destroy with the stored subscription id and remove the subscription record from your own database.

### AI Agent Revenue Event Reactor

An AI agent powering a creator's business operations uses Jentic to discover Newie operations, registers webhooks for the events it cares about, and reacts to each payload - for example sending a thank-you message on purchase events or reconciling payouts in the creator's accounting system, all without hand-coding the Newie client.

Example prompt: Use Jentic to search 'subscribe to newie purchase events', load POST /restHooks_create, execute it with the agent's ingestion endpoint, and route incoming purchase payloads to the thank-you message workflow.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/api_testAuth` | Verify the X-API-TOKEN is valid |
| POST | `/restHooks_create` | Create a REST hook subscription for a specific event type |
| DELETE | `/restHooks_destroy` | Destroy an existing REST hook subscription |

## Key resources

- **Authentication** — Verify the X-API-TOKEN is valid before establishing subscriptions
- **Rest Hooks** — Create and destroy REST hook subscriptions for purchase, subscription, payment, and payout events

## Why Jentic

- **Setup:** Wiring Newie by hand means learning its X-API-TOKEN header auth, pointing at its Cloud Functions host, and managing REST hook subscription state yourself. Through Jentic you install once, import the Newie Public API from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** Newie's REST hook targets travel in the request body rather than the URL path, so scope your agent by operation: limit it to the operations it needs, such as creating a REST hook subscription or testing auth, and leave restHooks_destroy out of the allowed set unless you deliberately add it. You choose the operations it may call, so subscription teardown is not included by default.
- **Credential handling:** Your Newie X-API-TOKEN is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'subscribe to creator events' or 'remove a REST hook subscription', and Jentic returns the matching Newie operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Stripe API** — General payments platform with webhook events for charges, subscriptions, and payouts
- **Zapier Natural Language Actions** — Webhook router that fans Newie events out to thousands of downstream apps
- **HubSpot Marketing Events** — CRM destination for Newie purchase and subscription events

## FAQ

### Why is there no official OpenAPI spec for Newie Public API?

Newie does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Newie Public API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Newie Public API use?

Newie uses an X-API-TOKEN header carrying the API token retrieved inside the Newie app under Provider settings. Through Jentic, the token is stored in the encrypted Jentic One instance and injected at request time so it never reaches the agent's context.

### Can I subscribe to Newie purchase events through the Public API?

Yes. POST /restHooks_create accepts an event type and a target URL and registers a REST hook so Newie pushes purchase, subscription, payment, or payout payloads to that URL as events occur. DELETE /restHooks_destroy removes the subscription when no longer needed.

### What are the rate limits for the Newie Public API?

Rate limits are not declared in the spec. Because the API is webhook-driven rather than polled, normal usage is small - one or two subscribe calls per integration plus periodic auth checks - so limits rarely become a concern.

### How do I test a Newie webhook integration through Jentic?

Use Jentic to search 'verify newie API token', load GET /api_testAuth, and execute it. Then search 'subscribe to newie purchase events' and execute POST /restHooks_create with a temporary endpoint URL to confirm Newie pushes events as expected.

### Is the Newie Public API free?

API access is included with a Newie provider account. Tokens are issued inside the Newie app once the provider account is approved - there is no separate API tier to purchase.

### Can I limit what my agent is allowed to do with the Newie Public API?

Yes. Because you run Jentic One yourself, you decide which Newie operations the agent may call, so you can allow it to verify a token with GET /api_testAuth and create subscriptions with POST /restHooks_create while leaving DELETE /restHooks_destroy out of the permitted set. Newie's REST hook targets travel in the request body rather than the URL path, so you scope by operation rather than by path pattern, and subscription teardown is excluded unless you deliberately add it. Your X-API-TOKEN is held by your own instance and injected only when a permitted operation runs, so the agent never sees the credential or reaches an operation you have not allowed.
