Undo changes to one occurrence
calendar.event.reset_occurrence
POST/api/v1/households/{household_id}/commands/calendar.event.reset_occurrence
- Command
- Rigel runs it
- Applies offline
Puts one occurrence back as the rule says: removes its cancellation and any changed title, place or time. Nothing happens if it had no changes. Errors: event_not_found, event_owned_by_app, occurrence_not_found (the key has the wrong form for the event).
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. |
occurrence_startstringrequired | Which occurrence, by its original start in the event's zone: 2026-11-14T09:00 for a timed event, 2026-11-14 for an all-day one. Use the occurrence_start that |
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 | occurrence_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 | 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.
Removes a cancellation
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.reset_occurrence' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"event_id": "evt_01JC000000000000000000000A",
"occurrence_start": "2025-11-15T09:00:00"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.reset_occurrence", {
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",
occurrence_start: "2025-11-15T09:00:00",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.reset_occurrence HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"event_id": "evt_01JC000000000000000000000A",
"occurrence_start": "2025-11-15T09:00:00"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0P9EAEJVNSMGESZET
{
"result": {},
"version": 1
}Removes changes to an occurrence
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.reset_occurrence' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"event_id": "evt_01JC000000000000000000000A",
"occurrence_start": "2025-11-15T09:00"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.reset_occurrence", {
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",
occurrence_start: "2025-11-15T09:00",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.reset_occurrence HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"event_id": "evt_01JC000000000000000000000A",
"occurrence_start": "2025-11-15T09:00"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0TA6W9W6YEA0VREZ3
{
"result": {},
"version": 1
}An occurrence with nothing to reset is fine and changes nothing
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.reset_occurrence' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"event_id": "evt_01JC000000000000000000000A",
"occurrence_start": "2025-11-15T09:00:00"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.reset_occurrence", {
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",
occurrence_start: "2025-11-15T09:00:00",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.reset_occurrence HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"event_id": "evt_01JC000000000000000000000A",
"occurrence_start": "2025-11-15T09:00:00"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R09D2J7HB7VX69CPF7
{
"result": {},
"version": 1
}The key must have the event's form
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.reset_occurrence' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"event_id": "evt_01JC000000000000000000000A",
"occurrence_start": "2025-11-15"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.reset_occurrence", {
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",
occurrence_start: "2025-11-15",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.reset_occurrence HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"event_id": "evt_01JC000000000000000000000A",
"occurrence_start": "2025-11-15"
}HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R05KCKXY9X15N22404
{
"error": {
"code": "occurrence_not_found",
"message": "This event has a start time, so name the occurrence by its date and time, such as 2026-11-14T09:00. No changes were applied.",
"details": {
"occurrence_start": "2025-11-15"
},
"recovery": "Read the current state, then send a command that fits it.",
"request_id": "req_01K9D9S2R05KCKXY9X15N22404"
}
}An event another app owns is refused
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.reset_occurrence' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"event_id": "evt_01JC000000000000000000000D",
"occurrence_start": "2025-11-20T09:00"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.reset_occurrence", {
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",
occurrence_start: "2025-11-20T09:00",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.reset_occurrence HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"event_id": "evt_01JC000000000000000000000D",
"occurrence_start": "2025-11-20T09:00"
}HTTP/1.1 409 Conflict
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0VGD0SDJD7KQ0CXRS
{
"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_01K9D9S2R0VGD0SDJD7KQ0CXRS"
}
}The event must exist
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.reset_occurrence' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"event_id": "evt_01JC000000000000000000000Z",
"occurrence_start": "2025-11-15T09:00:00"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.reset_occurrence", {
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",
occurrence_start: "2025-11-15T09:00:00",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/calendar.event.reset_occurrence HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"event_id": "evt_01JC000000000000000000000Z",
"occurrence_start": "2025-11-15T09:00:00"
}HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R03GZATBG7VKFJ838G
{
"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_01K9D9S2R03GZATBG7VKFJ838G"
}
}Put one occurrence back as the rule says
curl -X POST 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/calendar.event.reset_occurrence' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01M6V9CSK70H0TCAAX00Q3Q7YS' \
-d '{
"event_id": "evt_01M6V9CSHPG77MMGGKHAEJQ484",
"occurrence_start": "2026-11-17T17:00"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/calendar.event.reset_occurrence", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01M6V9CSK70H0TCAAX00Q3Q7YS",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
event_id: "evt_01M6V9CSHPG77MMGGKHAEJQ484",
occurrence_start: "2026-11-17T17:00",
}),
});
const data = await response.json();POST /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/calendar.event.reset_occurrence HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01M6V9CSK70H0TCAAX00Q3Q7YS
{
"event_id": "evt_01M6V9CSHPG77MMGGKHAEJQ484",
"occurrence_start": "2026-11-17T17:00"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CSK7P3P48A2EC1B33ZT7
{
"result": {},
"version": 96
}For Rigel#
Rigel's tool for this command is calendar_event_reset_occurrence. Rigel runs this on its own, then says what it did. The agent guide has the rest.