Knowledge Base API
Programmatically manage your agent's knowledge base. Push product updates, menu changes, and pricing without logging into the dashboard.
Get your API key →Start in 30 seconds
Pick your preferred approach. The AI Coding Agent tab gives you a copy-paste prompt to drop into Claude Code, Cursor, Windsurf, or any AI assistant — it writes the integration for you.
I want to integrate with the AgentNDX Knowledge Base API. Please implement a client for it using the spec below.
## Base URL
https://agentndx.com/api/v1
## Authentication
Every request requires this header:
Authorization: Bearer andx_<your_api_key>
API keys are generated from: AgentNDX dashboard → Settings → API tab (requires Business plan).
## Endpoints
GET /pages/{pageId}/knowledge
List all knowledge entries for a page.
Response: { data: [ { id, tenantId, pageId, type, question, answer, sortOrder, createdAt, updatedAt } ] }
POST /pages/{pageId}/knowledge
Create a knowledge entry.
Body: { "question": "string (required, max 2000)", "answer": "string (required, max 5000)", "type": "faq" | "custom" (default "custom") }
Response 201: { data: { id, tenantId, pageId, type, question, answer, sortOrder, createdAt, updatedAt } }
PUT /pages/{pageId}/knowledge/{entryId}
Update a knowledge entry. At least one field required.
Body: { "question": "string (optional)", "answer": "string (optional)" }
Response: { data: { ...updated entry } }
DELETE /pages/{pageId}/knowledge/{entryId}
Delete a knowledge entry.
Response: 204 No Content
PUT /pages/{pageId}/content
Partially update page content (hero text, services list, FAQ section).
All fields optional — only supplied fields are updated; others are preserved.
Body: {
"content": {
"hero": { "headline": "string", "subheadline": "string", "cta_text": "string", "trust_badges": ["string"] },
"services": [ { "name": "string", "description": "string", "price_range": "string (optional)" } ],
"faq": [ { "question": "string", "answer": "string" } ]
}
}
Response: { data: { id, slug, content, updatedAt } }
## Response Envelope
Success: { "data": <payload>, "meta": { "requestId": "req_..." } }
Error: { "error": { "code": "ERROR_CODE", "message": "Human-readable" }, "meta": { "requestId": "req_..." } }
## Error Codes
401 UNAUTHORIZED — Missing or invalid API key
402 PLAN_UPGRADE_REQUIRED — API requires Business plan
404 PAGE_NOT_FOUND — pageId not found or not yours
404 ENTRY_NOT_FOUND — entryId not found or not yours
422 VALIDATION_ERROR — Invalid request body (details in error.details[])
429 RATE_LIMITED — 120 requests/minute exceeded (Retry-After header included)
500 INTERNAL_ERROR — Transient server error, safe to retry
## My credentials (fill these in)
API_KEY=andx_YOUR_KEY_HERE
PAGE_ID=YOUR_PAGE_UUID_HERE
## What I want to build
[Describe your use case here — e.g. "a nightly cron job that syncs our menu from a Google Sheet" or "a webhook handler that updates pricing when our CMS publishes"]Paste the block above into any AI coding assistant — Claude Code, Cursor, Windsurf, GitHub Copilot, or similar. Fill in your API key and page ID from the Settings → API tab, then describe your use case at the bottom.
Authentication
API keys are 69-character strings prefixed with andx_. Generate them from Settings → API (requires Business plan). Pass the key as a Bearer token in every request.
Keys are scoped to your account — every API call only touches data belonging to your tenant. Never share your key or commit it to source control.
Authorization: Bearer andx_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4Finding your page ID
Your page ID is a UUID visible in the dashboard URL whenever you open a page:
https://agentndx.com/dashboard/pages/{pageId}/editorCopy the UUID segment between /pages/ and /editor. That is the value to use as {pageId} in every endpoint below.
Endpoint reference
Base URL: https://agentndx.com/api/v1
/pages/{pageId}/knowledgeList all knowledge entries for the given page.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| pageId | string (UUID) | Yes | The page whose knowledge entries you want to list. |
Response fields (each item in data[])
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | No | Entry UUID. |
| tenantId | string | No | Your tenant UUID. |
| pageId | string | No | Parent page UUID. |
| type | "faq" | "custom" | No | Entry type. |
| question | string | No | The question or topic. |
| answer | string | No | The answer text. |
| sortOrder | number | No | Display sort order. |
| createdAt | string (ISO 8601) | No | Creation timestamp. |
| updatedAt | string (ISO 8601) | No | Last-updated timestamp. |
▶Example
curl https://agentndx.com/api/v1/pages/YOUR_PAGE_ID/knowledge \
-H "Authorization: Bearer andx_YOUR_KEY"{
"data": [
{
"id": "ent_01abc...",
"tenantId": "ten_01xyz...",
"pageId": "pge_01def...",
"type": "custom",
"question": "What are your hours?",
"answer": "Monday–Friday, 9am–6pm.",
"sortOrder": 0,
"createdAt": "2026-01-15T10:00:00.000Z",
"updatedAt": "2026-01-15T10:00:00.000Z"
}
],
"meta": { "requestId": "req_01abc..." }
}/pages/{pageId}/knowledgeCreate a new knowledge entry for the given page.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| pageId | string (UUID) | Yes | The page to add the entry to. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| question | string | Yes | The question or topic. Max 2 000 characters. |
| answer | string | Yes | The answer text. Max 5 000 characters. |
| type | "faq" | "custom" | No | Entry type. Defaults to "custom". |
Returns 201 Created with the new entry.
▶Example
curl -X POST https://agentndx.com/api/v1/pages/YOUR_PAGE_ID/knowledge \
-H "Authorization: Bearer andx_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"question": "What are your hours?", "answer": "Monday–Friday, 9am–6pm."}'{
"data": {
"id": "ent_01abc...",
"tenantId": "ten_01xyz...",
"pageId": "pge_01def...",
"type": "custom",
"question": "What are your hours?",
"answer": "Monday–Friday, 9am–6pm.",
"sortOrder": 1,
"createdAt": "2026-05-28T14:00:00.000Z",
"updatedAt": "2026-05-28T14:00:00.000Z"
},
"meta": { "requestId": "req_02def..." }
}/pages/{pageId}/knowledge/{entryId}Update an existing knowledge entry. At least one field required.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| pageId | string (UUID) | Yes | The parent page UUID. |
| entryId | string (UUID) | Yes | The knowledge entry to update. |
Request body (at least one field required)
| Field | Type | Required | Description |
|---|---|---|---|
| question | string | No | Updated question text. Max 2 000 characters. |
| answer | string | No | Updated answer text. Max 5 000 characters. |
▶Example
curl -X PUT https://agentndx.com/api/v1/pages/YOUR_PAGE_ID/knowledge/ENTRY_ID \
-H "Authorization: Bearer andx_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"answer": "Monday–Saturday, 8am–7pm."}'{
"data": {
"id": "ent_01abc...",
"question": "What are your hours?",
"answer": "Monday–Saturday, 8am–7pm.",
"updatedAt": "2026-05-28T16:30:00.000Z"
},
"meta": { "requestId": "req_03ghi..." }
}/pages/{pageId}/knowledge/{entryId}Permanently delete a knowledge entry.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| pageId | string (UUID) | Yes | The parent page UUID. |
| entryId | string (UUID) | Yes | The knowledge entry to delete. |
Returns 204 No Content on success. No response body.
▶Example
curl -X DELETE https://agentndx.com/api/v1/pages/YOUR_PAGE_ID/knowledge/ENTRY_ID \
-H "Authorization: Bearer andx_YOUR_KEY"
# Response: 204 No Content/pages/{pageId}/contentPartially update page content — hero text, services list, and FAQ section. Only supplied fields are updated; others are preserved.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| pageId | string (UUID) | Yes | The page to update. |
Request body (all fields optional)
| Field | Type | Required | Description |
|---|---|---|---|
| content.hero.headline | string | No | Main page headline. |
| content.hero.subheadline | string | No | Supporting subheadline. |
| content.hero.cta_text | string | No | Call-to-action button label. |
| content.hero.trust_badges | string[] | No | Short trust badge strings shown below the hero. |
| content.services | ServiceItem[] | No | Array of service objects — each with name, description, and optional price_range. |
| content.faq | FaqItem[] | No | Array of FAQ objects — each with question and answer. |
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | No | Page UUID. |
| slug | string | No | Public URL slug. |
| content | object | No | Full updated page content object. |
| updatedAt | string (ISO 8601) | No | Updated timestamp. |
▶Example
curl -X PUT https://agentndx.com/api/v1/pages/YOUR_PAGE_ID/content \
-H "Authorization: Bearer andx_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": {
"hero": { "headline": "Fresh ingredients. Open late." },
"services": [
{ "name": "Ribeye", "description": "12oz USDA Choice", "price_range": "$42" }
]
}
}'{
"data": {
"id": "pge_01def...",
"slug": "joes-steakhouse",
"content": { "hero": { "headline": "Fresh ingredients. Open late." }, "..." },
"updatedAt": "2026-05-28T18:00:00.000Z"
},
"meta": { "requestId": "req_04jkl..." }
}Error reference
All errors use the same envelope:
{
"error": { "code": "ERROR_CODE", "message": "Human-readable description" },
"meta": { "requestId": "req_..." }
}| Status | Code | Meaning |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid API key. |
| 402 | PLAN_UPGRADE_REQUIRED | API access requires the Business plan. |
| 404 | PAGE_NOT_FOUND | pageId not found or does not belong to your tenant. |
| 404 | ENTRY_NOT_FOUND | entryId not found or does not belong to your tenant. |
| 422 | VALIDATION_ERROR | Invalid request body. Check error.details[] for field-level messages. |
| 429 | RATE_LIMITED | 120 requests/minute exceeded. Retry-After header indicates seconds to wait. |
| 500 | INTERNAL_ERROR | Transient server error — safe to retry with exponential backoff. |
Rate limits
The API allows 120 requests per minute per account, across all endpoints. When the limit is exceeded you receive a 429 RATE_LIMITED response with a Retry-After header indicating how many seconds to wait before retrying.
Recommended: implement exponential backoff starting at 1 second (e.g. 1s, 2s, 4s, 8s…). Most sync workloads — nightly cron jobs, CMS webhooks, menu updates — stay well under the limit.
Ready to automate your agent?
API keys are available on the Business plan. Upgrade in two clicks from your dashboard.