KosmoKrator

communication

Knock CLI for AI Agents

Use the Knock CLI from KosmoKrator to call Knock tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 6 read 1 write API key auth

Knock CLI Setup

Knock can be configured headlessly with `kosmokrator integrations:configure knock`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure knock --set api_key="$KNOCK_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor knock --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_key KNOCK_API_KEY Secret secret yes API Key
url KNOCK_URL URL url no Knock URL

Call Knock Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call knock.knock_list_workflows '{
  "limit": 1,
  "page": 1
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:knock knock_list_workflows '{
  "limit": 1,
  "page": 1
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs knock --json
kosmo integrations:docs knock.knock_list_workflows --json
kosmo integrations:schema knock.knock_list_workflows --json
kosmo integrations:search "Knock" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Knock.

knock.knock_list_workflows

Read read

List notification workflows from Knock. Returns workflow IDs and details you can use to trigger or inspect workflows.

Parameters
limit, page

Generic CLI call

kosmo integrations:call knock.knock_list_workflows '{"limit":1,"page":1}' --json

Provider shortcut

kosmo integrations:knock knock_list_workflows '{"limit":1,"page":1}' --json

knock.knock_get_workflow

Read read

Get details of a specific notification workflow in Knock, including its steps and configuration.

Parameters
id

Generic CLI call

kosmo integrations:call knock.knock_get_workflow '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:knock knock_get_workflow '{"id":"example_id"}' --json

knock.knock_trigger_workflow

Write write

Trigger a notification workflow in Knock for one or more recipients. The workflow will execute its configured steps (email, Slack, in-app, etc.) for each recipient.

Parameters
id, recipients, data, cancellation_criteria

Generic CLI call

kosmo integrations:call knock.knock_trigger_workflow '{"id":"example_id","recipients":"example_recipients","data":"example_data","cancellation_criteria":"example_cancellation_criteria"}' --json

Provider shortcut

kosmo integrations:knock knock_trigger_workflow '{"id":"example_id","recipients":"example_recipients","data":"example_data","cancellation_criteria":"example_cancellation_criteria"}' --json

knock.knock_list_messages

Read read

List notification messages from Knock. Optionally filter by delivery status (e.g., sent, delivered, undelivered).

Parameters
limit, page, status

Generic CLI call

kosmo integrations:call knock.knock_list_messages '{"limit":1,"page":1,"status":"example_status"}' --json

Provider shortcut

kosmo integrations:knock knock_list_messages '{"limit":1,"page":1,"status":"example_status"}' --json

knock.knock_get_message

Read read

Get details of a specific notification message in Knock, including its content, delivery status, and channel.

Parameters
id

Generic CLI call

kosmo integrations:call knock.knock_get_message '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:knock knock_get_message '{"id":"example_id"}' --json

knock.knock_list_recipients

Read read

List notification recipients from Knock. Returns recipient identifiers and their preferences.

Parameters
limit, page

Generic CLI call

kosmo integrations:call knock.knock_list_recipients '{"limit":1,"page":1}' --json

Provider shortcut

kosmo integrations:knock knock_list_recipients '{"limit":1,"page":1}' --json

knock.knock_get_current_user

Read read

Get the currently authenticated Knock user. Useful for verifying API credentials and inspecting account details.

Parameters
none

Generic CLI call

kosmo integrations:call knock.knock_get_current_user '{}' --json

Provider shortcut

kosmo integrations:knock knock_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

knock.knock_list_workflows

List notification workflows from Knock. Returns workflow IDs and details you can use to trigger or inspect workflows.

Operation
Read read
Schema command
kosmo integrations:schema knock.knock_list_workflows --json
ParameterTypeRequiredDescription
limit integer no Maximum number of workflows to return (default: 25).
page integer no Page number for pagination.

knock.knock_get_workflow

Get details of a specific notification workflow in Knock, including its steps and configuration.

Operation
Read read
Schema command
kosmo integrations:schema knock.knock_get_workflow --json
ParameterTypeRequiredDescription
id string yes The workflow ID.

knock.knock_trigger_workflow

Trigger a notification workflow in Knock for one or more recipients. The workflow will execute its configured steps (email, Slack, in-app, etc.) for each recipient.

Operation
Write write
Schema command
kosmo integrations:schema knock.knock_trigger_workflow --json
ParameterTypeRequiredDescription
id string yes The workflow ID to trigger.
recipients array yes Array of recipient identifiers (user IDs or emails) to receive the notification.
data array no Payload data to pass to the workflow. Used in notification templates as merge variables.
cancellation_criteria array no Cancellation criteria for the workflow run. Allows automatic cancellation based on conditions.

knock.knock_list_messages

List notification messages from Knock. Optionally filter by delivery status (e.g., sent, delivered, undelivered).

Operation
Read read
Schema command
kosmo integrations:schema knock.knock_list_messages --json
ParameterTypeRequiredDescription
limit integer no Maximum number of messages to return (default: 25).
page integer no Page number for pagination.
status string no Filter by message status: sent, delivered, undelivered, or opened.

knock.knock_get_message

Get details of a specific notification message in Knock, including its content, delivery status, and channel.

Operation
Read read
Schema command
kosmo integrations:schema knock.knock_get_message --json
ParameterTypeRequiredDescription
id string yes The message ID.

knock.knock_list_recipients

List notification recipients from Knock. Returns recipient identifiers and their preferences.

Operation
Read read
Schema command
kosmo integrations:schema knock.knock_list_recipients --json
ParameterTypeRequiredDescription
limit integer no Maximum number of recipients to return (default: 25).
page integer no Page number for pagination.

knock.knock_get_current_user

Get the currently authenticated Knock user. Useful for verifying API credentials and inspecting account details.

Operation
Read read
Schema command
kosmo integrations:schema knock.knock_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.