Actions

Execute integration actions via the Weavz API.

Actions

Actions are operations performed against third-party services through their integrations. For example, sending a Slack message, creating a Google Sheet row, or fetching GitHub issues.

Execute Action

POST/api/v1/actions/execute

Execute an integration action with the provided input.

Request Body

FieldTypeRequiredDescription
integrationNamestringYesIntegration name (e.g., slack, gmail)
actionNamestringYesAction to execute (e.g., send_channel_message, send_email)
inputobjectNoAction input parameters (defaults to {})
connectionExternalIdstringNoA connection's externalId selector. Use this when you want to select one connection directly.
workspaceIdstring (uuid)YesWorkspace scope for connection resolution
workspaceIntegrationIdstring (uuid)NoConfigured workspace integration instance to target. Prefer this when the same integration has multiple aliases.
integrationAliasstringNoWorkspace integration alias to target when workspaceIntegrationId is not provided.
endUserIdstringNoThe end user's externalId. Used for per-user connection resolution and for stateful built-in tools whose workspace integration persistence policy is end_user.
partialIdsstring[]NoPartial IDs to apply. If omitted, default partials auto-resolve. Send [] to run without defaults.
idempotencyKeystringNoStable retry key. Required when retrying an action after a Human Gates approval response.

If connectionExternalId is not provided, the system resolves a connection based on the workspace's integration configuration. Use workspaceIntegrationId or integrationAlias to select the exact configured alias.

Response

json
{
  "success": true,
  "output": {
    "ok": true,
    "channel": "C0123456789",
    "ts": "1234567890.123456",
    "message": {
      "text": "Hello from Weavz!"
    }
  }
}

When a Human Gates policy matches, the endpoint returns HTTP 202 instead of executing immediately:

json
{
  "success": false,
  "status": "approval_required",
  "approval": {
    "id": "apr_9b36d3f761d84bb2b6f9a0c4b9d1f7e0",
    "status": "pending",
    "approvalUrl": "https://platform.weavz.io/approve/apr_9b36d3f761d84bb2b6f9a0c4b9d1f7e0?token=apr_link_v1_...",
    "hostedApprovalUrl": "https://platform.weavz.io/approve/apr_9b36d3f761d84bb2b6f9a0c4b9d1f7e0?token=apr_link_v1_...",
    "expiresAt": "2026-05-14T12:00:00.000Z",
    "retry": {
      "idempotencyKey": "order-123-send-confirmation"
    }
  }
}

After approval, retry the same request with the same input and idempotency key. See Human Gates.

Example

bash
curl -X POST https://api.weavz.io/api/v1/actions/execute \
  -H "Authorization: Bearer wvz_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "integrationName": "slack",
    "actionName": "send_channel_message",
    "input": {
      "channel": "C0123456789",
      "text": "Hello from Weavz!"
    },
    "integrationAlias": "slack_bot",
    "workspaceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }'

Errors

StatusCodeDescription
400VALIDATION_ERRORMissing required fields
400ACTION_FAILEDThe action execution failed (error details in response)
400CONNECTION_REQUIREDAction requires a connection but none was found
400CONNECTION_NOT_FOUNDSpecified connection does not exist
400INTEGRATION_NOT_FOUNDIntegration not found
403QUOTA_EXCEEDEDMonthly action limit reached

Discovering Actions

Use the Integrations API to list available actions for each integration, including their input schemas and required properties.

bash
curl "https://api.weavz.io/api/v1/integrations?name=slack" \
  -H "Authorization: Bearer wvz_your_api_key"

The response includes an actions object with all available actions and their input property definitions.