Stop a repeating event after a date
calendar.event.end_recurrence
POST/api/v1/households/{household_id}/commands/calendar.event.end_recurrence
- Command
- Rigel runs it
- Applies offline
Ends the repeat after last_date (inclusive, in the event's zone): 'swim is done after March' is last_date 2027-03-28. Changed and extra occurrences after that date are dropped. Errors: event_not_found, event_owned_by_app, not_recurring, invalid_last_date (before the event starts).
Parameters#
| Field | Description |
|---|---|
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.
| Field | Description |
|---|---|
event_idstringrequired | A calendar event ID, such as evt_01JC0000000000000000000000. |
last_datestringrequired | The last day it happens, YYYY-MM-DD. |
Response#
200 The command was applied.
| Field | Description |
|---|---|
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.
| Status | Code | When |
|---|---|---|
400 | validation_failed | A field is missing, misspelled or out of range. details.fields lists each problem. |
401 | unauthenticated | The request has no valid session. |
404 | event_not_found |
|
404 | not_found | The household doesn't exist, or you aren't a member of it. |
409 | event_owned_by_app | An event another app owns is refused. |
409 | not_recurring | A single event has nothing to end. |
409 | invalid_last_date |
|
409 | idempotency_key_reused | The 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.
Ends the repeat after a date and drops later changes and extra dates
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.end_recurrence' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"event_id": "evt_01JC000000000000000000000A",
"last_date": "2025-11-29"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.end_recurrence", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
event_id: "evt_01JC000000000000000000000A",
last_date: "2025-11-29",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.end_recurrence HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"event_id": "evt_01JC000000000000000000000A",
"last_date": "2025-11-29"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R00PS8D6BP2DX8XJFB
{
"result": {},
"version": 1
}A rule that already ends sooner keeps its end
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.end_recurrence' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"event_id": "evt_01JC000000000000000000000A",
"last_date": "2026-03-28"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.end_recurrence", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
event_id: "evt_01JC000000000000000000000A",
last_date: "2026-03-28",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.end_recurrence HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"event_id": "evt_01JC000000000000000000000A",
"last_date": "2026-03-28"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0QGVWJTWAWW6BYF6S
{
"result": {},
"version": 1
}The last date can be the first day
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.end_recurrence' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"event_id": "evt_01JC000000000000000000000A",
"last_date": "2025-11-08"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.end_recurrence", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
event_id: "evt_01JC000000000000000000000A",
last_date: "2025-11-08",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.end_recurrence HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"event_id": "evt_01JC000000000000000000000A",
"last_date": "2025-11-08"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0EWTHX9Y2MHE089ZG
{
"result": {},
"version": 1
}A last date before the start is refused
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.end_recurrence' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"event_id": "evt_01JC000000000000000000000A",
"last_date": "2025-11-07"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.end_recurrence", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
event_id: "evt_01JC000000000000000000000A",
last_date: "2025-11-07",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.end_recurrence HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"event_id": "evt_01JC000000000000000000000A",
"last_date": "2025-11-07"
}HTTP/1.1 409 Conflict
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0MYN6ER938PRH1H23
{
"error": {
"code": "invalid_last_date",
"message": "The last date can't be before the event starts. No changes were applied.",
"details": {
"last_date": "2025-11-07"
},
"recovery": "Read the current state, then send a command that fits it.",
"request_id": "req_01K9D9S2R0MYN6ER938PRH1H23"
}
}A single event has nothing to end
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.end_recurrence' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"event_id": "evt_01JC000000000000000000000B",
"last_date": "2025-12-01"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.end_recurrence", {
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",
last_date: "2025-12-01",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.end_recurrence HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"event_id": "evt_01JC000000000000000000000B",
"last_date": "2025-12-01"
}HTTP/1.1 409 Conflict
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0MMJNPZ1H6VGZGKDJ
{
"error": {
"code": "not_recurring",
"message": "That event doesn't repeat, so there's nothing to end. No changes were applied.",
"details": {},
"recovery": "Read the current state, then send a command that fits it.",
"request_id": "req_01K9D9S2R0MMJNPZ1H6VGZGKDJ"
}
}An event another app owns is refused
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.end_recurrence' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"event_id": "evt_01JC000000000000000000000D",
"last_date": "2025-12-01"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.end_recurrence", {
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",
last_date: "2025-12-01",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.end_recurrence HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"event_id": "evt_01JC000000000000000000000D",
"last_date": "2025-12-01"
}HTTP/1.1 409 Conflict
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0MAY2W3DQNVAC54BW
{
"error": {
"code": "event_owned_by_app",
"message": "Maintenance manages this event. Change it there. No changes were applied.",
"details": {
"app": "maintenance"
},
"recovery": "Read the current state, then send a command that fits it.",
"request_id": "req_01K9D9S2R0MAY2W3DQNVAC54BW"
}
}The event must exist
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.end_recurrence' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"event_id": "evt_01JC000000000000000000000Z",
"last_date": "2025-12-01"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.end_recurrence", {
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",
last_date: "2025-12-01",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.end_recurrence HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"event_id": "evt_01JC000000000000000000000Z",
"last_date": "2025-12-01"
}HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R03WC61MJTK6A504ZH
{
"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_01K9D9S2R03WC61MJTK6A504ZH"
}
}End a repeating event
The season ends after last_date, which is inclusive.
curl -X POST 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/calendar.event.end_recurrence' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01M6V9CSKNYGKBCYYJ5T8S5P7K' \
-d '{
"event_id": "evt_01M6V9CSHPG77MMGGKHAEJQ484",
"last_date": "2026-12-28"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/calendar.event.end_recurrence", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01M6V9CSKNYGKBCYYJ5T8S5P7K",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
event_id: "evt_01M6V9CSHPG77MMGGKHAEJQ484",
last_date: "2026-12-28",
}),
});
const data = await response.json();POST /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/calendar.event.end_recurrence HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01M6V9CSKNYGKBCYYJ5T8S5P7K
{
"event_id": "evt_01M6V9CSHPG77MMGGKHAEJQ484",
"last_date": "2026-12-28"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CSKN7TEZ52BW89FP75GN
{
"result": {},
"version": 98
}For Rigel#
Rigel's tool for this command is calendar_event_end_recurrence. Rigel runs this on its own, then says what it did. The agent guide has the rest.