---
title: "Run birthday coupon generation manually"
method: POST
path: "/api/payments/birthday-coupons/run"
tags: ["payments"]
---

# Run birthday coupon generation manually

`POST /api/payments/birthday-coupons/run`

Admin-only manual trigger for testing/operations. Defaults to dry-run.

## Query parameters

- `target_date` string, date, nullable — Target date YYYY-MM-DD (defaults to today)
- `email` string, nullable — Optional recipient email to process only one matching birthday user
- `dry_run` boolean — If true, does not create Stripe codes or send emails
- `send_email` boolean — If false, create codes without sending email

## Response `200`

Successful Response

- BirthdayCouponRunResponse — Run result for birthday coupon generation.
  - `reference_date` string, date, required
  - `timezone` string, required
  - `dry_run` boolean, required
  - `total_candidates` integer, required
  - `created` integer, required
  - `emailed` integer, required
  - `skipped_existing` integer, required
  - `failed` integer, required
  - `requested_email` string, nullable
  - `email_match_found` boolean, nullable
  - `rows` BirthdayCouponRunRow[]
    - `patient_id` string, nullable
    - `email` string, nullable
    - `promotion_code` string, nullable
    - `status` string, required
    - `error` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/corabea/apis/corabea-api.md) · [All operations](https://skmtc.dev/corabea/apis/corabea-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/corabea/corabea-api/revisions/13c1bce1bdc4/schema)
