Narro docs
Loading…
Every error has the same shape. What it says depends on the environment, and what you should do about it depends on the status.
Errors are application/problem+json, following RFC 9457. The fields are listed with the other objects inObjects and error codes. The ones you will use most:
| Field | Meaning |
|---|---|
status | The HTTP status. |
category | The error category. Stable, and a good key for your own handling. |
code | The specific code in a detailed environment. In production, usually the category. |
field | Detailed environments only: the field that was wrong. |
detail | Detailed environments only: a sentence about the cause. |
request_id | The id of this request. Quote it to Narro. |
retry_after | On 429 and 503: seconds to wait. |
The type is a link to the entry for the code in the error table. In a detailed environment:
{
"type": "https://thenarro.com/docs/api/programs/reference#missing_field",
"title": "Required field absent",
"status": 400,
"category": "invalid_request",
"code": "missing_field",
"field": "origin",
"detail": "origin is required.",
"request_id": "req_<request-id>"
}| Category | Status | Meaning |
|---|---|---|
invalid_request | 400, 413, 415, 422 | The request is not valid. Fix it. Do not retry unchanged. |
unauthorized | 401 | The credential is missing or invalid, or a key Narro asked to sign sent no valid signature. |
payment_required | 402 | Live use is not covered by a plan or a funded balance. The body names the next step. See pricing and billing. |
request_not_permitted | 403 | Not allowed: scope, network scope, key status, suspension, or a rule. |
not_found | 404 | Not found, or not yours to see. |
conflict | 409 | The request conflicts with the current state, or an idempotency key was reused with a different body. |
gone | 410 | No longer available. A major version past its sunset answers this. |
rate_limited | 429 | Too many requests. Wait for Retry-After. |
server_error | 500 | Something went wrong on the Narro side. |
service_unavailable | 503 | Temporarily unavailable, or switched off. Retry with backoff. |
The full list of specific codes, with a meaning for each, is in the error code table in the reference.
How much an error says depends on the environment that serves the request, not on the key you send. Production, which includes https://api.thenarro.com, answers generically. That includes requests made with a test key. A detailed environment, such as a Narro staging service, names the cause.
| Detailed environment | Production | |
|---|---|---|
| Body | Specific code, field, detail, and a list of field errors. | Category and request id. Nothing that says which rule fired. |
| code | For example missing_field | The category, for example invalid_request. |
| Same cause, same answer | No. Different causes give different codes. | Yes. Every cause in one category and status gives the same body. |
Only a few cases that a founder or your integration can act on keep a specific code in production: company_profile_incomplete, company_profile_invalid, intro_duplicate_open, intro_not_withdrawable, intro_invalid_transition, action_confirmation_required, link_confirmation_required, signin_confirmation_required and refused_out_of_scope. A payload held for review is reported as a plain 400 in production. Extra body fields, such as suggestions, appear in production only on those specific codes, with two exceptions that tell you what to do next and never which rule fired: a 402 keeps next_step and options (choose a plan, add a card and top up), and readiness_incomplete keeps missing, the ids of the go-live essentials still to finish.
The founder access request is the one place where you often need the real reason: a founder not on the roster (the cohort policy unknown_founders is refuse; with the default, enroll, an unknown email is added to the roster), an email under another member id, a missing consent. In production those answer generically, and the Hub Founder access page shows the real reason for each request.
{
"type": "https://thenarro.com/docs/api/programs/reference#request_not_permitted",
"title": "This request is not permitted",
"status": 403,
"category": "request_not_permitted",
"code": "request_not_permitted",
"request_id": "req_<request-id>"
}request_id.These codes are about your own integration, never about another party's data, so they keep their code in production too, with a next_step (a label, and a link where there is one) that says what to do:
| Code | Status | When | What to do |
|---|---|---|---|
company_profile_incomplete | 409 | A feature needs a company profile field the founder lacks: matches, the network, investor fit or an intro request. The body names the feature, the missing and recommended fields, a hint and the fix. | Send the fields in missing with PATCH on the founder's company route, then call again. See Company profile and readiness. |
company_profile_invalid | 400 | A company block holds an unknown field, a field Narro sets itself, or a value outside an option list. errors names every field with the allowed values. Nothing is written. | Fix the fields in errors and send the request again. See Company profile and readiness. |
founder_token_required | 403 | A partner key on a route that acts for one founder. Every founder route answers this way. | Mint a founder token with POST /founder-tokens and send it as the bearer. |
product_unavailable | 403 | Any route of Events or Widgets, with a test key or a live key. Both products are closed to partners for now. | Nothing to change in your code: build on the open routes. The Programs API and the Data API are open now. |
ordinal_taken | 409 | Creating a module with an ordinal another module of the cohort holds (1 to 99, one module each). | Send next_free_ordinal from the body (the next step names it), or free one with DELETE /modules/{id}. |
scope_required | 403 | A live key, or the key that minted a founder token, lacks the scope the call needs. A test key holds every scope. | Create a live key with that scope in the Hub, switch to it, then revoke the old one. |
sandbox_only | 403 | A live key on a sandbox control: POST /sandbox:reset, GET /sandbox/workspace, POST /sandbox/events:trigger or POST /sandbox/intros/{id}:advance. | Call it with your test key. |
founder_not_on_roster | 403 | On codes:issue, an item of founder_ids that is neither a roster member id nor the fdr_ founder id of an active founder on the roster. | Send the member id or the fdr_ id the roster answer and POST /founder-tokens return. |
version_conflict | 409 | The round changed since you read it. | Send the current Round.version in If-Match. The ETag header of a round answer is the same value, so you can send that. |
Every route lists its own codes on Endpoints. The groups that are easy to miss:
| Routes | Codes you can get | Notes |
|---|---|---|
Investor research: GET /me/investors/{ref}/interests, /topics, /activity, /similar, /fit, /posts and /content | founder_token_required (a partner key), not_found (an investor that is not on the founder's own list), malformed_field (a query parameter the route does not take), rate_limited (live only) | Founder calls. /interests, /topics, /activity and /fit take no query parameters: limit or cursor there is a 400. An empty answer means Narro has not collected that investor's research yet. |
Sandbox controls: POST /sandbox:reset, GET /sandbox/workspace, POST /sandbox/events:trigger, POST /sandbox/intros/{id}:advance | sandbox_only (a live key), intro_invalid_transition (an intro already past the status you name), invalid_enum (an event type your endpoints cannot subscribe to) | Test keys only. They never touch live data. |
Clean up: DELETE /modules/{id}, DELETE /webhooks/{id} | not_found (already gone, or another cohort's), conflict (a live module that founders have submitted deliverables to) | Both take an Idempotency-Key: a repeat with the same key answers the same acknowledgement. |
Events and widget tokens: /events, /events/{id}, registrations, POST /widget-tokens | product_unavailable | Closed to partners for now, for test keys too. |
404, {"code":404,"message":"..."}, and not a problem body./programs/v1 with no credential is the standard 401. A detailed environment adds a pointer to the public path, which is where the flows without a credential live. A call that uses a credential that is unknown, malformed, revoked or expired gets the same 401 as on the public path. A founder session cookie is not accepted on /programs/v1.404 on /programs/v1. Use the public path. A credential that spans more than one program is 400 on /programs/v1 and asks for the public path. That cannot occur today.404 with not_found.400 with unsupported_schema_version. A major past its sunset date is 410 with version_sunset.413 with file_too_large. A write must be application/json and must be a JSON object. A query parameter the route does not list is refused, and so is a field the body does not list.503 with service_unavailable and, usually, a Retry-After. A suspended partner connection is a 403 on the API and on MCP.Every response has an X-Request-Id header, and every problem body has request_id. Log it with each failed call. It is the only handle Narro has to find what happened, because Narro does not keep request bodies in its logs. The request log in the Hub test console lists them for sandbox calls.
Limits exist on the API, on MCP and on widgets. They apply per key or token, per founder and per network address. These are the live limits per minute (see Rate limits). Test keys are never rate limited: a test key's responses carry no RateLimit-* headers and the gateway never answers it 429. Narro can tune them for a partner, so read RateLimit-Limit and RateLimit-Policy for the value that applies to you, and do not hard code these. The same limits apply on /programs/v1 and on the public path, and a call counts once whichever form you use.
| Surface | Per key or token | Per founder | Per network address |
|---|---|---|---|
| API (partner key) | 600 per key | 60 per founder | 300 per network address |
| MCP | 120 per key | 30 per founder | 60 per network address |
| Widgets and the Narro portal | 300 per widget token | 60 per founder | 120 per network address |
RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset for the tightest limit that applies, and RateLimit-Policy in the form <limit>;w=60. RateLimit-Reset is the seconds until that count resets.429, with a Retry-After header and retry_after in the body, both in seconds. Wait at least that long.| Status | Retry? | How |
|---|---|---|
| 400, 413, 415, 422 and any validation error | Never | Fix the request. Retrying the same body returns the same error. |
| 401 | No | Check the key in your .env. If Narro asked this key to sign, check the signature, the timestamp and the nonce: a retry needs a new nonce. |
| 402 | No | Take the step in next_step first: choose a plan, or add a card and top up. Retry after Retry-After when it is there. |
| 403, 404 | No | The request is not allowed or not found. A retry does not change that. |
| 409 | No | A conflict. For idempotency_conflict, use a new key for a different operation. |
| 410 | No | The version is gone. Move to the successor. |
| 429 | Yes | Wait for Retry-After, then retry. |
| 500, 503, 504 and network errors | Yes | Exponential backoff with jitter, a cap and a limit on attempts. On a 503, wait for Retry-After when it is there. |
Idempotency-Key per operation and send it on every attempt. Sign each attempt again with a new timestamp and nonce.import { narro } from './narro-client.mjs';
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
const RETRY_STATUS = new Set([429, 500, 502, 503, 504]);
// Retry only transient failures. Never retry a 400 or 422: fix the request. Reuse one idempotency key for the whole operation.
export async function withRetry(method, path, payload, { attempts = 5 } = {}) {
const idempotencyKey = crypto.randomUUID();
for (let attempt = 1; ; attempt += 1) {
try {
return await narro(method, path, payload, { idempotencyKey });
} catch (error) {
const transient = RETRY_STATUS.has(error.status) || error.status === undefined;
if (!transient || attempt >= attempts) throw error;
const backoff = Math.min(30000, 500 * 2 ** attempt);
const wait = error.retryAfter ? error.retryAfter * 1000 : Math.random() * backoff; // full jitter
await sleep(wait);
}
}
}Writes carry an Idempotency-Key. The same key with the same body returns the stored result and the header Idempotent-Replay: true. The same key with another body is 409. The rules are on Authentication.