> ## 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.

# Platform API Overview

> Manage accounts, execute actions, and control integrations with the Platform API

The Platform API is the **control plane** for StackOne. It powers MCP servers and AI Toolset. Use it to execute actions, manage end-user accounts, and build custom integrations.

<CardGroup cols={3}>
  <Card title="Execute Actions" icon="bolt" href="#execute-actions">
    Run any of 10,000+ actions via RPC
  </Card>

  <Card title="Manage Accounts" icon="users" href="#manage-accounts">
    CRUD operations on linked accounts
  </Card>

  <Card title="Onboard End-Users" icon="link" href="#onboard-end-users">
    Generate connect session URLs
  </Card>
</CardGroup>

***

## Execute Actions

The RPC endpoint is the unified way to execute any of StackOne's 10,000+ actions, the same layer used by MCP and AI Toolset.

<Card title="Execute Actions Guide" icon="bolt" href="/api/execute-actions">
  Learn how to execute actions via RPC, discover available actions, and build dynamic agent tooling.
</Card>

<div className="not-prose mt-4">
  <CardGroup cols={2}>
    <Card title="Actions RPC" icon="play" href="/platform/api-reference/actions/make-an-rpc-call-to-an-action">
      **`POST /actions/rpc`**: Execute any StackOne action.
    </Card>

    <Card title="List Actions" icon="list" href="/platform/api-reference/actions/list-all-actions-metadata">
      **`GET /actions`**: Discover available actions and parameters.
    </Card>
  </CardGroup>
</div>

***

## Manage Accounts

Linked accounts are your end-users' connections to their SaaS systems. The Accounts API manages the full lifecycle.

<CardGroup cols={2}>
  <Card title="List Accounts" icon="list-ul" href="/platform/api-reference/accounts/list-accounts">
    **`GET /accounts`**: Get all linked accounts with status, provider, and metadata.
  </Card>

  <Card title="Get Account" icon="magnifying-glass" href="/platform/api-reference/accounts/get-account">
    **`GET /accounts/{id}`**: Get details for a specific account.
  </Card>

  <Card title="Update Account" icon="pen" href="/platform/api-reference/accounts/update-account">
    **`PATCH /accounts/{id}`**: Update labels, metadata, or configuration.
  </Card>

  <Card title="Delete Account" icon="trash" href="/platform/api-reference/accounts/delete-account">
    **`DELETE /accounts/{id}`**: Remove an account and its stored credentials.
  </Card>
</CardGroup>

***

## Onboard End-Users

The Connect Sessions API powers the [Integration Hub](/guides/embedding-stackone-hub), the embeddable UI where end-users link accounts.

<CardGroup cols={2}>
  <Card title="Create Session" icon="plus" href="/platform/api-reference/connect-sessions/create-connect-session">
    **`POST /connect_sessions`**: Generate a connect URL for your app.
  </Card>

  <Card title="Authenticate Session" icon="key" href="/platform/api-reference/connect-sessions/authenticate-connect-session">
    **`POST /connect_sessions/authenticate`**: Authenticate a session programmatically.
  </Card>
</CardGroup>

### Typical Flow

```mermaid theme={null}
sequenceDiagram
    participant App as Your App
    participant API as Platform API
    participant Hub as Integration Hub
    participant User as End-User

    App->>API: POST /connect_sessions
    API-->>App: { connect_url, token }
    App->>User: Redirect to connect_url
    User->>Hub: Selects provider & authenticates
    Hub->>API: Creates linked account
    API-->>App: Webhook: account.created
```

***

## Discover Connectors

Query metadata about available connectors. Useful for building UIs that show which integrations you support.

<CardGroup cols={2}>
  <Card title="List Connectors" icon="grid-2" href="/platform/api-reference/connectors/list-connector-meta-information">
    **`GET /connectors`**: Get all connectors with categories, logos, and capabilities.
  </Card>

  <Card title="Get Connector" icon="puzzle-piece" href="/platform/api-reference/connectors/get-connector-meta-information">
    **`GET /connectors/{provider}`**: Get a connector's fields and actions.
  </Card>
</CardGroup>

***

## Monitor & Debug

Access detailed logs for every API request. Essential for debugging integrations in production.

<CardGroup cols={2}>
  <Card title="List Logs" icon="scroll" href="/platform/api-reference/request-logs/list-logs">
    **`GET /logs`**: Query logs with filters for account, status, and time.
  </Card>

  <Card title="Get Log Details" icon="magnifying-glass-plus" href="/platform/api-reference/request-logs/get-log">
    **`GET /logs/{id}`**: Get full request/response details for a log entry.
  </Card>

  <Card title="Step-by-Step Execution" icon="stairs" href="/platform/api-reference/request-logs/list-step-logs">
    **`GET /logs/{id}/steps`**: See execution steps (auth, transformation, provider calls).
  </Card>

  <Card title="Platform Logs" icon="server" href="/platform/api-reference/request-logs/list-platform-logs">
    **`GET /logs/platform`**: Logs for sessions, webhooks, and other platform operations.
  </Card>
</CardGroup>

***

## MCP Endpoint

The MCP (Model Context Protocol) endpoint enables direct integration with Claude, Cursor, n8n, and other MCP-compatible clients. Most users connect via our hosted MCP server, but you can also build custom MCP integrations.

<CardGroup cols={3}>
  <Card title="Send Message" icon={<svg fill="currentColor" fillRule="evenodd" height="1em" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M15.688 2.343a2.588 2.588 0 00-3.61 0l-9.626 9.44a.863.863 0 01-1.203 0 .823.823 0 010-1.18l9.626-9.44a4.313 4.313 0 016.016 0 4.116 4.116 0 011.204 3.54 4.3 4.3 0 013.609 1.18l.05.05a4.115 4.115 0 010 5.9l-8.706 8.537a.274.274 0 000 .393l1.788 1.754a.823.823 0 010 1.18.863.863 0 01-1.203 0l-1.788-1.753a1.92 1.92 0 010-2.754l8.706-8.538a2.47 2.47 0 000-3.54l-.05-.049a2.588 2.588 0 00-3.607-.003l-7.172 7.034-.002.002-.098.097a.863.863 0 01-1.204 0 .823.823 0 010-1.18l7.273-7.133a2.47 2.47 0 00-.003-3.537z"></path><path d="M14.485 4.703a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a4.115 4.115 0 000 5.9 4.314 4.314 0 006.016 0l7.12-6.982a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a2.588 2.588 0 01-3.61 0 2.47 2.47 0 010-3.54l7.12-6.982z"></path></svg>} href="/platform/api-reference/mcp/send-mcp-json-rpc-message">
    **`POST /mcp`**
  </Card>

  <Card title="SSE Stream" icon={<svg fill="currentColor" fillRule="evenodd" height="1em" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M15.688 2.343a2.588 2.588 0 00-3.61 0l-9.626 9.44a.863.863 0 01-1.203 0 .823.823 0 010-1.18l9.626-9.44a4.313 4.313 0 016.016 0 4.116 4.116 0 011.204 3.54 4.3 4.3 0 013.609 1.18l.05.05a4.115 4.115 0 010 5.9l-8.706 8.537a.274.274 0 000 .393l1.788 1.754a.823.823 0 010 1.18.863.863 0 01-1.203 0l-1.788-1.753a1.92 1.92 0 010-2.754l8.706-8.538a2.47 2.47 0 000-3.54l-.05-.049a2.588 2.588 0 00-3.607-.003l-7.172 7.034-.002.002-.098.097a.863.863 0 01-1.204 0 .823.823 0 010-1.18l7.273-7.133a2.47 2.47 0 00-.003-3.537z"></path><path d="M14.485 4.703a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a4.115 4.115 0 000 5.9 4.314 4.314 0 006.016 0l7.12-6.982a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a2.588 2.588 0 01-3.61 0 2.47 2.47 0 010-3.54l7.12-6.982z"></path></svg>} href="/platform/api-reference/mcp/open-mcp-sse-stream">
    **`GET /mcp/sse`**
  </Card>

  <Card title="End Session" icon={<svg fill="currentColor" fillRule="evenodd" height="1em" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M15.688 2.343a2.588 2.588 0 00-3.61 0l-9.626 9.44a.863.863 0 01-1.203 0 .823.823 0 010-1.18l9.626-9.44a4.313 4.313 0 016.016 0 4.116 4.116 0 011.204 3.54 4.3 4.3 0 013.609 1.18l.05.05a4.115 4.115 0 010 5.9l-8.706 8.537a.274.274 0 000 .393l1.788 1.754a.823.823 0 010 1.18.863.863 0 01-1.203 0l-1.788-1.753a1.92 1.92 0 010-2.754l8.706-8.538a2.47 2.47 0 000-3.54l-.05-.049a2.588 2.588 0 00-3.607-.003l-7.172 7.034-.002.002-.098.097a.863.863 0 01-1.204 0 .823.823 0 010-1.18l7.273-7.133a2.47 2.47 0 00-.003-3.537z"></path><path d="M14.485 4.703a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a4.115 4.115 0 000 5.9 4.314 4.314 0 006.016 0l7.12-6.982a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a2.588 2.588 0 01-3.61 0 2.47 2.47 0 010-3.54l7.12-6.982z"></path></svg>} href="/platform/api-reference/mcp/delete-mcp-session">
    **`DELETE /mcp/session`**
  </Card>
</CardGroup>

<Info>
  For most use cases, use our [hosted MCP server](/mcp/quickstart) at `https://api.stackone.com/mcp` instead of building a custom integration.
</Info>

***

## Proxy Requests

Bypass the unified layer and make raw requests directly to provider APIs. Useful when you need provider-specific functionality not covered by StackOne actions.

<Card title="Proxy Request" icon="arrows-left-right" href="/platform/api-reference/proxy/proxy-request">
  **`POST /proxy`**: Forward requests to the provider API. StackOne handles authentication.
</Card>

```bash theme={null}
curl -X POST "https://api.stackone.com/proxy" \
  -u "$STACKONE_API_KEY:" \
  -H "x-account-id: customer-bamboohr" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "GET",
    "path": "/api/gateway.php/mycompany/v1/reports/custom"
  }'
```

<Warning>
  Proxy requests bypass StackOne's unified data model. Use them sparingly for edge cases not covered by standard actions.
</Warning>

***

## Platform API vs Unified APIs

| I want to...                           | Use                                             |
| -------------------------------------- | ----------------------------------------------- |
| Execute actions from my agent/backend  | **Platform API** → `POST /actions/rpc`          |
| List all my end-users' linked accounts | **Platform API** → `GET /accounts`              |
| Generate an onboarding link            | **Platform API** → `POST /connect_sessions`     |
| List employees from BambooHR           | **Unified API** → `GET /unified/hris/employees` |
| Create a job posting in Greenhouse     | **Unified API** → `POST /unified/ats/jobs`      |
| Query CRM contacts                     | **Unified API** → `GET /unified/crm/contacts`   |

<Tip>
  **Rule of thumb:** Use the **Platform API** for managing StackOne itself (accounts, sessions, actions). Use **Unified APIs** when you want direct REST access to provider data with a standardized schema.
</Tip>

***

## Get Started

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/api/authentication">
    Set up your API key and learn the auth format
  </Card>

  <Card title="Try Actions RPC" icon="bolt" href="/platform/api-reference/actions/make-an-rpc-call-to-an-action">
    Execute your first action
  </Card>

  <Card title="Explore in Playground" icon="flask" href="https://app.stackone.com/playground">
    Test actions with natural language
  </Card>

  <Card title="View All Endpoints" icon="book" href="/platform/api-reference/accounts/list-accounts">
    Browse the full API reference
  </Card>
</CardGroup>
