PermuteDocs
Go to Permute

Actions · actionsPublicationRequestsCreate

Request publication of a saved action revision

Requires Edit draft. Pins revisionId and expectedVersion and expires after seven days. Repeated requests from the same principal for the same candidate reuse the pending task. This neither publishes nor runs the action and grants no permissions.

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

When to use

Ask a publisher to review a saved Business Action draft.

For agents

Read the saved definition and its version token first. A request expires after seven days and grants no permissions (the action is neither published nor run).

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.requestPublication('actn_abcdefghijklmnopqrstuvwx', {
  "revisionId": "rvsn_abcdefghijklmnopqrstuvwx",
  "expectedVersion": "observed-version",
  "reason": "Ready for review"
});

Request body

json
{
  "revisionId": "rvsn_abcdefghijklmnopqrstuvwx",
  "expectedVersion": "observed-version",
  "reason": "Ready for review"
}

Response

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