Skip to content

Prudai Developer API: docs

The operations of this part (Docs).

Base URL https://api.prudai.com/v1. Logging in is in Login, scopes in Scopes and permissions, errors in Errors. Overview.

MethodPathWhat it doesState
GET/v1/docs/pages/{slug}Read one documentation pageIn production
GET/v1/docs/searchSearch the product documentationIn production

Read one documentation page

GET /v1/docs/pages/{slug}

The Markdown of one documentation page (at most 30,000 characters; truncated and notIncluded say when it was cut). A page outside the requested visibility is a 404, exactly like a page that does not exist.

  • State: in production.
  • Scope: no separate scope; logging in with your key or token is still required.
  • Approval: none, no extra step.

Parameters

  • slug path · string required
    Page slug without language prefix, for example chat, files or irma/beheer. max length 300
  • language query · string
    Documentation language. One of: nl, en · default: "nl"
  • visibility query · string
    Highest visibility to include: public (default), gated (also the pages behind the docs single sign-on; any valid credential) or staff (Prudai staff organisation only, otherwise 403 membership_required). One of: public, gated, staff · default: "public"

Responses

StatusMeaning
200The page in the task envelope.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
404Unknown model, source or document.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
500Unexpected error on Prudai’s side. Not charged, except work that completed before the failure (reported in details.charged_credits).

Fields in data (200)

  • title string
  • slug string
  • language string
    One of: nl, en
  • url string (uri)
  • markdown string
  • headings array<string>
  • characters integer
    min 0
  • truncated boolean
  • visibility string
    One of: public, gated, staff
curl
curl -s "https://api.prudai.com/v1/docs/pages/<slug>" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (coming soon)
prudai leo docs-pages get
Response 200
{
"title": "string",
"slug": "string",
"language": "nl",
"url": "https://voorbeeld.nl",
"markdown": "string",
"headings": [
"string"
],
"characters": 1,
"truncated": false,
"visibility": "public"
}

Search the product documentation

GET /v1/docs/search

Ranked documentation pages for a question, each with the best matching section (section, section_url with its anchor) and a snippet. The index is rebuilt with every documentation deploy, not per request; provenance.index_build_id names the build. visibility=public (default) leaves out the pages behind the docs single sign-on and says so in notIncluded.

  • State: in production.
  • Scope: no separate scope; logging in with your key or token is still required.
  • Approval: none, no extra step.

Parameters

  • q query · string required
    The question or keywords, in Dutch or English. min length 3 · max length 500
  • language query · string
    Documentation language. One of: nl, en · default: "nl"
  • limit query · integer
    default: 5 · min 1 · max 10
  • visibility query · string
    Highest visibility to include: public (default), gated (also the pages behind the docs single sign-on; any valid credential) or staff (Prudai staff organisation only, otherwise 403 membership_required). One of: public, gated, staff · default: "public"

Responses

StatusMeaning
200Matching pages in the task envelope, best first.
400Malformed request or unsupported parameter (for example client-sent tools).
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
500Unexpected error on Prudai’s side. Not charged, except work that completed before the failure (reported in details.charged_credits).

Fields in data (200)

  • query string
  • language string
    One of: nl, en
  • matches array<object>
  • matches[].title string
  • matches[].slug string
  • matches[].url string (uri)
  • matches[].section string
    Heading path of the best matching section (“Heading › Subheading”); null for the introduction. may be null
  • matches[].section_url string (uri)
    Page URL with the anchor of that section.
  • matches[].snippet string
  • matches[].score integer
    Relative rank score within this response; not comparable across requests. min 0
curl
curl -s "https://api.prudai.com/v1/docs/search?q=%3Cq%3E" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (coming soon)
prudai leo docs search
Response 200
{
"query": "string",
"language": "nl",
"matches": [
{
"title": "string",
"slug": "string",
"url": "https://voorbeeld.nl",
"section": "string",
"section_url": "https://voorbeeld.nl",
"snippet": "string",
"score": 1
}
]
}