Skip to content
Rigel docs
Open Rigel

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#

Undo changes to one occurrence: 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.

Undo changes to one occurrence: request body fields
FieldDescription
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 calendar.occurrence.list gave.

Response#

200 The command was applied.

Undo changes to one occurrence: 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.

Undo changes to one occurrence: 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.
404occurrence_not_found
  • The key has the wrong form for the event.
  • The key must have the event's form.
404not_foundThe household doesn't exist, or you aren't a member of it.
409event_owned_by_appAn event another app owns is refused.
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.

Removes a cancellation

Request, curl
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"
}'
Request, TypeScript
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();
Request, HTTP
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"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0P9EAEJVNSMGESZET

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

Removes changes to an occurrence

Request, curl
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"
}'
Request, TypeScript
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();
Request, HTTP
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"
}
Response, 200
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

Request, curl
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"
}'
Request, TypeScript
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();
Request, HTTP
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"
}
Response, 200
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

Request, curl
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"
}'
Request, TypeScript
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();
Request, HTTP
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"
}
Response, 404
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

Request, curl
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"
}'
Request, TypeScript
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();
Request, HTTP
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"
}
Response, 409
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

Request, curl
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"
}'
Request, TypeScript
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();
Request, HTTP
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"
}
Response, 404
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

Request, curl
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"
}'
Request, TypeScript
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();
Request, HTTP
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"
}
Response, 200
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.

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