Create credentials
Sign in to the correct role, open its API page, generate a key and one-time bearer token, then enable access.
Use one versioned data contract through the REST API, official command-line client, or role-scoped MCP server. Advertiser and publisher credentials remain separate at every layer.
Sign in to the correct role, open its API page, generate a key and one-time bearer token, then enable access.
Call HTTPS endpoints directly, install the CLI, or connect an MCP-compatible assistant.
Run advertiser and publisher integrations with their own keys, tokens, profiles, and MCP processes.
Every request requires a role-specific API key and secret bearer token. Generate credentials from the Advertiser API page or Publisher API page after signing in.
X-Advertiser-Key: YOUR_KEYAuthorization: Bearer YOUR_TOKENOpportunities, publisher bids, auctions, proxy bids, and reserve decisions.
X-Publisher-Key: YOUR_KEYAuthorization: Bearer YOUR_TOKENSites, ownership claims, bulk portfolio updates, opportunity bids, and inventory auctions.
The bearer token is displayed once. Store it in a secret manager or the CLI credential store—never browser JavaScript, a public repository, or a shared MCP configuration.
The production base URL is https://netpartner.com/api/v1. Requests and responses use JSON. Monetary values are integer USD cents.
curl https://netpartner.com/api/v1/advertiser/opportunities \
-H "X-Advertiser-Key: YOUR_KEY" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"Node.js 20 or newer is required. The versioned package installs both netpartner and netpartner-mcp.
npm install --global https://netpartner.com/static/downloads/netpartner-cli-0.1.0.tgzprintf '%s' "$NETPARTNER_API_TOKEN" | netpartner login \
--role advertiser \
--key "$NETPARTNER_API_KEY" \
--token-stdinUse --role publisher for a publisher profile. Credentials are saved under ~/.config/netpartner/credentials.json with file mode 0600. CI can use role-specific environment variables instead.
netpartner status --role advertiser --check
netpartner operations --role advertiser
netpartner advertiser opportunities list
netpartner advertiser auctions bid 27 --file bid.json
netpartner publisher sites list
netpartner publisher sites bulk --file portfolio.json
netpartner publisher claims verify-bulk --file claims.jsonSuccessful commands print the original REST JSON. API validation and conflict responses are returned as structured errors with a nonzero exit status.
The deployed MCP distribution runs as a local stdio process in your MCP client. It does not open an inbound network port. Each tool calls the production NetPartner REST API over HTTPS and returns the same JSON data. Run one process per role so tools and credentials stay isolated.
{
"mcpServers": {
"netpartner-advertiser": {
"command": "npx",
"args": ["-y", "--package", "https://netpartner.com/static/downloads/netpartner-cli-0.1.0.tgz", "netpartner-mcp", "--role", "advertiser"],
"env": {
"NETPARTNER_ADVERTISER_KEY": "YOUR_KEY",
"NETPARTNER_ADVERTISER_TOKEN": "YOUR_TOKEN"
}
}
}
}{
"mcpServers": {
"netpartner-publisher": {
"command": "npx",
"args": ["-y", "--package", "https://netpartner.com/static/downloads/netpartner-cli-0.1.0.tgz", "netpartner-mcp", "--role", "publisher"],
"env": {
"NETPARTNER_PUBLISHER_KEY": "YOUR_KEY",
"NETPARTNER_PUBLISHER_TOKEN": "YOUR_TOKEN"
}
}
}
}The advertiser process exposes only advertiser_* tools. The publisher process exposes only publisher_* tools. Disabling or rotating the matching API credential revokes REST, CLI, and MCP access together.
The CLI and MCP server share one operation registry mapped directly to these REST paths.
| Role | Method | REST path | Purpose |
|---|---|---|---|
| Advertiser | GET | /advertiser/opportunities | List opportunities and bids |
| Advertiser | POST | /advertiser/opportunities | Create an opportunity |
| Advertiser | DELETE | /advertiser/opportunities/{id} | Cancel an open opportunity |
| Advertiser | POST | /advertiser/opportunities/{id}/select/{bid_id} | Select a publisher bid |
| Advertiser | GET | /advertiser/auctions | List auctions and bids |
| Advertiser | POST | /advertiser/auctions/{id}/bids | Place a proxy bid |
| Advertiser | POST | /advertiser/auctions/{id}/reserve-decision | Approve a below-reserve match |
| Publisher | GET | /publisher/sites | List sites and pending claims |
| Publisher | PATCH | /publisher/sites/{id} | Update products, pricing, terms and examples |
| Publisher | POST | /publisher/sites/bulk | Submit or update up to 500 sites |
| Publisher | POST | /publisher/site-claims/{id}/verify | Verify one ownership claim |
| Publisher | POST | /publisher/site-claims/verify-bulk | Verify claims in bulk |
| Publisher | DELETE | /publisher/site-claims/{id} | Cancel a pending claim |
| Publisher | GET | /publisher/opportunities | List advertiser briefs |
| Publisher | POST | /publisher/opportunities/{id}/bids | Submit or update a bid |
| Publisher | GET | /publisher/auctions | List inventory auctions |
| Publisher | POST | /publisher/auctions | Create an inventory auction |
| Publisher | PATCH | /publisher/auctions/{id} | Update an auction |
| Publisher | DELETE | /publisher/auctions/{id} | Cancel an auction |
| Publisher | POST | /publisher/auctions/{id}/reserve-decision | Decide a below-reserve result |
REST, CLI and MCP traffic shares a limit of 120 requests per credential per minute. When the API returns 429, wait for the Retry-After interval before retrying.