> ## Documentation Index
> Fetch the complete documentation index at: https://docs.frayme.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Invoke a pending action

> Invoke a named action on the paused node addressed by `handle`. Requires
the **`cases:callback`** scope.

A pending action is a **side effect** on the paused node — it returns
data and leaves the node paused (unlike a callback, which resolves the
node). Typical uses: re-mint an expiring token or verification link, or
push applicant data to the provider. The body is `{ "params": { ... } }`;
an empty body is valid for actions that take no parameters.




## OpenAPI

````yaml /api-reference/openapi.yaml post /pending/{handle}/actions/{actionId}
openapi: 3.1.0
info:
  title: Frayme Case API
  version: 1.0.0
  description: >
    The partner-facing HTTP API for the Frayme fraud-analysis platform. Submit

    **cases** (KYC, KYB, or Transaction), poll their status, act on paused

    workflow nodes, and deliver external callbacks.


    All requests authenticate with a tenant-scoped API key sent in the

    `X-API-Key` header. Each key carries one or more **scopes** — the required

    scope is listed on every operation below.


    | Scope | Grants |

    | --- | --- |

    | `cases:write` | Submit new cases (`POST /cases`) |

    | `cases:read` | Read a case, list paused nodes, list durable actions |

    | `cases:callback` | Deliver an external callback, or invoke a pending /
    durable action |


    Your tenant is derived from the API key — never send `tenantId` in a request

    body; it is ignored. The base URL and your webhook configuration are

    provisioned for you by Frayme.
servers:
  - url: https://core.us.api.frayme.io
    description: Production.
  - url: https://core.us.api.stg.frayme.io
    description: Staging.
security:
  - apiKeyAuth: []
tags:
  - name: Cases
    description: Submit and read cases.
  - name: Pending actions
    description: Act on a workflow node that is paused awaiting an external system.
  - name: Durable actions
    description: Invoke a broker action on a case after it has been decided.
  - name: Callbacks
    description: Deliver the result of an external callback back to a paused node.
paths:
  /pending/{handle}/actions/{actionId}:
    post:
      tags:
        - Pending actions
      summary: Invoke a pending action
      description: >
        Invoke a named action on the paused node addressed by `handle`. Requires

        the **`cases:callback`** scope.


        A pending action is a **side effect** on the paused node — it returns

        data and leaves the node paused (unlike a callback, which resolves the

        node). Typical uses: re-mint an expiring token or verification link, or

        push applicant data to the provider. The body is `{ "params": { ... }
        }`;

        an empty body is valid for actions that take no parameters.
      operationId: invokePendingAction
      parameters:
        - name: handle
          in: path
          required: true
          description: The opaque `pendingHandle` for the paused node.
          schema:
            type: string
        - name: actionId
          in: path
          required: true
          description: The action `id` to invoke (from `availableActions`).
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActionInvokeRequest'
      responses:
        '200':
          description: Action performed; `output` carries its result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionInvokeResponse'
        '400':
          description: Unknown action for this node, or invalid/missing params.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: No API key was supplied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The API key is missing the `cases:callback` scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            The handle is unknown, expired, already resolved, or belongs to
            another tenant.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: The upstream provider rejected or failed the action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ActionInvokeRequest:
      type: object
      description: An empty body is valid for actions that take no parameters.
      properties:
        params:
          type: object
          additionalProperties: true
          description: Action-specific parameters. See the provider's page.
    ActionInvokeResponse:
      type: object
      properties:
        output:
          type: object
          additionalProperties: true
          description: Action-specific output fields.
    Error:
      type: object
      properties:
        error:
          type: string
          description: A human-readable error message.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: A tenant-scoped API key provisioned by Frayme.

````