---
title: "Trigger Renew Gmail Watch"
method: POST
path: "/api/v1/internal/renew-gmail-watch"
tags: ["v1", "Internal"]
---

# Trigger Renew Gmail Watch

`POST /api/v1/internal/renew-gmail-watch`

## Request

- Base URL: `https://api.jeevyfabrication.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.jeevyfabrication.com/api/v1/internal/renew-gmail-watch`
- Auth: none declared

Re-register every Gmail watch so Pub/Sub push keeps flowing.

Google's ``users().watch()`` expires ~7 days after registration, after which
inbound capture silently stops. This endpoint re-registers all watches in
``gmail_watch_state`` (idempotent; resets the clock). Called daily by the
notification_scheduler container (moved off GitHub Actions — see
backend/workers/notification_scheduler.py). Returns per-inbox
renewed/failed counts.

`renew_all_watches` is itself idempotent, but the once-per-day dedup
(scheduler_job_runs) still applies, same as deadline-check/weekly-summary —
this endpoint has no `shop_id` single-shop test path, so the gate is
unconditional. Pass `force=true` to bypass it for manual testing.

## Query parameters

- `force` boolean: Bypass the once-per-day dedup check

## Headers

- `X-Internal-Key` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-26** `c6134c77cadc`: 1 info
  - added the new optional `query` request parameter `force`

[Operation history](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api/changes/api/v1/internal/renew-gmail-watch/post.md)

---

[API](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api.md) - [All operations](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api/revisions/ad9a01abeac9?raw)
