Replace all component elements.
Replaces the complete element set for the selected component. This is not an upsert/patch endpoint: any element omitted from the request is removed from the component. Prefer POST /component//patch for single-element updates.
Roles: COMPONENT_WRITE, COMPONENT_ADMIN
User access: Yes.
Service account access: Yes.
curl --request POST \
--url https://api.revoengine.com/api/v1/component/{componentId}/save \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-revo-mutation-review: <x-revo-mutation-review>' \
--data '
[
{
"key": "<string>",
"details": "<string>",
"order": 123,
"componentElementId": "<string>",
"desc": "<string>",
"metadata": {},
"hidden": true
}
]
'const options = {
method: 'POST',
headers: {
'x-revo-mutation-review': '<x-revo-mutation-review>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify([
{
key: '<string>',
details: '<string>',
order: 123,
componentElementId: '<string>',
desc: '<string>',
metadata: {},
hidden: true
}
])
};
fetch('https://api.revoengine.com/api/v1/component/{componentId}/save', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/component/{componentId}/save"
payload = [
{
"key": "<string>",
"details": "<string>",
"order": 123,
"componentElementId": "<string>",
"desc": "<string>",
"metadata": {},
"hidden": True
}
]
headers = {
"x-revo-mutation-review": "<x-revo-mutation-review>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"code": "STUDIO_REVIEW_REQUIRED",
"message": "<string>",
"operationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"studioSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"studioProposalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"proposalDigest": "<string>",
"revision": 1,
"mutationApplied": false,
"nextAction": "REVIEW",
"runtimeReady": true,
"releaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"testPolicy": {
"requiredTestComponentIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"gaps": [
{
"gapId": "<string>",
"code": "<string>",
"message": "<string>",
"waivable": true
}
]
}
}Headers
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.
Body
Unique element key. CODE_JS, CODE_TS, CODE_JS_LIB, and CODE_TS_LIB keys must be valid JavaScript identifiers and cannot be JavaScript/TypeScript reserved words. The permanent @default element cannot be renamed, deleted or replaced; its source remains editable. Only CODE_JS_LIB and CODE_TS_LIB additionally accept the reserved technical key @default: its named exports are available as lib.LibraryName.member. An ordinary DEFAULT key remains a regular node.
1 - 32Response
OK.
curl --request POST \
--url https://api.revoengine.com/api/v1/component/{componentId}/save \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-revo-mutation-review: <x-revo-mutation-review>' \
--data '
[
{
"key": "<string>",
"details": "<string>",
"order": 123,
"componentElementId": "<string>",
"desc": "<string>",
"metadata": {},
"hidden": true
}
]
'const options = {
method: 'POST',
headers: {
'x-revo-mutation-review': '<x-revo-mutation-review>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify([
{
key: '<string>',
details: '<string>',
order: 123,
componentElementId: '<string>',
desc: '<string>',
metadata: {},
hidden: true
}
])
};
fetch('https://api.revoengine.com/api/v1/component/{componentId}/save', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/component/{componentId}/save"
payload = [
{
"key": "<string>",
"details": "<string>",
"order": 123,
"componentElementId": "<string>",
"desc": "<string>",
"metadata": {},
"hidden": True
}
]
headers = {
"x-revo-mutation-review": "<x-revo-mutation-review>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"code": "STUDIO_REVIEW_REQUIRED",
"message": "<string>",
"operationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"studioSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"studioProposalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"proposalDigest": "<string>",
"revision": 1,
"mutationApplied": false,
"nextAction": "REVIEW",
"runtimeReady": true,
"releaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"testPolicy": {
"requiredTestComponentIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"gaps": [
{
"gapId": "<string>",
"code": "<string>",
"message": "<string>",
"waivable": true
}
]
}
}
