Restore Component
curl --request POST \
--url https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/components/{id}/restore \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"expectedUpdatedAt": "<string>"
}
'import requests
url = "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/components/{id}/restore"
payload = {
"name": "<string>",
"expectedUpdatedAt": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', expectedUpdatedAt: '<string>'})
};
fetch('https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/components/{id}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/components/{id}/restore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'expectedUpdatedAt' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/components/{id}/restore"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"expectedUpdatedAt\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/components/{id}/restore")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"expectedUpdatedAt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/components/{id}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"expectedUpdatedAt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyComponents
Restore Component
Bring back a deleted component
POST
/
app
/
v1
/
organizations
/
{organizationId}
/
projects
/
{projectId}
/
components
/
{id}
/
restore
Restore Component
curl --request POST \
--url https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/components/{id}/restore \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"expectedUpdatedAt": "<string>"
}
'import requests
url = "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/components/{id}/restore"
payload = {
"name": "<string>",
"expectedUpdatedAt": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', expectedUpdatedAt: '<string>'})
};
fetch('https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/components/{id}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/components/{id}/restore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'expectedUpdatedAt' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/components/{id}/restore"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"expectedUpdatedAt\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/components/{id}/restore")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"expectedUpdatedAt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/components/{id}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"expectedUpdatedAt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyDeleting a component only sets its status to
A component that is not deleted is returned unchanged with
deleted; its versions and assets stay. Restoring sets the status back: modified if the component was ever published (its published versions are still there, and the next package publishes a new version), otherwise draft. Requires the components.delete permission.
Path Parameters
Request Body
Both fields are optional; an empty body restores the component under its own name.Restore under this name instead. Needed when another component has taken the deleted component’s name since it was deleted.
The deleted component’s
updatedAt as you last read it. If it has changed since, the restore fails with CONFLICT.{
"name": "ProductCard (restored)"
}
Response
{
"data": {
"id": "c123",
"name": "ProductCard",
"status": "modified",
"version": null,
"lastPublishedVersion": 3,
"updatedAt": "2026-11-18T10:00:00Z"
},
"restored": true,
"message": "Component restored as modified"
}
"restored": false.
Error Responses
Name Taken (409)
{
"error": {
"code": "COMPONENT_NAME_EXISTS",
"message": "Component with name 'ProductCard' already exists in this project. Restore it under another name.",
"details": { "name": "ProductCard" }
}
}
Changed Since Read (409)
{
"error": {
"code": "CONFLICT",
"message": "Component c123 was modified by another request. Re-read it and reapply the change."
}
}
Not Found (404)
{
"error": {
"code": "NOT_FOUND",
"message": "Component c123"
}
}
Code Examples
curl -X POST "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/components/c123/restore" \
-H "Authorization: Bearer YOUR_JWT" \
-H "Content-Type: application/json" \
-d '{}'
const response = await fetch(
'https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/components/c123/restore',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_JWT',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
}
);
const { data, restored } = await response.json();