Skip to main content
POST
Restore Component
Deleting a component only sets its status to 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

string
required
Organization ID
string
required
Project ID
string
required
Component ID

Request Body

Both fields are optional; an empty body restores the component under its own name.
string
Restore under this name instead. Needed when another component has taken the deleted component’s name since it was deleted.
string
The deleted component’s updatedAt as you last read it. If it has changed since, the restore fails with CONFLICT.

Response

A component that is not deleted is returned unchanged with "restored": false.

Error Responses

Name Taken (409)

Changed Since Read (409)

Not Found (404)

Code Examples