Update component
const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://studyfetchapi.com/api/v1/components/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://studyfetchapi.com/api/v1/components/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{}'import requests
url = "https://studyfetchapi.com/api/v1/components/{id}"
payload = {}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"_id": "<string>",
"componentId": "<string>",
"type": "chat",
"name": "<string>",
"organization": "<string>",
"config": {},
"status": "active",
"usage": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>"
}Components
Update component
PATCH
/
api
/
v1
/
components
/
{id}
Update component
const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://studyfetchapi.com/api/v1/components/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://studyfetchapi.com/api/v1/components/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{}'import requests
url = "https://studyfetchapi.com/api/v1/components/{id}"
payload = {}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"_id": "<string>",
"componentId": "<string>",
"type": "chat",
"name": "<string>",
"organization": "<string>",
"config": {},
"status": "active",
"usage": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>"
}Authorizations
API Key for server-to-server authentication. Resolves to the owning organization.
Path Parameters
Component ID
Body
application/json
Component status
Available options:
draft, active, inactive, processing, error Response
200 - application/json
Component updated successfully
Component ID (MongoDB ObjectId)
Unique component identifier
Component type
Available options:
chat, data_analyst, flashcards, scenarios, practice_test, audio_recap, tutor_me, explainers, uploads, chat_analytics Component name
Organization ID
Component configuration
Component status
Available options:
active, inactive, draft Usage statistics
Creation timestamp
Last update timestamp
Component description
Was this page helpful?