---
title: "Change the due date"
method: POST
path: "/api/vega/due-date"
tags: ["Profile"]
---

# Change the due date

`POST /api/vega/due-date`

## Request

- Base URL: `https://getmyluna.app`
- URL: `https://getmyluna.app/api/vega/due-date`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `luna_session`

Any caregiver. Only while expecting: moves the due date (up to 14 days ago to 10 months ahead). Returns `409` once a date of birth is set; the profile is not changed.

## Request body

- DueDateRequest
  - `due_date` string, required: YYYY-MM-DD, up to 14 days ago to 10 months ahead.
  - `client_today` string, nullable: Optional: the browser's local date (YYYY-MM-DD), used when within a day of the family's local date.

## Response `200`

Success

- DueDateResponse
  - `ok` boolean, required
  - `due_date` string, required
  - `expecting` Expecting: Set while the baby isn't born yet: there is no age and no age-based target.
    - `due_date` string, required
    - `days_until_due` integer, required: 0 once the due date arrives.
    - `due_date_reached` boolean, required
    - `days_overdue` integer: Days since the due date while the birth isn't confirmed yet (0 before it). The family stays expecting until a caregiver confirms the arrival.

## Other responses

- `400`: Bad Request
- `401`: Missing or invalid credentials
- `403`: `insufficient_scope`: the bearer token lacks the `write` scope
- `409`: Conflict

---

[API](https://skmtc.dev/getmyluna/apis/luna-api.md) · [All operations](https://skmtc.dev/getmyluna/apis/luna-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getmyluna/apis/luna-api/revisions/ef7b359c9648?raw)
