Narro docs
Loading…
Every partner key belongs to one org, carries only the scopes you give it, and can be narrowed further to events, companies and IP addresses.
Send the key in the Authorization header, over HTTPS, from your server only. Never ship a key to a browser or app. The key is the only credential: no key id, no partner id and no request signing, except for the two signed writes, POST /outcomes and POST /intake/batches.
NARRO_DATA_API_KEY=narro_pk_test_<your-key>
NARRO_DATA_API_BASE_URL=https://api.thenarro.com/data/v1Your .env holds two names, the same in the sandbox and live: NARRO_DATA_API_KEY and NARRO_DATA_API_BASE_URL. The base URL is the same for both; the key decides which data a call reaches. Going live is swapping the key value.
curl https://api.thenarro.com/data/v1/me \
-H "Authorization: Bearer narro_pk_test_EXAMPLEKEY0000000000000000"A missing key returns 401 unauthorized, an unknown, rotated out or expired one 401 invalid_token, and a revoked or paused one 401 revoked.
A Data API key starts narro_pk_test_ or narro_pk_live_. A Programs API key uses the same two prefixes, so the prefix does not tell them apart: the base URL decides which API checks a key, and a key from one API is refused by the other. See Developers.
You create keys in the Partner Hub. Create your account at thenarro.com/signup (choose Partner, Building on Narro), open the Hub at partner.thenarro.com, then open API and Keys. Nothing has to be turned on first: creating your first key turns the API on for your org.
| Test key | Live key | |
|---|---|---|
| Prefix | narro_pk_test_ | narro_pk_live_ |
| Data | The sandbox dataset only. Never real data. | Real data, within consent, scopes and restrictions. |
| Writes | Land in the sandbox. Nothing reaches the network. | Wait in review or quarantine before they reach the network. |
| How many | One per product. To get a new one, replace it: the old one stops at once. | Up to 5 active per product, each with its own name. A sixth is refused until you revoke one. |
| Secret | Can be seen in the Hub at any time, and is in the SETUP.md the Hub gives you. | Shown once, when the key is made. Lost it? Create a new live key and revoke the old one. |
| Billing | Free. Never billed. | Priced per request. See Pricing and tiers. |
| Create | As soon as your org exists, by an Owner, Admin or Developer. | At any time, by an Owner or Admin, after your org has accepted the Partner Terms and the Data Processing Agreement (one checkbox in the same step). No two-step verification is needed, unless your org requires a second factor for every member. No card is needed to create one. |
| Calls work | Always, on the sandbox. | While your live use is covered by a plan or a funded balance. Otherwise 402 coverage_required, with the next step. After a failed payment, 402 billing_required until it is fixed. A paused org gets 403 partner_paused. |
A key has two parts, and they are different things:
key_<live|test>_XXXX-XXXX-C, for example key_live_7F3K-9Q2M-X: two groups of four characters and a check character, from an alphabet with no 0, O, 1, I, L or U. It is shown everywhere (the Hub, logs, support) and is safe to copy into a ticket. Typing is forgiving (case and separators do not matter), and a mistyped id is caught by its check character. An id is never reused, even after the key is revoked.narro_pk_test_... or narro_pk_live_..., is what you send. A live key's secret is shown once, when the key is made, and Narro keeps only a hash. Your sandbox key's secret is kept encrypted, so the Hub can show it again (an Owner, Admin or Developer can see it). Never put a secret in a ticket, a log or a browser.GET /ping with a key answers with its public id, so you can check which key a server is using. Your code never needs the id. Older keys keep the ids they were made with.
NARRO_DATA_API_KEY.Your org has a set of allowed scopes. Each key gets a subset of them, chosen when you create it. A call outside the key's scopes returns 403 insufficient_scope with the scopes to ask for in details. New orgs start with these, by type:
| Type | Default scopes |
|---|---|
| API | companies:read, network:read, intake:write, outcomes:write, webhooks:manage, consents:read |
| Events | events:read, events:write, events:checkin, events:attendees.read |
Network capabilities add their own read scopes (for example network:paths.read) as your plan allows.
Each key can carry, all optional:
{
"label": "Check-in kiosk",
"scopes": ["events:read", "events:checkin"],
"restrictions": {
"eventIds": ["evt_example"],
"listingIds": [],
"ipAllowlist": ["203.0.113.10/32"]
},
"limits": { "rpm": 60, "perDay": 5000 },
"expiresAt": "2027-10-12T00:00:00Z"
}eventIds: the key sees only these events. Lists leave the others out, and asking for another event of your org is 403 insufficient_scope.listingIds: the key sees only these companies. Any other company is 404.ipAllowlist: up to 20 addresses or ranges. A call from any other address is refused with 403.limits: lower than your org limits, never higher. See Rate limits.lastUsedAt is shown in the Hub so you can spot keys nobody uses.invalid_token. Rotating at 5 live keys works: the new key takes the old one's place.revoked.A partner key alone never reads a person's network. Calls about one person need that person to connect through Sign in with Narro (OAuth 2.1 with PKCE). See OAuth and Data API.