Skip to main content
POST
create a variable

Authorizations

Authorization
string
header
required

your rumik api key, e.g. rk_live_.... create one in the rumik dashboard.

Body

application/json

POST /agents/variables: the same shape, nothing optional about it.

name
string
required

^[A-Za-z][A-Za-z0-9_]*$, up to 64 characters, unique on the account (case-insensitive). used as {name} in prompts.

Maximum string length: 64
defaultValue
string
default:""

the value when no tool supplies one (up to 2000 characters). blank by default.

Maximum string length: 2000
toolId
string<uuid> | null

a before_call tool that fills this variable at the start of every call.

toolOutput
string | null

which of that tool's outputs to take (its bare name). omit for a tool with one output, or one named like the variable.

Maximum string length: 65

Response

created.

an account-wide {name} prompt variable.

id
string<uuid>
required

the variable's id.

name
string
required

the {name} prompts use.

defaultValue
string
required

the fallback value.

toolId
string<uuid> | null
required

the before-call tool feeding it, or null.

toolOutput
string | null
required

the output taken from that tool, or null.

createdAt
string<date-time>
required
updatedAt
string<date-time>
required