Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/api/content/actor-keys.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ Escaping is what makes array keys safe to build from user data. `["org", "a/b"]`

## Keys on gateway URLs

The gateway takes the key as the `rvt-key` query parameter and splits it on commas instead of slashes: `rvt-key=org-1,room-2` is `["org-1", "room-2"]`. There is no escape syntax, so a part that contains a comma cannot be expressed on a gateway URL. Create such actors through the control plane and route to them by actor ID. See [Actor Routing](/docs/api/actor-routing).
The gateway takes the key as one or more `rvt-key-part` query parameters, one occurrence per part: `rvt-key-part=org-1&rvt-key-part=room-2` is `["org-1", "room-2"]`. Each occurrence is a complete, independently percent-encoded part, so a part containing a comma, slash, or any other character is expressed exactly as given, with no escaping needed.

The gateway also accepts the legacy `rvt-key` parameter, which splits a single value on commas: `rvt-key=org-1,room-2` is `["org-1", "room-2"]`. This form cannot express a part that contains a comma, since it becomes indistinguishable from two separate parts. It is kept only for older clients; new clients should always send `rvt-key-part`. See [Actor Routing](/docs/api/actor-routing).

## Related

Expand Down
9 changes: 5 additions & 4 deletions docs/api/content/actor-routing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Actor IDs come from the response of [Create Actor](/docs/api/actors/create), [Ge
Put the actor name in the path and describe the lookup with `rvt-*` query parameters. Rivet resolves the actor, creates it if asked, waits for it to be ready, and forwards the request.

```bash
curl "https://api.rivet.dev/gateway/counter/action/increment?rvt-namespace=$RIVET_NAMESPACE&rvt-method=getOrCreate&rvt-key=my-counter&rvt-pool=default" \
curl "https://api.rivet.dev/gateway/counter/action/increment?rvt-namespace=$RIVET_NAMESPACE&rvt-method=getOrCreate&rvt-key-part=my-counter&rvt-pool=default" \
-H "x-rivet-token: $RIVET_TOKEN" \
-H "Content-Type: application/json" \
-d '{"args": [1]}'
Expand All @@ -44,7 +44,8 @@ This is what the RivetKit client does for `client.counter.getOrCreate(["my-count
| --- | --- | --- |
| `rvt-namespace` | Yes | Namespace the actor lives in. |
| `rvt-method` | Yes | `get` to fail if the actor does not exist, or `getOrCreate` to create it on first use. |
| `rvt-key` | No | Actor key. Separate multi-part keys with commas: `rvt-key=org-1,room-2`. Omit for a keyless actor. |
| `rvt-key-part` | No | One key part. Repeat for a multi-part key, in order: `rvt-key-part=org-1&rvt-key-part=room-2`. Omit entirely for a keyless actor. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Medium · The canonical API reference omits the new query parameter

The generated gateway reference still comes from rivetkit-openapi/openapi.json plus docs/api/endpoints.json, and both sources still define only rvt-key; consequently every generated gateway/inspector page continues to expose the comma-separated form and generated clients/spec consumers cannot discover rvt-key-part. Add the repeated array-style query parameter and its shared description/examples to those source files, then regenerate the API reference as required by docs/CLAUDE.md.

| `rvt-key` | No | Legacy single-parameter key encoding. Separate multi-part keys with commas: `rvt-key=org-1,room-2`. Prefer `rvt-key-part`; this form cannot express a part that contains a comma. |
| `rvt-pool` | For `getOrCreate` | Pool to create the actor on. RivetKit registers the `default` pool unless configured otherwise. `rvt-runner` is a deprecated alias. |
| `rvt-input` | No | Base64url-encoded CBOR passed to `createState` and `onCreate` if the actor is created. Only with `getOrCreate`. |
| `rvt-region` | No | Preferred region if the actor is created. Only with `getOrCreate`. |
Expand All @@ -54,8 +55,8 @@ This is what the RivetKit client does for `client.counter.getOrCreate(["my-count

### Rules

- Every `rvt-*` parameter is reserved. Unknown or duplicated `rvt-*` parameters return a `400`.
- Every `rvt-*` parameter is reserved. Unknown `rvt-*` parameters return a `400`, as does a duplicated `rvt-*` parameter other than `rvt-key-part`, which is expected to repeat once per key part.
- `rvt-*` parameters are stripped before the request reaches your actor. Other query parameters pass through unchanged, so `/gateway/counter/request/search?q=hi&rvt-namespace=...` reaches `onRequest` as `/search?q=hi`.
- `rvt-method=get` never creates an actor. Passing `rvt-input`, `rvt-region`, `rvt-crash-policy`, or `rvt-runner` with `get` returns a `400`.
- The `@{token}` path syntax is not allowed with actor names. Use `rvt-token` or the header instead.
- Commas inside a key part cannot be expressed in `rvt-key`. Create such actors with [Create Actor](/docs/api/actors/create) and route to them by ID. See [Actor Keys](/docs/api/actor-keys) for how the control plane encodes keys.
- If both `rvt-key-part` and `rvt-key` are present, `rvt-key-part` wins. Use `rvt-key-part` for any key part that might contain a comma; see [Actor Keys](/docs/api/actor-keys) for how the control plane encodes keys.
3 changes: 2 additions & 1 deletion docs/api/content/gateway/call-action.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ Send a token in the `x-rivet-token` header, inline in the path as `{actor_id}@{t
| --- | --- | --- | --- |
| `rvt-namespace` | `string` | No | Namespace the actor lives in. Required when `{actor}` is an actor name. |
| `rvt-method` | `string` | No | How to resolve an actor name to an actor. `getOrCreate` requires `rvt-pool`. One of `"get"`, `"getOrCreate"`. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. Deprecated in favor of `rvt-key-part`, which unambiguously represents a component containing a literal comma. |
| `rvt-key-part` | `string[]` | No | Actor key component. Repeat this parameter once per key component instead of comma-joining them into `rvt-key`. Takes precedence over `rvt-key` when both are present. |
| `rvt-pool` | `string` | No | Pool to create the actor on when `rvt-method=getOrCreate`. RivetKit registers the `default` pool unless configured otherwise. |
| `rvt-runner` | `string` | No | Deprecated alias for `rvt-pool`. |
| `rvt-input` | `string` | No | Base64url-encoded CBOR input passed to `createState` and `onCreate` when `rvt-method=getOrCreate` creates the actor. |
Expand Down
3 changes: 2 additions & 1 deletion docs/api/content/gateway/health.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ Send a token in the `x-rivet-token` header, inline in the path as `{actor_id}@{t
| --- | --- | --- | --- |
| `rvt-namespace` | `string` | No | Namespace the actor lives in. Required when `{actor}` is an actor name. |
| `rvt-method` | `string` | No | How to resolve an actor name to an actor. `getOrCreate` requires `rvt-pool`. One of `"get"`, `"getOrCreate"`. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. Deprecated in favor of `rvt-key-part`, which unambiguously represents a component containing a literal comma. |
| `rvt-key-part` | `string[]` | No | Actor key component. Repeat this parameter once per key component instead of comma-joining them into `rvt-key`. Takes precedence over `rvt-key` when both are present. |
| `rvt-pool` | `string` | No | Pool to create the actor on when `rvt-method=getOrCreate`. RivetKit registers the `default` pool unless configured otherwise. |
| `rvt-runner` | `string` | No | Deprecated alias for `rvt-pool`. |
| `rvt-input` | `string` | No | Base64url-encoded CBOR input passed to `createState` and `onCreate` when `rvt-method=getOrCreate` creates the actor. |
Expand Down
3 changes: 2 additions & 1 deletion docs/api/content/gateway/metadata.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ Send a token in the `x-rivet-token` header, inline in the path as `{actor_id}@{t
| --- | --- | --- | --- |
| `rvt-namespace` | `string` | No | Namespace the actor lives in. Required when `{actor}` is an actor name. |
| `rvt-method` | `string` | No | How to resolve an actor name to an actor. `getOrCreate` requires `rvt-pool`. One of `"get"`, `"getOrCreate"`. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. Deprecated in favor of `rvt-key-part`, which unambiguously represents a component containing a literal comma. |
| `rvt-key-part` | `string[]` | No | Actor key component. Repeat this parameter once per key component instead of comma-joining them into `rvt-key`. Takes precedence over `rvt-key` when both are present. |
| `rvt-pool` | `string` | No | Pool to create the actor on when `rvt-method=getOrCreate`. RivetKit registers the `default` pool unless configured otherwise. |
| `rvt-runner` | `string` | No | Deprecated alias for `rvt-pool`. |
| `rvt-input` | `string` | No | Base64url-encoded CBOR input passed to `createState` and `onCreate` when `rvt-method=getOrCreate` creates the actor. |
Expand Down
3 changes: 2 additions & 1 deletion docs/api/content/gateway/queue.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ Send a token in the `x-rivet-token` header, inline in the path as `{actor_id}@{t
| --- | --- | --- | --- |
| `rvt-namespace` | `string` | No | Namespace the actor lives in. Required when `{actor}` is an actor name. |
| `rvt-method` | `string` | No | How to resolve an actor name to an actor. `getOrCreate` requires `rvt-pool`. One of `"get"`, `"getOrCreate"`. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. Deprecated in favor of `rvt-key-part`, which unambiguously represents a component containing a literal comma. |
| `rvt-key-part` | `string[]` | No | Actor key component. Repeat this parameter once per key component instead of comma-joining them into `rvt-key`. Takes precedence over `rvt-key` when both are present. |
| `rvt-pool` | `string` | No | Pool to create the actor on when `rvt-method=getOrCreate`. RivetKit registers the `default` pool unless configured otherwise. |
| `rvt-runner` | `string` | No | Deprecated alias for `rvt-pool`. |
| `rvt-input` | `string` | No | Base64url-encoded CBOR input passed to `createState` and `onCreate` when `rvt-method=getOrCreate` creates the actor. |
Expand Down
3 changes: 2 additions & 1 deletion docs/api/content/gateway/request.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ Send a token in the `x-rivet-token` header, inline in the path as `{actor_id}@{t
| --- | --- | --- | --- |
| `rvt-namespace` | `string` | No | Namespace the actor lives in. Required when `{actor}` is an actor name. |
| `rvt-method` | `string` | No | How to resolve an actor name to an actor. `getOrCreate` requires `rvt-pool`. One of `"get"`, `"getOrCreate"`. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. Deprecated in favor of `rvt-key-part`, which unambiguously represents a component containing a literal comma. |
| `rvt-key-part` | `string[]` | No | Actor key component. Repeat this parameter once per key component instead of comma-joining them into `rvt-key`. Takes precedence over `rvt-key` when both are present. |
| `rvt-pool` | `string` | No | Pool to create the actor on when `rvt-method=getOrCreate`. RivetKit registers the `default` pool unless configured otherwise. |
| `rvt-runner` | `string` | No | Deprecated alias for `rvt-pool`. |
| `rvt-input` | `string` | No | Base64url-encoded CBOR input passed to `createState` and `onCreate` when `rvt-method=getOrCreate` creates the actor. |
Expand Down
3 changes: 2 additions & 1 deletion docs/api/content/inspector/action.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ Inspector endpoints do not accept namespace tokens. Send the actor's inspector t
| --- | --- | --- | --- |
| `rvt-namespace` | `string` | No | Namespace the actor lives in. Required when `{actor}` is an actor name. |
| `rvt-method` | `string` | No | How to resolve an actor name to an actor. `getOrCreate` requires `rvt-pool`. One of `"get"`, `"getOrCreate"`. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. Deprecated in favor of `rvt-key-part`, which unambiguously represents a component containing a literal comma. |
| `rvt-key-part` | `string[]` | No | Actor key component. Repeat this parameter once per key component instead of comma-joining them into `rvt-key`. Takes precedence over `rvt-key` when both are present. |
| `rvt-pool` | `string` | No | Pool to create the actor on when `rvt-method=getOrCreate`. RivetKit registers the `default` pool unless configured otherwise. |
| `rvt-runner` | `string` | No | Deprecated alias for `rvt-pool`. |
| `rvt-input` | `string` | No | Base64url-encoded CBOR input passed to `createState` and `onCreate` when `rvt-method=getOrCreate` creates the actor. |
Expand Down
3 changes: 2 additions & 1 deletion docs/api/content/inspector/connections.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ Inspector endpoints do not accept namespace tokens. Send the actor's inspector t
| --- | --- | --- | --- |
| `rvt-namespace` | `string` | No | Namespace the actor lives in. Required when `{actor}` is an actor name. |
| `rvt-method` | `string` | No | How to resolve an actor name to an actor. `getOrCreate` requires `rvt-pool`. One of `"get"`, `"getOrCreate"`. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. Deprecated in favor of `rvt-key-part`, which unambiguously represents a component containing a literal comma. |
| `rvt-key-part` | `string[]` | No | Actor key component. Repeat this parameter once per key component instead of comma-joining them into `rvt-key`. Takes precedence over `rvt-key` when both are present. |
| `rvt-pool` | `string` | No | Pool to create the actor on when `rvt-method=getOrCreate`. RivetKit registers the `default` pool unless configured otherwise. |
| `rvt-runner` | `string` | No | Deprecated alias for `rvt-pool`. |
| `rvt-input` | `string` | No | Base64url-encoded CBOR input passed to `createState` and `onCreate` when `rvt-method=getOrCreate` creates the actor. |
Expand Down
3 changes: 2 additions & 1 deletion docs/api/content/inspector/queue-get.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ Inspector endpoints do not accept namespace tokens. Send the actor's inspector t
| --- | --- | --- | --- |
| `rvt-namespace` | `string` | No | Namespace the actor lives in. Required when `{actor}` is an actor name. |
| `rvt-method` | `string` | No | How to resolve an actor name to an actor. `getOrCreate` requires `rvt-pool`. One of `"get"`, `"getOrCreate"`. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. Deprecated in favor of `rvt-key-part`, which unambiguously represents a component containing a literal comma. |
| `rvt-key-part` | `string[]` | No | Actor key component. Repeat this parameter once per key component instead of comma-joining them into `rvt-key`. Takes precedence over `rvt-key` when both are present. |
| `rvt-pool` | `string` | No | Pool to create the actor on when `rvt-method=getOrCreate`. RivetKit registers the `default` pool unless configured otherwise. |
| `rvt-runner` | `string` | No | Deprecated alias for `rvt-pool`. |
| `rvt-input` | `string` | No | Base64url-encoded CBOR input passed to `createState` and `onCreate` when `rvt-method=getOrCreate` creates the actor. |
Expand Down
3 changes: 2 additions & 1 deletion docs/api/content/inspector/rpcs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ Inspector endpoints do not accept namespace tokens. Send the actor's inspector t
| --- | --- | --- | --- |
| `rvt-namespace` | `string` | No | Namespace the actor lives in. Required when `{actor}` is an actor name. |
| `rvt-method` | `string` | No | How to resolve an actor name to an actor. `getOrCreate` requires `rvt-pool`. One of `"get"`, `"getOrCreate"`. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. Deprecated in favor of `rvt-key-part`, which unambiguously represents a component containing a literal comma. |
| `rvt-key-part` | `string[]` | No | Actor key component. Repeat this parameter once per key component instead of comma-joining them into `rvt-key`. Takes precedence over `rvt-key` when both are present. |
| `rvt-pool` | `string` | No | Pool to create the actor on when `rvt-method=getOrCreate`. RivetKit registers the `default` pool unless configured otherwise. |
| `rvt-runner` | `string` | No | Deprecated alias for `rvt-pool`. |
| `rvt-input` | `string` | No | Base64url-encoded CBOR input passed to `createState` and `onCreate` when `rvt-method=getOrCreate` creates the actor. |
Expand Down
3 changes: 2 additions & 1 deletion docs/api/content/inspector/state-get.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ Inspector endpoints do not accept namespace tokens. Send the actor's inspector t
| --- | --- | --- | --- |
| `rvt-namespace` | `string` | No | Namespace the actor lives in. Required when `{actor}` is an actor name. |
| `rvt-method` | `string` | No | How to resolve an actor name to an actor. `getOrCreate` requires `rvt-pool`. One of `"get"`, `"getOrCreate"`. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. Deprecated in favor of `rvt-key-part`, which unambiguously represents a component containing a literal comma. |
| `rvt-key-part` | `string[]` | No | Actor key component. Repeat this parameter once per key component instead of comma-joining them into `rvt-key`. Takes precedence over `rvt-key` when both are present. |
| `rvt-pool` | `string` | No | Pool to create the actor on when `rvt-method=getOrCreate`. RivetKit registers the `default` pool unless configured otherwise. |
| `rvt-runner` | `string` | No | Deprecated alias for `rvt-pool`. |
| `rvt-input` | `string` | No | Base64url-encoded CBOR input passed to `createState` and `onCreate` when `rvt-method=getOrCreate` creates the actor. |
Expand Down
3 changes: 2 additions & 1 deletion docs/api/content/inspector/state-patch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ Inspector endpoints do not accept namespace tokens. Send the actor's inspector t
| --- | --- | --- | --- |
| `rvt-namespace` | `string` | No | Namespace the actor lives in. Required when `{actor}` is an actor name. |
| `rvt-method` | `string` | No | How to resolve an actor name to an actor. `getOrCreate` requires `rvt-pool`. One of `"get"`, `"getOrCreate"`. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. Deprecated in favor of `rvt-key-part`, which unambiguously represents a component containing a literal comma. |
| `rvt-key-part` | `string[]` | No | Actor key component. Repeat this parameter once per key component instead of comma-joining them into `rvt-key`. Takes precedence over `rvt-key` when both are present. |
| `rvt-pool` | `string` | No | Pool to create the actor on when `rvt-method=getOrCreate`. RivetKit registers the `default` pool unless configured otherwise. |
| `rvt-runner` | `string` | No | Deprecated alias for `rvt-pool`. |
| `rvt-input` | `string` | No | Base64url-encoded CBOR input passed to `createState` and `onCreate` when `rvt-method=getOrCreate` creates the actor. |
Expand Down
3 changes: 2 additions & 1 deletion docs/api/content/inspector/summary.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ Inspector endpoints do not accept namespace tokens. Send the actor's inspector t
| --- | --- | --- | --- |
| `rvt-namespace` | `string` | No | Namespace the actor lives in. Required when `{actor}` is an actor name. |
| `rvt-method` | `string` | No | How to resolve an actor name to an actor. `getOrCreate` requires `rvt-pool`. One of `"get"`, `"getOrCreate"`. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. |
| `rvt-key` | `string` | No | Actor key. Separate multi-part keys with commas. Deprecated in favor of `rvt-key-part`, which unambiguously represents a component containing a literal comma. |
| `rvt-key-part` | `string[]` | No | Actor key component. Repeat this parameter once per key component instead of comma-joining them into `rvt-key`. Takes precedence over `rvt-key` when both are present. |
| `rvt-pool` | `string` | No | Pool to create the actor on when `rvt-method=getOrCreate`. RivetKit registers the `default` pool unless configured otherwise. |
| `rvt-runner` | `string` | No | Deprecated alias for `rvt-pool`. |
| `rvt-input` | `string` | No | Base64url-encoded CBOR input passed to `createState` and `onCreate` when `rvt-method=getOrCreate` creates the actor. |
Expand Down
Loading