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

# Get all news articles

> Fetch the latest Learn news articles with resized imagery.

Fetch the latest Learn news articles sourced from the editorial ingest pipeline. Up to 50 items sorted by `createdAt` descending.

### Authentication & headers

<ParamField header="Authorization" type="string" required>
  Bearer token issued by Auth0. Format: `Bearer YOUR_ACCESS_TOKEN` and must include the `wealthyhood:nbg` scope.
</ParamField>

### Example request

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET 'https://api.wealthyhood.com/learn/news' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
  ```
</RequestExample>

### Example response

<ResponseExample>
  ```json Success theme={null}
  {
    "data": [
      {
        "key": "market-update-2024",
        "contentType": "newsWealthyhub",
        "id": "64f0c51e7fb3fc001234abcd",
        "createdAt": "2024-01-15T10:30:00Z",
        "title": "Market Update: Q1 2024",
        "contentHTML": "<body>...</body>",
        "previewTitleMain": "Market Update",
        "readingTime": "5 min",
        "fullImageURL": "https://cdn.example.com/news/full.jpg",
        "previewImageURL": "https://cdn.example.com/news/preview.jpg",
        "storyImageURL": "https://cdn.example.com/news/story.jpg"
      }
    ]
  }
  ```
</ResponseExample>

### Response fields

<ResponseField name="data" type="NewsItem[]" required>
  List of news articles in reverse chronological order.

  <Expandable title="NewsItem">
    <ResponseField name="key" type="string" />

    <ResponseField name="contentType" type="&#x22;newsWealthyhub&#x22;" />

    <ResponseField name="id" type="string" required>
      MongoDB document identifier (24-hex). Use this ID to fetch the full article via `GET /news/{id}`.
    </ResponseField>

    <ResponseField name="createdAt" type="date-time" />

    <ResponseField name="title" type="string" />

    <ResponseField name="contentHTML" type="string">
      Sanitised HTML body with inline fonts and styles for the Learn reader.
    </ResponseField>

    <ResponseField name="previewTitleMain" type="string" />

    <ResponseField name="readingTime" type="string" />

    <ResponseField name="fullImageURL" type="uri" />

    <ResponseField name="previewImageURL" type="uri" />

    <ResponseField name="storyImageURL" type="uri" />
  </Expandable>
</ResponseField>


## OpenAPI

````yaml GET /learn/news
openapi: 3.0.3
info:
  title: Wealthyhood Learn API
  version: 1.0.0
  description: >
    Machine-to-machine endpoints that power the Wealthyhood Learn screen.


    All routes require a bearer access token issued by Auth0 with the
    `wealthyhood:nbg` scope.
servers:
  - url: https://{host}
    variables:
      host:
        default: api.wealthyhood.com
        description: Wealthyhood API host.
security:
  - bearerAuth: []
tags:
  - name: Learn
    description: Investor education content surfaced in the Learn screen.
paths:
  /learn/news:
    get:
      tags:
        - Learn
      summary: Get all news articles
      description: >
        Fetch the latest Learn news articles sourced from the editorial ingest
        pipeline. Up to 50 articles are

        returned, sorted by `createdAt` descending. Image URLs are pre-processed
        via Cloudflare for consistent ratios.

        Content is localized based on the user's language preference.
      parameters:
        - $ref: '#/components/parameters/XUserId'
      responses:
        '200':
          description: Latest Learn news items.
          headers:
            Cache-Control:
              schema:
                type: string
              description: Response cached for 30 minutes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NewsResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
components:
  parameters:
    XUserId:
      name: x-user-id
      in: header
      required: true
      description: >-
        MongoDB identifier of the Wealthyhood user. Used to determine the
        language preference for localized content.
      schema:
        type: string
        pattern: ^[a-f0-9]{24}$
  schemas:
    NewsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/NewsItem'
      required:
        - data
    NewsItem:
      type: object
      properties:
        key:
          type: string
        id:
          type: string
          description: >-
            MongoDB document identifier (24-hex). Use this ID to fetch the full
            article via `GET /news/{id}`.
          example: 64f0c51e7fb3fc001234abcd
        createdAt:
          type: string
          format: date-time
        title:
          type: string
        contentHTML:
          type: string
          description: Sanitised HTML body for the article.
        previewTitleMain:
          type: string
        readingTime:
          type: string
        fullImageURL:
          type: string
          format: uri
        previewImageURL:
          type: string
          format: uri
        storyImageURL:
          type: string
          format: uri
      required:
        - key
        - id
        - createdAt
        - title
        - contentHTML
        - previewTitleMain
        - readingTime
        - fullImageURL
        - previewImageURL
        - storyImageURL
    ApiErrorResponse:
      type: object
      properties:
        status:
          type: integer
        error:
          type: object
          properties:
            message:
              type: string
            description:
              type: string
              nullable: true
        responseId:
          type: string
          format: uuid
  responses:
    UnauthorizedError:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
    ForbiddenError:
      description: Token lacks the required scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Auth0-issued access token that includes the `wealthyhood:nbg` scope.

````