{
"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": {},
"actionRunId": "<string>"
}Actions
Act
POST
/
act
{
"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": {},
"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
Body
application/json
Was this page helpful?