---
title: "Generate Product Update"
method: POST
path: "/api/v1/internal/product-updates/generate"
tags: ["product-updates"]
---

# Generate Product Update

`POST /api/v1/internal/product-updates/generate`

## Request

- Base URL: `https://api.seoproai.co`
- URL: `https://api.seoproai.co/api/v1/internal/product-updates/generate`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://dajosjnaalanhqksxrpe.supabase.co/auth/v1/authorize`, token URL `https://dajosjnaalanhqksxrpe.supabase.co/auth/v1/token`)

Generate and optionally send a product update email based on recent GitHub activity.

This endpoint:
1. Fetches recent commits and merged PRs from the specified GitHub repository
2. Uses an LLM to draft a professional product update email
3. Sends the email to the specified recipient

Authentication: Requires x-cron-secret header matching CRON_SECRET env var.

This endpoint can be triggered:
- Manually for one-off updates
- By a Supabase Edge Function (bi-weekly)

## Headers

- `x-cron-secret` string, required

## Request body

- ProductUpdateRequest: Request body for triggering a product update.
  - `owner` string: GitHub repository owner
  - `repo` string: GitHub repository name
  - `since_days` integer: Days to look back for changes
  - `recipient_email` string, nullable: Override recipient email
  - `dry_run` boolean: If true, generate but don't send email

## Response `200`

Successful Response

- ProductUpdateResponse: Response from product update generation.
  - `status` string, required
  - `message` string, required
  - `commits_count` integer
  - `prs_count` integer
  - `subject` string, nullable
  - `body_preview` string, nullable
  - `dry_run` boolean
  - `broadcast_created` boolean
  - `broadcast_id` string, nullable
  - `bento_dashboard_url` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/seoproai/apis/seopro-ai.md) · [All operations](https://skmtc.dev/seoproai/apis/seopro-ai/llms.txt) · [OpenAPI document](https://skmtc.dev/seoproai/apis/seopro-ai/revisions/5b4b6391ddc9?raw)
