# updateAppointmentReminder

A reminder TEXTS REAL CONTACTS automatically. Before calling, show the user every step's exact message and timing and wait for them to confirm that copy; never invent or reword it and send it unseen. Messages may use {{merge fields}} (the APPOINTMENT keys under MERGE FIELDS in updateWorkflowGraph's description); a step with a field an appointment cannot fill is NOT sent for it, so keep to fields every appointment has. Edit a reminder by appointmentReminderId (listAppointmentReminders). steps REPLACES the whole set: send every step to keep, with its message and timing. A step left out stops sending (booked appointments included), a kept step's scheduled texts take the edit, and a NEW step reaches only appointments booked after the edit. isGlobal: omit to leave the default untouched, true to make this the default, false to stop it being one. Only the default: setDefaultAppointmentReminder.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "updateAppointmentReminder", "variables": {...} }`
- Scope: `WRITE`
- Type: mutation
- Idempotency: honors `Idempotency-Key` (24 h)
- Rate-limited: no

## Variables

- `appointmentReminderId`: `ID!` (required)
- `steps`: `[AppointmentReminderStepInput!]`. One step of a reminder: a single SMS and how far ahead of the appointment's `startDate` to send it.
  - `message`: `String!` (required)
  - `amountBefore`: `Int!` (required)
  - `unitBefore`: `AppointmentReminderTimeUnit!` (required, one of `MINUTES`, `HOURS`, `DAYS`). Unit for `AppointmentReminder.amountBefore`. Capped at DAYS: a reminder more than a day before the appointment isn't a meaningful product use case.
- `isGlobal`: `Boolean`

## Response (data, an example)

```json
{
  "appointmentReminderMutation": {
    "updateAppointmentReminder": {
      "id": "<ID>",
      "steps": [
        {
          "message": "…",
          "amountBefore": 0,
          "unitBefore": "MINUTES"
        }
      ],
      "isGlobal": true,
      "updatedAt": "2026-01-01T00:00:00.000Z"
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "updateAppointmentReminder",
    "variables": {
      "appointmentReminderId": "<appointmentReminderId>"
    }
  }'
```
