---
title: "openre.key-rotate-result@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/openre.key-rotate-result"
updated: null
---

# openre.key-rotate-result@1 · OpenVibe.Services

HTML: [openre.key-rotate-result@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/openre.key-rotate-result)

# OpenreKeyRotateResult `openre.key-rotate-result@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.0.0
- Owner: openre
- Visibility: first-party
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/openre/key-rotate-result.v1.json`](/docs/contracts/openre.key-rotate-result.json)

openre.key-rotate-result@1: the answer of POST /api/v1/streams/:id/keys/rotate on OpenRestream: the new key (shown once, Cache-Control no-store), the keys it retired (grace or revoked), when the grace ends, how many sessions were asked to end, and the ingest endpoints. openre.key.rotated is announced.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `key` | object | yes |  |  |
| `key.id` | string | yes |  |  |
| `key.key` | string | yes | The plain ingest key: only in this answer. |  |
| `key.hint` | string | yes |  |  |
| `key.shown_once` | const | yes |  | - `= true` |
| `retired` | array of object | yes |  |  |
| `retired[].id` | string | yes |  |  |
| `retired[].hint` | string |  |  |  |
| `retired[].status` | enum | yes |  | - `one of "grace", "revoked"` |
| `grace_until` | string \| null | yes |  | - `format date-time` |
| `sessions_ending` | integer | yes |  | - `minimum 0` |
| `ingest` | object | yes | Where an encoder publishes (never the key). |  |
| `ingest.rtmp` | object |  |  |  |
| `ingest.rtmp.url` | string | yes |  |  |
| `ingest.rtmp.key_hint` | string \| null |  |  |  |
| `ingest.rtmp.key_id` | string \| null |  |  |  |

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: grace

~~~~
{
  "key": {
    "id": "key_01JAB2C3D4E5F6G7H8J9K0MNPS",
    "key": "ovk_live_Zp41mm80",
    "hint": "mm80",
    "shown_once": true
  },
  "retired": [
    {
      "id": "key_01JAB2C3D4E5F6G7H8J9K0MNPR",
      "hint": "x9Q2",
      "status": "grace"
    }
  ],
  "grace_until": "2026-09-25T19:00:00.000Z",
  "sessions_ending": 0,
  "ingest": {
    "rtmp": {
      "url": "rtmp://ingest.openre.stream/live",
      "key_hint": "mm80",
      "key_id": "key_01JAB2C3D4E5F6G7H8J9K0MNPS"
    }
  }
}
~~~~

Rejected: not-shown-once

~~~~
{
  "key": {
    "id": "key_1",
    "key": "x",
    "hint": "x",
    "shown_once": false
  },
  "retired": [],
  "grace_until": null,
  "sessions_ending": 0,
  "ingest": {}
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('openre.key-rotate-result@1', value);   // { valid, errors: [{ path, message }] }
~~~~
