Skip to main content
POST
Discard Changes

Path Parameters

organizationId
string
required
Organization ID
projectId
string
required
Project ID
id
string
required
Component ID

Request Body

No request body required.

Behavior

Discard resets a component to its last published version:
  1. Only works for components with draft or modified status
  2. Component must have been previously published (have a lastPublishedVersion)
  3. All unpublished changes are permanently discarded
  4. Status returns to published
This action cannot be undone. All unpublished changes will be permanently lost.

Response

Returns the Component object with published status.

Error Responses

Invalid Status

Only draft or modified components can have changes discarded.

No Published Version

Draft components that have never been published cannot be discarded.

Code Examples