When to use this page
If you’re building a custom integration, a scheduled job, or a non-MCP agent, or you just want to confirm your PAT works before pasting it into Claude, this page walks you through the API withcurl. Every endpoint shown here is also exposed via MCP if you’d rather work that way; see the Quickstart for that path.
The base URL is:
1. Verify auth
Set your token:401 PAT_MALFORMED, the token format is wrong. If you see a 401 with no code, the token is correctly shaped but doesn’t resolve to an active key. Either way, generate a fresh one in Settings → API Tokens.
2. Check your tier and credits
Tier and credits gate write operations. Always check before a batch:canCreateProject, projectsRemaining, and nextReset so you can plan around your monthly allocation.
3. List your projects
hasAuditAnalysis, hasDeliverables) and counts so you can see workflow progress at a glance.
4. Create a project
Costs 1,000 credits. Returns201 with the new project.
5. Trigger the audit analysis
This is the expensive call. For curl and server-side jobs, the direct synthesis endpoint can run synchronously for 60–300 seconds, so set a generous timeout:{ analysis, requestData, message }. If your project already has current document and interview analysis records, you can use the async endpoint and poll the returned job:
status is "completed" or "failed". To check the synchronous endpoint’s current project-level status:
"running" while in flight, the full payload when complete.
6. Read the deliverables
After analysis completes:{ success: true, data: ... }. The data object contains the executive summary, opportunity matrix, risk assessment, and stakeholder memos.
For just the opportunities (most common agent query):
7. Capture a note into Nucleus
Nucleus ingests text from outside sources via captures. After a client call, post the transcript:{ "capture": { ... } } with status: "pending". Extraction runs async (~15–60s), poll the capture detail to see structured items appear:
status: "processed" and a non-zero items count means extraction finished.
8. Search Nucleus memories
9. Convert a lead
If you have inbound leads from a ReadyLink survey, list and convert them:400 (not 409). Check surveyStatus !== 'converted' before calling.
Error handling, in one place
| Status | What it means | What to do |
|---|---|---|
| 200 / 201 / 204 | Success | Continue |
| 400 | Validation failed; check code (e.g. EMPTY_PATCH, DESCRIPTION_TOO_LONG) | Fix the request body |
401 PAT_MALFORMED | Token format invalid | Generate a new token |
| 401 (no code) | Token doesn’t resolve | Token revoked or expired; generate a new one |
| 402 | Insufficient credits (lead conversion only) | Buy credits or wait for monthly reset |
403 PAT_SCOPE_INSUFFICIENT | Wrong scope (write needed) | New token with read + write |
403 PAT_ROUTE_NOT_ALLOWED | Route isn’t on the agent allowlist | Use the web app for that one |
| 404 | Resource not found, OR you don’t own it (RLS) | Check the ID and your ownership |
| 429 | Rate limit hit | Honor Retry-After, back off |
| 500 / 502 / 503 | Server side or kill switch | Retry with exponential backoff; if persistent, contact support |

