> ## Documentation Index
> Fetch the complete documentation index at: https://docs.glider.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# tRPC Content API

> Public Glider-owned content feed endpoints for product surfaces.

The `content.*` namespace is available on the public tRPC base endpoint:

* Base endpoint: `POST /v1/trpc`
* Namespace: `content.*`
* Auth: public
* Upstream: [Glider blog](https://blog.glider.fi/) and Glider-owned public
  strategy blueprints
* Server cache: 7200 seconds in process memory for successful refreshes; failed
  refreshes and curated fallback responses retry after 60 seconds

## Procedures

* `content.getLatestBlogPosts`
  * Purpose: fetch the latest posts from the Glider blog for dashboard and
    product education surfaces
  * Input:
    * optional `limit`, 1-8, default `4`
  * Upstream source:
    [`https://blog.glider.fi/rss/`](https://blog.glider.fi/rss/)
  * Response includes normalized post `id`, `title`, `url`, `excerpt`,
    `imageUrl`, `publishedAt`, `categories`, `author`, `sourceUrl`, `fetchedAt`,
    and cache metadata

* `content.getLatestTeamPortfolios`
  * Purpose: fetch the latest public strategy blueprints owned by the canonical
    Glider team user for dashboard discovery surfaces
  * Input:
    * optional `limit`, 1-8, default `4`
  * Source:
    * canonical user id `a725e6a1-8872-45ae-a753-c853b0dd848b`
    * linked addresses in `user_addresses`
    * public rows in `strategy_blueprints`
    * excludes curated internal/test blueprint ids that should not appear on
      discovery surfaces
  * Response includes normalized portfolio `id`, `blueprintId`, `name`,
    `description`, `createdAt`, `updatedAt`, `fetchedAt`, `ownerUserId`, and
    cache metadata

## Runtime Notes

* The platform API parses Ghost RSS server-side so browser clients do not depend
  on RSS CORS behavior.
* RSS refreshes are bounded by timeout, content type, and response size before
  XML parsing.
* The team portfolio shelf resolves the canonical Glider user to linked wallet
  addresses server-side; browser clients never send or filter by the team
  wallet.
* If a refresh fails after a successful fetch, the API returns the cached posts
  or portfolios with `cache.stale: true` and a short retry TTL.
* If the upstream feed or database query is unavailable and no cache exists, the
  procedure returns a small curated fallback list with
  `cache.source: "fallback"` and `cache.stale: true`.

## Example Call

Fetch the latest four Glider blog posts:

```bash theme={null}
curl --request POST \
  --url 'https://api.glider.fi/v1/trpc/content.getLatestBlogPosts' \
  --header 'content-type: application/json' \
  --data '{"json":{"limit":4}}'
```

Fetch the latest four Glider team portfolios:

```bash theme={null}
curl --request POST \
  --url 'https://api.glider.fi/v1/trpc/content.getLatestTeamPortfolios' \
  --header 'content-type: application/json' \
  --data '{"json":{"limit":4}}'
```
