Skip to main content
POST/migrations/pending/{pendingId}/reject

Reject Pending Migration

Declines a queued pending migration, transitioning it from queued to rejected without executing any DDL.

The row is retained permanently for audit-trail purposes with the deciding admin's identity and an optional reason.

Returns data: { pendingId, status: 'rejected' }.

Attempting rejection on a row that is not in queued state returns K9O_INVALID_FIELD_VALUE (400).

Emits a migration.rejected audit event.

Requires PROJECT_ADMIN.

Parameters
pendingId *path

The pending migration's id (pmig_...).

projectSlug *path

The project's slug: the path segment after @.

It is unique within the org.

Responses
HTTPK9O CodeDescription
200Success
403K9O_ACCESS_DENIEDRejecting a pending migration requires the PROJECT_ADMIN role, or the caller is not a project member.
403K9O_RBAC_DENYA session is required to reject a pending migration: a personal access token alone is refused with `context.reason` `session_required`, and a service, workload or extension token with `human_only`.
Response body (200)
data *object

The pending migration that was rejected.

pendingId *string

The pending migration's id (pmig_...).

status *"rejected"

Always rejected.

meta *any

Request metadata: cost, timing and correlation ids.

TypeScript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.migrations.rejectPending('pmig_4Fh2kQ9xLm7a')

Showing example in TypeScript

Response example (200)
{
  "data": {
    "pendingId": "string",
    "status": "rejected"
  }
}

More in Storage & Schema