Skip to content
Rigel docs
Open Rigel

Set an event's reminders

calendar.event.set_reminders

POST/api/v1/households/{household_id}/commands/calendar.event.set_reminders

  • Command
  • Rigel runs it
  • Applies offline

Replaces the event's reminders (at most 5); the ones that stay are kept. minutes_before 0 reminds at the start. A reminder goes to its person_id; with none, to the people on the event who sign in, else the calendar's owner, else everyone who signs in. For a repeating event the next occurrence's reminders are scheduled. Allowed on events another app owns. Errors: event_not_found, person_not_found.

Parameters#

Set an event's reminders: parameters
FieldDescription
household_idpathstringrequired

The household's ID.

Idempotency-Keyheaderstringoptional

The command's ID. Reuse it when retrying the same command.

Request body#

JSON, as application/json.

Set an event's reminders: request body fields
FieldDescription
event_idstringrequired

A calendar event ID, such as evt_01JC0000000000000000000000.

remindersarray of objectsrequired

Reminders before the event or each occurrence, at most 5. Replaces the event's current reminders.

at most 5 items
reminders[].minutes_beforeintegerrequired

How long before the event starts, 0 to 40,320 (4 weeks).

0 to 40,320
reminders[].person_idstring or nulloptional

Who to remind. Leave out or null for the people on the event (or the calendar's owner, or everyone).

Response#

200 The command was applied.

Set an event's reminders: response fields
FieldDescription
resultobjectrequired

What the command returned, such as the IDs it created.

versionintegerrequired

The household version after the command.

Errors#

Every error has the same envelope: error.code, error.message, error.details, error.recovery and error.request_id.

Set an event's reminders: errors
StatusCodeWhen
400validation_failedA field is missing, misspelled or out of range. details.fields lists each problem.
401unauthenticatedThe request has no valid session.
404event_not_found
  • The event doesn't exist in this household.
  • The event must exist.
404person_not_found
  • The person doesn't exist in this household.
  • A reminder for a person who doesn't exist is refused.
404not_foundThe household doesn't exist, or you aren't a member of it.
409idempotency_key_reusedThe Idempotency-Key was already used for a different command.

Examples#

These are real. Each scenario is one of the command's test cases, run on a household when this site was built, and the response is what the API returned.

Adds reminders and schedules them

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "event_id": "evt_01JC000000000000000000000B",
  "reminders": [
    {
      "minutes_before": 0
    },
    {
      "minutes_before": 1440
    }
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    event_id: "evt_01JC000000000000000000000B",
    reminders: [
      {
        minutes_before: 0,
      },
      {
        minutes_before: 1440,
      },
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "event_id": "evt_01JC000000000000000000000B",
  "reminders": [
    {
      "minutes_before": 0
    },
    {
      "minutes_before": 1440
    }
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0902NK9JAN0KN3VT4

{
  "result": {},
  "version": 1
}

A reminder for someone named goes to them even if they aren't on the event

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "event_id": "evt_01JC000000000000000000000B",
  "reminders": [
    {
      "minutes_before": 30,
      "person_id": "per_01JC000000000000000000000A"
    }
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    event_id: "evt_01JC000000000000000000000B",
    reminders: [
      {
        minutes_before: 30,
        person_id: "per_01JC000000000000000000000A",
      },
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "event_id": "evt_01JC000000000000000000000B",
  "reminders": [
    {
      "minutes_before": 30,
      "person_id": "per_01JC000000000000000000000A"
    }
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0T01RFNSGMRCJ9VZG

{
  "result": {},
  "version": 1
}

With nobody on the event, the calendar's owner is reminded

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "event_id": "evt_01JC000000000000000000000B",
  "reminders": [
    {
      "minutes_before": 30
    }
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    event_id: "evt_01JC000000000000000000000B",
    reminders: [
      {
        minutes_before: 30,
      },
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "event_id": "evt_01JC000000000000000000000B",
  "reminders": [
    {
      "minutes_before": 30
    }
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0WW446A143SXXGNJP

{
  "result": {},
  "version": 1
}

With nobody on a shared calendar, everyone who signs in is reminded

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "event_id": "evt_01JC000000000000000000000B",
  "reminders": [
    {
      "minutes_before": 30
    }
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    event_id: "evt_01JC000000000000000000000B",
    reminders: [
      {
        minutes_before: 30,
      },
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "event_id": "evt_01JC000000000000000000000B",
  "reminders": [
    {
      "minutes_before": 30
    }
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0JR2QZC7AQQYW5X8A

{
  "result": {},
  "version": 1
}

An empty list clears the reminders and withdraws the pending notifications

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "event_id": "evt_01JC000000000000000000000B",
  "reminders": []
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    event_id: "evt_01JC000000000000000000000B",
    reminders: [],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "event_id": "evt_01JC000000000000000000000B",
  "reminders": []
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R005GWNB147B0VD0C2

{
  "result": {},
  "version": 1
}

The same reminders again keep their rows

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "event_id": "evt_01JC000000000000000000000B",
  "reminders": [
    {
      "minutes_before": 30
    }
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    event_id: "evt_01JC000000000000000000000B",
    reminders: [
      {
        minutes_before: 30,
      },
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "event_id": "evt_01JC000000000000000000000B",
  "reminders": [
    {
      "minutes_before": 30
    }
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0HD6SC1T255HZ1XK9

{
  "result": {},
  "version": 1
}

An event another app owns can change its reminders

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "event_id": "evt_01JC000000000000000000000D",
  "reminders": [
    {
      "minutes_before": 60,
      "person_id": "per_01JC000000000000000000000B"
    }
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    event_id: "evt_01JC000000000000000000000D",
    reminders: [
      {
        minutes_before: 60,
        person_id: "per_01JC000000000000000000000B",
      },
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "event_id": "evt_01JC000000000000000000000D",
  "reminders": [
    {
      "minutes_before": 60,
      "person_id": "per_01JC000000000000000000000B"
    }
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0749NZFHXP6YHNA7T

{
  "result": {},
  "version": 1
}

A long title is shortened to fit the notification

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "event_id": "evt_01JC000000000000000000000B",
  "reminders": [
    {
      "minutes_before": 30,
      "person_id": "per_01JC000000000000000000000B"
    }
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    event_id: "evt_01JC000000000000000000000B",
    reminders: [
      {
        minutes_before: 30,
        person_id: "per_01JC000000000000000000000B",
      },
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "event_id": "evt_01JC000000000000000000000B",
  "reminders": [
    {
      "minutes_before": 30,
      "person_id": "per_01JC000000000000000000000B"
    }
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0K1558NGZCD88JTT4

{
  "result": {},
  "version": 1
}

A reminder for a person who doesn't exist is refused

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "event_id": "evt_01JC000000000000000000000B",
  "reminders": [
    {
      "minutes_before": 30,
      "person_id": "per_01JC000000000000000000000Z"
    }
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    event_id: "evt_01JC000000000000000000000B",
    reminders: [
      {
        minutes_before: 30,
        person_id: "per_01JC000000000000000000000Z",
      },
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "event_id": "evt_01JC000000000000000000000B",
  "reminders": [
    {
      "minutes_before": 30,
      "person_id": "per_01JC000000000000000000000Z"
    }
  ]
}
Response, 404
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0YJ28WACXWFGVFMSV

{
  "error": {
    "code": "person_not_found",
    "message": "That person isn't in the household any more. No changes were applied.",
    "details": {
      "person_id": "per_01JC000000000000000000000Z"
    },
    "recovery": "Read the current state, then send a command that fits it.",
    "request_id": "req_01K9D9S2R0YJ28WACXWFGVFMSV"
  }
}

The event must exist

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "event_id": "evt_01JC000000000000000000000Z",
  "reminders": []
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    event_id: "evt_01JC000000000000000000000Z",
    reminders: [],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.set_reminders HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "event_id": "evt_01JC000000000000000000000Z",
  "reminders": []
}
Response, 404
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0BGFKGMJ3TGV0A4D0

{
  "error": {
    "code": "event_not_found",
    "message": "That event isn't on the calendar any more. No changes were applied.",
    "details": {
      "event_id": "evt_01JC000000000000000000000Z"
    },
    "recovery": "Read the current state, then send a command that fits it.",
    "request_id": "req_01K9D9S2R0BGFKGMJ3TGV0A4D0"
  }
}

Change an event's reminders

Sends the full list; it replaces the current reminders.

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/calendar.event.set_reminders' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01M6V9CSM001W7Z61BPGCQ0HDN' \
  -d '{
  "event_id": "evt_01M6V9CSJ21CBFYER5ACBGBM1N",
  "reminders": [
    {
      "minutes_before": 30
    }
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/calendar.event.set_reminders", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01M6V9CSM001W7Z61BPGCQ0HDN",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    event_id: "evt_01M6V9CSJ21CBFYER5ACBGBM1N",
    reminders: [
      {
        minutes_before: 30,
      },
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/calendar.event.set_reminders HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01M6V9CSM001W7Z61BPGCQ0HDN

{
  "event_id": "evt_01M6V9CSJ21CBFYER5ACBGBM1N",
  "reminders": [
    {
      "minutes_before": 30
    }
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CSM0D86D99KY41CBRP1G

{
  "result": {},
  "version": 100
}

For Rigel#

Rigel's tool for this command is calendar_event_set_reminders. Rigel runs this on its own, then says what it did. The agent guide has the rest.

Rigel is in early access, and sign-up is by invitation. Open Rigel