Resolve a single route by URL path, with parametric matching and validated param documents.
Resolve a single route for a given path. An exact path match wins; otherwise the best-scoring parametric pattern is selected, its bound params are validated against documents, and the effective blocks are computed. Optionally returns the resolved param documents.
Auth: API key (x-api-key header or api_key query param).
| Param | Type | Required | Notes |
|---|---|---|---|
websiteId | uuid | yes | Target website. |
path | string | yes | URL path to resolve, e.g. /docs/getting-started. |
api_key | string | no | Alternative to the x-api-key header. |
preview | boolean | no | Default false. When true, resolves against draft content and does not require published docs. |
skipValidation | boolean | no | Default false. When true, param-validation failures do not 404. |
{
"route": {
"path": "/docs/us/guide",
"pattern": "/docs/{country}/guide",
"block_ids": ["..."],
"state": "Live",
"param_bindings": { "country": "country" }
},
"resolvedParams": {
"country": {
"value": "us",
"schemaName": "country",
"document": { "id": "...", "schema_name": "country", "title": "United States", "published_content": {} }
}
}
}
route has the same shape as an entry from GET /routes. resolvedParams is present only when the route has param bindings and at least one document resolved. Params bound to the language schema resolve against a built-in list of supported languages rather than the database.
curl '{CMS_API_URL}/route?websiteId=<uuid>&path=/docs/getting-started' \
-H 'x-api-key: <key>'
400 β missing/invalid websiteId, or missing/empty path401 β invalid API key404 β route not found, or parameter validation failed (unless skipValidation=true)