Inspector
Enqueue Message
Enqueue a message through the inspector.
The inspector API powers the Rivet dashboard and is subject to change without notice. Do not build production integrations on it.
POST https://api.rivet.dev/gateway/{actor}/inspector/queue
Examples
curl -X POST "https://api.rivet.dev/gateway/$ACTOR_ID/inspector/queue" \
-H "Authorization: Bearer $INSPECTOR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "increment",
"body": {
"amount": 1
}
}'
const endpoint = "https://api.rivet.dev";
const response = await fetch(
`${endpoint}/gateway/${process.env.ACTOR_ID}/inspector/queue`,
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.INSPECTOR_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "increment", body: { amount: 1 } }),
},
);
console.log(await response.json());
export {};
Authentication
Inspector endpoints do not accept namespace tokens. Send the actor’s inspector token as a bearer token in the Authorization header. Each actor generates its own inspector token on first start and stores it in its KV storage under the single byte 0x03. Read it through the control plane with GET /actors/{actor_id}/kv/keys/Aw==?namespace={namespace} using a namespace token; the response value is the token, base64-encoded. The dashboard does this for you.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
actor | string | Yes | Actor ID, actor ID with an inline token ({actor_id}@{token}), or actor name combined with the rvt-* query parameters. |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | No | Bearer token for inspector authentication. Required in production, optional in development. |
Request Body
Content type: application/json.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Queue message name. |
body | any | No | Message payload. Any JSON value. |
Responses
200
Metadata for the enqueued message.
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
createdAtMs | integer |
{
"id": "<id>",
"name": "my-actor",
"createdAtMs": 0
}
401
The inspector token is missing or invalid.