Parallèle Docs
Api

Pages

API reference for page endpoints.

Pages API

Pages are structured content documents with rich JSON content and SEO metadata.

List Pages

Fetch all published pages.

GET /api/public/pages

Query Parameters

ParameterTypeRequiredDescription
localestringNoFilter by locale
typestringNoFilter by page type (LANDING, ARTICLE, etc.)
allLocalesbooleanNoReturn pages in all locales

Example

curl "https://parallele.ai/api/public/pages?locale=en" \
  -H "x-api-key: prl_xxx"

Response:

{
  "pages": [
    {
      "slug": "about",
      "locale": "en",
      "type": "LANDING",
      "title": "About Us",
      "content": {
        "blocks": [
          { "type": "hero", "title": "Our Story", "image": "https://..." },
          { "type": "text", "body": "Founded in 2020..." }
        ]
      },
      "metaTitle": "About Us | My Company",
      "metaDescription": "Learn about our mission and team.",
      "publishedAt": "2025-01-15T10:00:00Z",
      "updatedAt": "2025-01-20T14:30:00Z"
    }
  ],
  "site": {
    "name": "My Website",
    "domain": "example.com",
    "defaultLocale": "en",
    "locales": [...]
  }
}

Get Single Page

Fetch a specific page by slug.

GET /api/public/pages/:slug

Path Parameters

ParameterTypeRequiredDescription
slugstringYesPage slug

Query Parameters

ParameterTypeRequiredDescription
localestringNoLocale code

Example

curl "https://parallele.ai/api/public/pages/about?locale=en" \
  -H "x-api-key: prl_xxx"

Response:

{
  "page": {
    "slug": "about",
    "locale": "en",
    "type": "LANDING",
    "title": "About Us",
    "content": {
      "blocks": [
        { "type": "hero", "title": "Our Story", "image": "https://..." },
        { "type": "text", "body": "Founded in 2020..." },
        { "type": "team", "members": [...] }
      ]
    },
    "metaTitle": "About Us | My Company",
    "metaDescription": "Learn about our mission and team.",
    "publishedAt": "2025-01-15T10:00:00Z",
    "updatedAt": "2025-01-20T14:30:00Z"
  },
  "site": {
    "name": "My Website",
    "domain": "example.com"
  }
}

Page Types

Pages can have different types to organize content:

TypeDescription
LANDINGMarketing/landing pages
ARTICLELong-form content
LEGALLegal documents (privacy, terms)
CONTACTContact pages

Filter by type:

GET /api/public/pages?type=LANDING

Content Structure

Page content is a flexible JSON structure. The schema depends on your implementation, but typically follows a block-based pattern:

{
  "blocks": [
    {
      "type": "hero",
      "title": "Welcome",
      "subtitle": "Build something great",
      "image": "https://cdn.example.com/hero.jpg",
      "cta": {
        "label": "Get Started",
        "url": "/signup"
      }
    },
    {
      "type": "features",
      "items": [
        { "icon": "rocket", "title": "Fast", "description": "..." },
        { "icon": "shield", "title": "Secure", "description": "..." }
      ]
    }
  ]
}

Rendering Pages

Parse the content structure in your frontend:

function PageRenderer({ content }) {
  return (
    <div>
      {content.blocks.map((block, i) => {
        switch (block.type) {
          case "hero":
            return <HeroBlock key={i} {...block} />;
          case "features":
            return <FeaturesBlock key={i} {...block} />;
          case "text":
            return <TextBlock key={i} {...block} />;
          default:
            return null;
        }
      })}
    </div>
  );
}

On this page