Skip to main content
POST
Create component.

Authorizations

Authorization
string
header
required

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

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
string
required

Type of component must be one of: CODE_JS,CODE_TS,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.

category
string | null

Optional category appropriate for the selected component type. Pass null to leave it empty.

Maximum string length: 32
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