PermuteDocs
Go to Permute

Apps · appsPublicationRequestsDecide

Decide an app publication request

Approve publishes the exact requested current draft using the current publisher’s rights and normal publication checks. Requires Publish to approve or reject; the requester can cancel. Stale, expired or closed requests cannot publish. Failure leaves the request pending. A request never transfers permissions.

POST/v1/apps/{applicationId}/publication-requests/{requestId}/decisions
betaapiKeyworkspace

When to use

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

For agents

Approve and Reject require current Publish access; Cancel requires the requester. Approval runs normal publication checks and cannot substitute the latest draft for the pinned candidate. Failure leaves intent pending. Direct publication remains available to publishers.

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.apps.decidePublication('appl_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,
    "applicationId": "appl_abcdefghijklmnopqrstuvwx"
  }
}