Build with NetPartner.

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.

REST APIVersion 1 · JSONCLIAdvertiser + PublisherMCPLocal stdio serverOpenAPIVersion 3.1

Quick start

1

Create credentials

Sign in to the correct role, open its API page, generate a key and one-time bearer token, then enable access.

2

Choose a client

Call HTTPS endpoints directly, install the CLI, or connect an MCP-compatible assistant.

3

Keep roles separate

Run advertiser and publisher integrations with their own keys, tokens, profiles, and MCP processes.

Authentication

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.

Advertiser

X-Advertiser-Key: YOUR_KEYAuthorization: Bearer YOUR_TOKEN

Opportunities, publisher bids, auctions, proxy bids, and reserve decisions.

Publisher

X-Publisher-Key: YOUR_KEYAuthorization: Bearer YOUR_TOKEN

Sites, 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.

REST API

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"

Official command-line client

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.tgz

Log in without putting the token in shell history

printf '%s' "$NETPARTNER_API_TOKEN" | netpartner login \
  --role advertiser \
  --key "$NETPARTNER_API_KEY" \
  --token-stdin

Use --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.json

Successful commands print the original REST JSON. API validation and conflict responses are returned as structured errors with a nonzero exit status.

MCP server

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.

Advertiser MCP configuration

{
  "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"
      }
    }
  }
}

Publisher MCP configuration

{
  "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.

Operation coverage

The CLI and MCP server share one operation registry mapped directly to these REST paths.

RoleMethodREST pathPurpose
AdvertiserGET/advertiser/opportunitiesList opportunities and bids
AdvertiserPOST/advertiser/opportunitiesCreate an opportunity
AdvertiserDELETE/advertiser/opportunities/{id}Cancel an open opportunity
AdvertiserPOST/advertiser/opportunities/{id}/select/{bid_id}Select a publisher bid
AdvertiserGET/advertiser/auctionsList auctions and bids
AdvertiserPOST/advertiser/auctions/{id}/bidsPlace a proxy bid
AdvertiserPOST/advertiser/auctions/{id}/reserve-decisionApprove a below-reserve match
PublisherGET/publisher/sitesList sites and pending claims
PublisherPATCH/publisher/sites/{id}Update products, pricing, terms and examples
PublisherPOST/publisher/sites/bulkSubmit or update up to 500 sites
PublisherPOST/publisher/site-claims/{id}/verifyVerify one ownership claim
PublisherPOST/publisher/site-claims/verify-bulkVerify claims in bulk
PublisherDELETE/publisher/site-claims/{id}Cancel a pending claim
PublisherGET/publisher/opportunitiesList advertiser briefs
PublisherPOST/publisher/opportunities/{id}/bidsSubmit or update a bid
PublisherGET/publisher/auctionsList inventory auctions
PublisherPOST/publisher/auctionsCreate an inventory auction
PublisherPATCH/publisher/auctions/{id}Update an auction
PublisherDELETE/publisher/auctions/{id}Cancel an auction
PublisherPOST/publisher/auctions/{id}/reserve-decisionDecide a below-reserve result

Traffic limits

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.

Security and credential lifecycle

  • Generate credentials only from the matching signed-in role’s API page.
  • Use separate advertiser and publisher credentials, even when one person owns both roles.
  • Keep tokens in server-side secrets, protected environment variables, or the CLI credential store.
  • Rotate credentials immediately after suspected exposure; the old token becomes invalid.
  • Disable API access when an integration is no longer used.
  • Check current resource state before retrying state-changing requests.