/v1/workspaces/{workspace_id}/ramps/{ramp_id}/cancelAuthCancel a ramp
Stops the ramp where it is: the split it reached stays. Change or restore the value to undo it.
Path parameters
ramp_id*string · uuidId of the ramp.
workspace_id*string · uuidId of the workspace.
Request body
notestringA note for the history (at most 500 characters).
Example: "Roll out the new checkout to everyone (FLAG-142)"
Response · 200 The cancelled ramp.
id*string · uuidId of the ramp.
workspace_id*string · uuidThe workspace.
project_id*string · uuidThe project.
config_id*string · uuidThe config.
setting_id*string · uuidThe setting.
setting_key*stringThe setting's key.
Example: "new_checkout"
environment_id*string · uuidThe environment.
environment_key*stringThe environment's key.
Example: "production"
value*objectThe value served to the ramped percentage; everyone else keeps the default value.
Example: true
steps*arrayThe steps and which have been applied.
current_percentage*integerPercentage served now (0 before the first step).
Example: 25
status*objectState.
Example: "active"
note*stringNote on every step in the history.
Example: "Ramp the new checkout"
change_request_id*string · uuidThe approved change request that started it.
created_by*objectWho started it.
last_change_id*string · uuidThe history entry of the last step.
last_error*objectWhy it failed.
created_at*string · date-timeWhen it was created.
updated_at*string · date-timeWhen it last changed.
Example
Request
POST https://api.flags.productcraft.co/v1/workspaces/{workspace_id}/ramps/{ramp_id}/cancel
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"note": "Roll out the new checkout to everyone (FLAG-142)"
}import { Flags } from "@productcraft/flags";
// Reads PRODUCTCRAFT_API_KEY from the environment
const flags = new Flags();
const ramp = await flags.ramps.cancel("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { note: "Roll out the new checkout to everyone (FLAG-142)" });flags.ramps.cancel(rampId, params?, options?): Flags.Ramp
Response
{
"id": "00000000-0000-0000-0000-000000000000",
"workspace_id": "00000000-0000-0000-0000-000000000000",
"project_id": "00000000-0000-0000-0000-000000000000",
"config_id": "00000000-0000-0000-0000-000000000000",
"setting_id": "00000000-0000-0000-0000-000000000000",
"setting_key": "new_checkout",
"environment_id": "00000000-0000-0000-0000-000000000000",
"environment_key": "production",
"value": true,
"steps": [
{
"percentage": 25,
"at": "2026-01-01T00:00:00.000Z",
"applied": false
}
],
"current_percentage": 25,
"status": "active",
"note": "Ramp the new checkout",
"change_request_id": "00000000-0000-0000-0000-000000000000",
"created_by": {},
"last_change_id": "00000000-0000-0000-0000-000000000000",
"last_error": {},
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}