/v1/workspaces/{workspace_id}/change-requests/{change_request_id}/rejectAuthReject a change request
Rejects the request (final); the author is emailed with your note. Same reviewer rules as approve.
Path parameters
change_request_id*string · uuidId of the change request.
workspace_id*string · uuidId of the workspace.
Request body
notestringA note for the author (at most 500 characters).
Example: "Approved for the 09:00 launch"
applybooleanApprove only: apply the change right away when this is the last approval it needs (the console's "Approve and apply").
Example: true
Response · 200 The rejected change request.
id*string · uuidId of the change request.
workspace_id*string · uuidThe workspace.
project_id*string · uuidThe project.
config_id*string · uuidThe config.
setting_id*string · uuidThe setting the change is for.
setting_key*stringThe setting's key.
Example: "new_checkout"
environment_id*string · uuidThe environment the change is for.
environment_key*stringThe environment's key.
Example: "production"
kind*object`value`: a new value and targeting. `ramp`: a timed percentage rollout, started when applied.
Example: "value"
status*object`pending` until it has `required_approvals` approvals (`approved`); `scheduled` when an approved request waits for its `run_at`; `applied`; `rejected` by a reviewer; `cancelled` by its author or a reviewer; `failed` when a scheduled apply found the value changed (rebase it).
Example: "pending"
base_version*integerThe value's `version` the proposal was made against.
Example: 7
current_version*integerThe value's `version` now.
Example: 7
stale*booleanTrue when the value changed since the proposal (`current_version` ≠ `base_version`) while the request is still open: rebase or recreate it before applying.
Example: false
before*objectWhat the environment served when the change was proposed: `value`, `rules`, `percentages`, `percentage_attribute`. Confidential lists show as counts.
after*objectWhat it will serve once applied (same shape), or for a `ramp` the ramp `{value, steps}`.
diff*arrayJSON Patch (RFC 6902) from `before` to `after`.
summary*arrayThe change in words ("value false → true", "rule 2 percentage 10 → 25").
Example: ["value false → true"]
note*stringThe author's note.
Example: "Turn on for everyone"
required_approvals*integerApprovals needed (from the environment when it was proposed).
Example: 1
approvals*integerApprovals so far.
Example: 0
reviews*arrayEvery decision, oldest first.
author*objectWho proposed it (and for whom, when an agent did).
applied_change_id*string · uuidThe history entry the apply wrote.
applied_at*string · date-timeWhen it was applied.
scheduled_change_id*string · uuidThe scheduled change that will apply it.
last_error*objectWhy the last scheduled apply failed.
created_at*string · date-timeWhen it was proposed.
updated_at*string · date-timeWhen it last changed state.
Example
Request
POST https://api.flags.productcraft.co/v1/workspaces/{workspace_id}/change-requests/{change_request_id}/reject
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"note": "Approved for the 09:00 launch",
"apply": true
}import { Flags } from "@productcraft/flags";
// Reads PRODUCTCRAFT_API_KEY from the environment
const flags = new Flags();
const changeRequest = await flags.changeRequests.reject("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { apply: true });flags.changeRequests.reject(changeRequestId, params?, options?): Flags.ChangeRequest
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",
"kind": "value",
"status": "pending",
"base_version": 7,
"current_version": 7,
"stale": false,
"before": {},
"after": {},
"diff": [
{
"op": {},
"path": "/rules/1/percentages/0/percentage",
"value": 25
}
],
"summary": [
"value false → true"
],
"note": "Turn on for everyone",
"required_approvals": 1,
"approvals": 0,
"reviews": [
{
"reviewer_id": "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
"reviewer_label": "ada@example.com",
"decision": "approved",
"note": "Looks good",
"created_at": "2026-01-01T00:00:00.000Z"
}
],
"author": {},
"applied_change_id": "00000000-0000-0000-0000-000000000000",
"applied_at": "2026-01-01T00:00:00.000Z",
"scheduled_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"
}