---
agentTools:
  projectIndex: https://developers.pipefy.com/llms.txt
---

# Enable a Platform App

Enable a Platform App on a pipe or database via the GraphQL API.

## Before You Begin

🔗 **Use the [GraphQL Playground](https://app.pipefy.com/graphiql)** to execute the queries in this guide.

➡️ **New to GraphQL?** Learn how to navigate the Playground with our **[Playground Basics Guide](https://developers.pipefy.com/reference/exploring-the-playground)**.

## Why this use case

Platform Apps extend pipes and databases with additional features (buttons, card tabs, attachments). Use this mutation to programmatically enable an app on a repo — for example when provisioning new pipes from a template.

***

## Prerequisites

1. **Authentication**: Use a [Service Account token](https://developers.pipefy.com/reference/service-accounts) (Personal Access Tokens are deprecated).
2. **Permissions**: Your token must be able to manage the target pipe or database.
3. **Opt-in**: Some apps require the user to accept their terms. Pass `optedIn: true` to confirm acceptance; otherwise apps whose manifest requires opt-in are not enabled.
4. **IDs**: See our [Get resource IDs page](https://developers.pipefy.com/reference/get-resource-ids) for how to find the `repoId` (pipe or database ID). The `appId` is the Platform App identifier (SUID) provided when the app is registered — there is currently no public API query to list available apps.

## Step 1: Run the mutation

```graphql
mutation EnablePlatformApp($repoId: ID!, $appId: ID!, $optedIn: Boolean) {
  enablePlatformApp(input: { repoId: $repoId, appId: $appId, optedIn: $optedIn }) {
    platformApp {
      id
      name
    }
  }
}
```

### Variables

```json
{
  "repoId": "301234567",
  "appId": "app-suid-123",
  "optedIn": true
}
```

## Step 2: Check the response

```json
{
  "data": {
    "enablePlatformApp": {
      "platformApp": {
        "id": "app-suid-123",
        "name": "App"
      }
    }
  }
}
```

### Returned fields

| Field              | Description                                         |
| ------------------ | --------------------------------------------------- |
| `platformApp.id`   | The Platform App identifier (SUID) that was enabled |
| `platformApp.name` | The Platform App name                               |

## Implementation notes

* `repoId` accepts a pipe or database ID; `appId` is the Platform App identifier.
* Apps gated by a feature flag can only be enabled when the flag is active for the organization — otherwise the mutation returns an `enabled app` error.
* When the app's manifest declares opt-in as required and `optedIn` is not `true`, the mutation returns an error asking the user to opt in.