{
"connectionKey": "hubspot-prod",
"api": {
"method": "POST",
"path": "/crm/v3/objects/contacts",
"body": { "properties": { "email": "jane@example.com" } }
}
}
{
"connectionKey": "hubspot-prod",
"code": "module.exports = async ({ input, membrane }) => ({ ok: true })",
"input": {}
}
{
"key": "create-contact",
"integrationKey": "hubspot",
"connectionKey": "hubspot-prod",
"input": { "email": "jane@example.com" }
}
{
"id": "action_abc",
"connectionKey": "hubspot-prod",
"input": { "email": "jane@example.com" },
"meta": { "source": "support-ticket-1234" }
}
{
"output": "<unknown>",
"actionRunId": "<string>"
}Act
Run a saved action by id/key, or dispatch inline with api, code, or browser, through the connection selected by connectionId/connectionKey (browser requires connectionId). Returns { output, actionRunId }; for browser dispatch, actionRunId is the Browser Session id.
{
"connectionKey": "hubspot-prod",
"api": {
"method": "POST",
"path": "/crm/v3/objects/contacts",
"body": { "properties": { "email": "jane@example.com" } }
}
}
{
"connectionKey": "hubspot-prod",
"code": "module.exports = async ({ input, membrane }) => ({ ok: true })",
"input": {}
}
{
"key": "create-contact",
"integrationKey": "hubspot",
"connectionKey": "hubspot-prod",
"input": { "email": "jane@example.com" }
}
{
"id": "action_abc",
"connectionKey": "hubspot-prod",
"input": { "email": "jane@example.com" },
"meta": { "source": "support-ticket-1234" }
}
{
"output": "<unknown>",
"actionRunId": "<string>"
}POST /act is Membrane’s unified entry point for running an action through a connection. See the Actions guide for the conceptual walkthrough — this page is the endpoint reference.
Dispatch styles
Exactly one ofid, key, api, or code per call. Sending more than one returns 400.
| Field | Style | When to use |
|---|---|---|
api | Inline api | Make an ad-hoc HTTP request through the connection’s auth and base URL. |
code | Inline code | Run a JavaScript snippet in a sandbox with a pre-wired authenticated membrane client. |
key | Reusable | Run a saved (workspace- or integration-level) action by its stable key. |
id | Reusable | Run a catalog action or a saved action by its Membrane ID. |
Resolving a connection
Every dispatch needs a connection. Membrane resolves one in this order:connectionId— direct.connectionKey— look up by key.integrationIdorintegrationKey— use that integration’s default connection.- Workspace default connection.
api / code), the connection must resolve to something — otherwise the request returns 400.
Request body
{
"connectionKey": "hubspot-prod",
"api": {
"method": "POST",
"path": "/crm/v3/objects/contacts",
"body": { "properties": { "email": "jane@example.com" } }
}
}
{
"connectionKey": "hubspot-prod",
"code": "module.exports = async ({ input, membrane }) => ({ ok: true })",
"input": {}
}
{
"key": "create-contact",
"integrationKey": "hubspot",
"connectionKey": "hubspot-prod",
"input": { "email": "jane@example.com" }
}
{
"id": "action_abc",
"connectionKey": "hubspot-prod",
"input": { "email": "jane@example.com" },
"meta": { "source": "support-ticket-1234" }
}
| Field | Type | Description |
|---|---|---|
api | object | Inline HTTP spec — { method, path, body?, headers?, query? }. |
code | string | Inline JS module body, executed in a sandbox. |
key | string | Action key. Scope with integrationKey/integrationId/connectionId if non-unique. |
id | string | Action ID. Mutually exclusive with key / api / code. |
connectionId | string | Connection to run against. See resolution priority. |
connectionKey | string | Connection key alternative to connectionId. |
integrationId | string | Integration ID — used to scope key lookups or pick a default connection. |
integrationKey | string | Integration key alternative to integrationId. |
input | object | Action input. For reusable-action dispatches, validated against the action’s inputSchema. |
meta | object | Arbitrary metadata stored on the resulting Action Run Log. |
Response
{
"output": { "id": "12345", "email": "jane@example.com" },
"actionRunId": "<action-run-id>"
}
actionRunId. Pass it to GET /action-run-logs/{id} to inspect the resolved action, mapped input, raw HTTP exchange, and any errors. On failure the body still includes actionRunId alongside the error.
Replay from a run log
Every action run log carries anaction field — the complete /act body that was used. Pass it back unchanged to re-run the same dispatch:
SNAPSHOT=$(curl -s https://api.integration.app/action-run-logs/<runId> \
-H "Authorization: Bearer $TOKEN" | jq '.action')
curl -X POST https://api.integration.app/act \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d "$SNAPSHOT"
input and connectionId on the run log are deprecated — read them from action instead.
Legacy: POST /actions/{selector}/run
POST /actions/{selector}/run is the older endpoint for running a saved action. It still works for existing callers but is deprecated — /act covers all the same cases plus inline api and code dispatch.
| Before | After |
|---|---|
POST /actions/<id>/run body: { ...input } | POST /act body: { "id": "<id>", "input": {...}, "connectionKey": "..." } |
POST /actions/<key>/run?connectionId=<id> | POST /act body: { "key": "<key>", "connectionId": "<id>", "input": {...} } |
Ad-hoc HTTP via a custom run-javascript action | POST /act body: { "api": { "method": "...", "path": "..." }, "connectionKey": "..." } |
/act for new code.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
ID of the action to run.
Key of the action to run. Pass connectionId or connectionKey to select a connection-specific variant.
Inline HTTP request through the selected connection's auth and base URL; pair with connectionId or connectionKey.
Show child attributes
Show child attributes
Browser Session dispatch; pair with connectionId, and use the returned actionRunId as its session id.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
Show child attributes
Show child attributes
Sandboxed JavaScript module exporting a function that receives { input, membrane, ... }; its return value is the action output.
Connection ID for this run; a connection-level action variant is preferred over the universal variant.
Connection key for this run.
Input passed to the action, matching its input schema. Must be a JSON object.
Show child attributes
Show child attributes
Arbitrary metadata stored on the action run log.
Show child attributes
Show child attributes
Response
Run a saved action by id/key, or dispatch inline with api, code, or browser, through the connection selected by connectionId/connectionKey (browser requires connectionId). Returns { output, actionRunId }; for browser dispatch, actionRunId is the Browser Session id.