PermuteDocs
Go to Permute

Actions · actionTriggersGet

Get an action trigger

Returns a trigger, with its newest run in lastRun (null before the first run).

GET/v1/actions/{actionId}/triggers/{triggerId}
betaapiKeyworkspace

When to use

Check the next run time, the latest run, or why a trigger was disabled.

For agents

lastRun is the newest run (null before the first one). A failed run keeps the trigger enabled and records a businessAction.trigger.failed audit event. A disable records no run: isEnabled is false, nextRunAt is null, and disabledReason gives the cause. disabledReason and failures use the same error codes as action invocation.

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.actionTriggers.get('actn_abcdefghijklmnopqrstuvwx', 'trig_abcdefghijklmnopqrstuvwx');

Response

json
{
  "data": {
    "id": "trig_abcdefghijklmnopqrstuvwx",
    "actionId": "actn_abcdefghijklmnopqrstuvwx",
    "workspaceId": "wksp_finance123",
    "type": "schedule",
    "config": {
      "schedule": {
        "type": "daily",
        "hour": 9,
        "minute": 0
      },
      "input": {
        "region": "EMEA"
      }
    },
    "isEnabled": true,
    "nextRunAt": "2026-10-03T09:00:00.000Z",
    "disabledReason": null,
    "createdAt": "2026-10-02T12:00:00.000Z",
    "updatedAt": "2026-10-02T12:00:00.000Z",
    "lastRun": null
  }
}