PermuteDocs
Go to Permute

Actions · actionsPublicationRequestsDecide

Decide an action publication request

Approve publishes the exact requested current draft using the publisher’s current permissions and normal source/delegation checks. Requires Publish to approve or reject; only the requester can cancel. Stale, expired or closed requests cannot publish. Failed publication leaves the request pending. Approval never runs the action.

POST/v1/actions/{actionId}/publication-requests/{requestId}/decisions
betaauthenticatedworkspace

When to use

Publish the reviewed action candidate, reject the request, or cancel your request.

For agents

Approval uses current Publish and source-delegation authority and the exact saved candidate. It never runs the action. A failed publication leaves the request pending. Direct publication remains available.

Example

typescript
import { PermuteClient } from '@permute/sdk';

const orgClient = new PermuteClient({
  apiKey: process.env.PERMUTE_API_KEY!,
});

const client = orgClient.withWorkspace(process.env.PERMUTE_WORKSPACE_ID!);

const result = await client.actions.decidePublication('actn_abcdefghijklmnopqrstuvwx', 'task_abcdefghijklmnopqrstuvwx', {
  "decision": "approved"
});

Request body

json
{
  "decision": "approved"
}

Response

json
{
  "data": {
    "id": "task_abcdefghijklmnopqrstuvwx",
    "revisionId": "rvsn_abcdefghijklmnopqrstuvwx",
    "expectedVersion": "observed-version",
    "principalType": "apiKey",
    "principalId": "apik_author",
    "reason": "Ready for launch",
    "status": "published",
    "createdAt": "2026-10-29T12:00:00.000Z",
    "expiresAt": "2026-11-05T12:00:00.000Z",
    "canPublish": false,
    "canCancel": false,
    "actionId": "actn_abcdefghijklmnopqrstuvwx"
  }
}