---
title: "Generate Content"
method: POST
path: "/api/scheduled-notifications/admin/generate-content"
tags: ["scheduled-notifications"]
---

# Generate Content

`POST /api/scheduled-notifications/admin/generate-content`

Hourly cron job endpoint to pre-generate notification content.
By default processes a 1-hour time slice 47-48 hours ahead.
Use start_hours_ahead and end_hours_ahead query params to override.

For each notification in the slice:
- Determines type (personalized vs template) via probability
- Template: inserts content directly into DB
- Personalized: submits Gemini batch (results collected via retry)

Requires x-api-key header for authentication.

## Query parameters

- `start_hours_ahead` integer, nullable — Hours ahead of now for window start (default: 47)
- `end_hours_ahead` integer, nullable — Hours ahead of now for window end (default: 48)

## Headers

- `x-api-key` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/usecreed/apis/creed-api.md) · [All operations](https://skmtc.net/usecreed/apis/creed-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/usecreed/creed-api/versions/523833f9e819/schema)
