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

# RPC/HTTP

> Call a connector's actions from a backend or script — no agent or framework.

You don't need an agent to use a connector. Any backend, script, or workflow can call an [action](/gateway/concepts/actions) directly — over the Actions API or with the SDK used standalone.

## Calling actions

Make an RPC call to any enabled action with the same two values every protocol and SDK uses: your StackOne API key and the end-user's `x-account-id`. The RPC endpoint routes the request to that account's provider, handles authentication, transforms the request to match the provider API, and returns normalized data.

If you don't already know which action you need, discover what's available with `GET /actions` first, then call it with `POST /actions/rpc`:

<Tabs>
  <Tab title="cURL">
    Authenticate with your [API key](/embed/api-keys) as Basic auth, and pass the linked account's ID in the `x-account-id` header.

    ### Discover available actions

    ```bash theme={null}
    curl "https://api.stackone.com/actions?filter[connectors]=bamboohr" \
      -u "$STACKONE_API_KEY:"
    ```

    ### Call the action

    ```bash theme={null}
    curl -X POST "https://api.stackone.com/actions/rpc" \
      -u "$STACKONE_API_KEY:" \
      -H "x-account-id: your-account-id" \
      -H "Content-Type: application/json" \
      -d '{
        "action": "bamboohr_list_employees",
        "query": { "page_size": 25 }
      }'
    ```
  </Tab>

  <Tab title="Python">
    Call the endpoints directly with the `requests` library — install it with `pip install requests`.

    ### Discover available actions

    ```python theme={null}
    import requests
    import base64
    import os

    api_key = os.environ["STACKONE_API_KEY"]
    headers = {
        "Authorization": f"Basic {base64.b64encode(f'{api_key}:'.encode()).decode()}"
    }

    response = requests.get(
        "https://api.stackone.com/actions",
        params={"filter[connectors]": "bamboohr"},
        headers=headers
    )

    providers = response.json()["data"]
    ```

    ### Call the action

    ```python theme={null}
    import requests
    import base64
    import os

    api_key = os.environ["STACKONE_API_KEY"]
    headers = {
        "Authorization": f"Basic {base64.b64encode(f'{api_key}:'.encode()).decode()}",
        "x-account-id": "your-account-id",
        "Content-Type": "application/json"
    }

    response = requests.post(
        "https://api.stackone.com/actions/rpc",
        headers=headers,
        json={
            "action": "bamboohr_list_employees",
            "query": {"page_size": 25}
        }
    )

    employees = response.json()["data"]
    ```
  </Tab>

  <Tab title="TypeScript SDK">
    Install the platform API client with `npm install @stackone/stackone-client-ts` ([npm](https://www.npmjs.com/package/@stackone/stackone-client-ts), [GitHub](https://github.com/StackOneHQ/stackone-client-typescript)). Clients for other languages are listed under [API SDKs](/platform-api/api-sdks).

    ### Discover available actions

    ```typescript theme={null}
    import { StackOne } from "@stackone/stackone-client-ts";

    const stackOne = new StackOne({
      security: {
        username: process.env.STACKONE_API_KEY!,
        password: "",
      },
    });

    const result = await stackOne.actions.listActionsMeta({
      filter: {
        connectors: "bamboohr",  // Filter by provider
      },
    });

    const actions = result.actionsMetaPaginated?.data?.[0]?.actions ?? [];

    // actions = [
    //   { id: "bamboohr_list_employees", label: "List Employees", ... },
    //   { id: "bamboohr_get_employee", label: "Get Employee", ... },
    //   ...
    // ]
    ```

    ### Call the action

    ```typescript theme={null}
    const result = await stackOne.actions.rpcAction({
      action: "bamboohr_list_employees",
      query: {
        pageSize: "25",
      },
      xAccountId: "your-account-id",
    });

    // result.rpcActionResponse?.data = [{ id: "emp_123", ... }, ...]
    ```
  </Tab>

  <Tab title="Agent SDK">
    Install the Agent SDK with `npm install @stackone/ai` ([npm](https://www.npmjs.com/package/@stackone/ai), [GitHub](https://github.com/StackOneHQ/stackone-ai-node)) — see [Agent SDK](/embed/call-actions/agent-sdk) for the full guides. It runs without a framework: fetch a tool and execute it yourself, no LLM in the loop.

    ### Discover available actions

    ```typescript theme={null}
    import { StackOneToolSet } from '@stackone/ai';

    const toolset = new StackOneToolSet();
    const tools = await toolset.fetchTools({ accountIds: ['your-account-id'] });
    ```

    ### Call the action

    ```typescript theme={null}
    const result = await tools.getTool('bamboohr_list_employees').execute();
    ```
  </Tab>
</Tabs>

### POST actions/rpc request parameters

| Parameter | Type   | Description                                                                            |
| --------- | ------ | -------------------------------------------------------------------------------------- |
| `action`  | string | The action identifier (e.g., `bamboohr_list_employees`, `greenhouse_create_candidate`) |
| `query`   | object | Query parameters for the action                                                        |
| `body`    | object | Request body for write operations                                                      |
| `path`    | object | Path parameters (e.g., `{ "id": "emp_123" }`)                                          |

<Accordion title="Common action patterns">
  **Query parameters** — Workday: list employees

  ```typescript theme={null}
  const result = await stackOne.actions.rpcAction({
    action: "workday_list_employees",
    query: { pageSize: "50" },
    xAccountId: "your-account-id",
  });
  ```

  **Request body** — Greenhouse: create candidate

  ```typescript theme={null}
  const result = await stackOne.actions.rpcAction({
    action: "greenhouse_create_candidate",
    body: {
      first_name: "Jane",
      last_name: "Doe",
      email: "jane@example.com"
    },
    xAccountId: "your-account-id",
  });
  ```

  **Path parameters** — Salesforce: get contact

  ```typescript theme={null}
  const result = await stackOne.actions.rpcAction({
    action: "salesforce_get_contact",
    path: { id: "contact_abc123" },
    xAccountId: "your-account-id",
  });
  ```
</Accordion>

<CardGroup cols={2}>
  <Card title="GET /actions" icon="code" href="/platform/api-reference/actions/list-all-connectors-actions-metadata">
    API reference for actions metadata.
  </Card>

  <Card title="POST /actions/rpc" icon="code" href="/platform/api-reference/actions/make-an-rpc-call-to-an-action">
    API reference for the RPC endpoint.
  </Card>
</CardGroup>

## When to use this

* Syncing or enriching data in a backend job
* Triggering an action from your own app logic
* Scripting one-off tasks against a provider

For agent-driven use:

<CardGroup cols={3}>
  <Card title="MCP" icon="plug" href="/embed/call-actions/mcp">
    **Open standard** for AI tools. Works with Claude, Cursor, Vercel AI, n8n
  </Card>

  <Card title="Agent SDK" icon="code" href="/embed/call-actions/agent-sdk">
    **Native TypeScript/Python** with framework integrations (LangChain, CrewAI, OpenAI)
  </Card>

  <Card title="A2A" icon="robot" href="/embed/call-actions/agent2agent">
    Call a pre-built agent per integration — for multi-agent orchestration.
  </Card>
</CardGroup>
