Skip to main content
POST
/
modify_brx
curl --request POST \
--url https://api.brx.ai/modify_brx \
--header 'Content-Type: application/json' \
--header 'key: <api-key>' \
--data '{
"modifyBrxMode": "CREATE",
"brx": {
"brxId": "brk-12345678-90ab-cdef-1234-567890abcdef",
"brxName": "Example BRK",
"description": "An example BRK for documentation",
"prompt": {
"prompt": {
"main": "This is the main prompt template with {{variable}}"
}
},
"processParams": {
"processType": 0
},
"dependantBrxIds": {
"main_brx_entry_schema": "brk-12345678-90ab-cdef-1234-567890abcdef"
}
},
"schema": {
"schemaFields": {
"variable": {
"fieldValueDataType": "string",
"fieldValue": ""
}
},
"brxName": "Example BRK",
"brxId": "brk-12345678-90ab-cdef-1234-567890abcdef"
}
}'
{
"modifyBrxResponse": {
"httpResponse": {
"isError": false,
"statusMsg": "BRK created successfully",
"brxId": "brk-12345678-90ab-cdef-1234-567890abcdef"
}
}
}

Authorizations

key
string
header
required

Body

application/json

Modification request containing the operation type and relevant parameters

modifyBrxMode
enum<string>
required

The type of modification to perform. CREATE creates a new BRK, UPDATE modifies an existing BRK, DELETE removes a BRK, CLONE creates a copy of an existing BRK, OP performs an operation on a BRK, TAG adds or removes a tag from a BRK, and CALL_ORDER modifies the execution order of BRK dependencies.

Available options:
CREATE,
UPDATE,
DELETE,
CLONE,
OP,
TAG,
CALL_ORDER
Example:

"CREATE"

brxId
string

The ID of the BRK to modify. Required for UPDATE, DELETE, CLONE, OP, TAG, and CALL_ORDER operations. For CREATE operations, a new ID will be generated if not provided.

Example:

"brk-12345678-90ab-cdef-1234-567890abcdef"

brx
object

The complete BRK definition, including prompts, dependencies, and configuration parameters. Required for CREATE and UPDATE operations.

Example:
{
"brxId": "brk-12345678-90ab-cdef-1234-567890abcdef",
"brxName": "Example BRK",
"description": "An example BRK for documentation",
"prompt": {
"prompt": {
"main": "This is the main prompt template with {{variable}}"
}
},
"processParams": { "processType": 0 },
"dependantBrxIds": {
"main_brx_entry_schema": "brk-12345678-90ab-cdef-1234-567890abcdef"
}
}
schema
object

The schema definition for the BRK, including input fields and their types. Required for CREATE and UPDATE operations.

Example:
{
"schemaFields": {
"variable": {
"fieldValueDataType": "string",
"fieldValue": ""
}
},
"brxName": "Example BRK",
"brxId": "brk-12345678-90ab-cdef-1234-567890abcdef"
}
editorJSON
object

Optional editor-specific JSON data for the BRK. This can include layout information, visual settings, and other editor-specific metadata.

Example:
{
"layout": {
"nodes": [
{
"id": "node1",
"position": { "x": 100, "y": 100 }
}
],
"edges": []
}
}
conf
object

Optional configuration parameters for the BRK. This can include execution settings, model parameters, and other configuration options.

Example:
{
"maxTokens": 1000,
"temperature": 0.7,
"topP": 0.9
}
opType
string

The type of operation to perform on the BRK. Required for OP operations.

Example:

"VALIDATE"

tag
string

The tag to add or remove from the BRK. Required for TAG operations.

Example:

"production"

tagOp
enum<string>

The tag operation to perform. PUSH adds a tag, PULL removes a tag. Required for TAG operations.

Available options:
PUSH,
PULL
Example:

"PUSH"

Response

Modification response containing the result of the operation

modifyBrxResponse
object