Skip to main content
POST
Create component.

Authorizations

Authorization
string
header
required

Bearer JWT token or API Key (sk-*).

Headers

x-revo-operation-id
string<uuid>

Operation identity; this header alone keeps the existing classic write flow and does not select Studio. Bound Studio retries reuse it only for identical input. An operation previously staged by the legacy implicit Studio flow must be retried with its explicit session binding.

x-revo-studio-session-id
string<uuid>

Explicitly select an existing editable Studio workspace. This session header alone selects Studio staging when Studio Preview is enabled. A bound write fails closed when Preview is disabled; omitting this header keeps the classic write flow.

x-revo-base-version
integer

Observed component version for an action without a version field. Conflicts never overwrite source.

Required range: x >= 0

Body

application/json
name
string
required

Display name. For CODE_JS_LIB and CODE_TS_LIB, it must be a JavaScript identifier (letters/underscore first, then letters/digits/underscore). At most one active, non-deleted library of either type may have this name; inspect existing active libraries before creating an active one. Inactive libraries may share a name.

Required string length: 1 - 60
type
enum<string>
required

Type of component must be one of: CODE_JS,CODE_TS,CODE_JS_TEST,CODE_TS_TEST,CODE_JS_LIB,CODE_TS_LIB,JSON_VALIDATOR,CUSTOM_NODEJS.

Available options:
CODE_JS,
CODE_TS,
CODE_JS_TEST,
CODE_TS_TEST,
CODE_JS_LIB,
CODE_TS_LIB,
JSON_VALIDATOR,
CUSTOM_NODEJS
active
boolean
required

Activate upon creation. If type is CODE_JS_LIB or CODE_TS_LIB and active is true, no other active, non-deleted library of either library type may have the same name.

testConfig
object | null

Native test configuration. Only CODE_JS_TEST and CODE_TS_TEST accept it.

category
string | null

Optional category using only ASCII letters, digits and underscores. Pass null to leave it empty.

Maximum string length: 32
Pattern: ^[a-zA-Z0-9_]*$
desc
string | null

Optional component description. Pass null to leave it empty.

metadata
object | null

Optional resource metadata. Values may use any JSON type. Maximum 16 KiB and 64 top-level keys. Top-level keys starting with "__" are reserved for backend use.

async
boolean | null

For CUSTOM_NODEJS, wait for deployment. Omit or pass null to use the default behavior.

elements
object[] | null

Initial component elements. Server ignores/regenerates componentElementId values on create. Omit or pass null to create the default starter content. CODE_JS_LIB and CODE_TS_LIB always include a permanent @default element, even with explicit elements; an automatically added @default contains documentation only and exposes no members.

Response

Created.

Last modified on September 5, 2026