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

# Get Devin CLI Team Permission Rules

> Read your team's account-wide Devin CLI permission rules (allow, ask, and deny) and current ETag via the API.

## Overview

Returns your team's account-wide Devin CLI permission rules — the same **Terminal Permissions** configured in [team settings](https://docs.devin.ai/cli/enterprise/team-settings.md#terminal-permissions).

The response contains only the rules explicitly saved for your team. It does not include organization, group, or user overrides.

> [!NOTE]
>
> This endpoint is in alpha (`v2alpha`). The response shape may change.

## Authentication

Pass a Devin [service user API key](https://docs.devin.ai/api-reference/authentication.md) (`cog_...`) in the `Authorization` header:

```
Authorization: Bearer <api-key>
```

The service user must have the **Use Devin Desktop** and **Windsurf admin** (`account.windsurf.admin`) permissions, which the built-in Account Admin role includes. Available on Teams and Enterprise plans. Personal tokens are rejected with `403`.

## Request

This endpoint takes no parameters or request body.

### Example Request

```bash theme={null}
curl -i https://server.codeium.com/api/v2alpha/cli-permissions \
  -H "Authorization: Bearer $DEVIN_API_KEY"
```

## Response

**allow** `string[]`

Actions Devin CLI approves automatically without prompting.

**ask** `string[]`

Actions that always prompt the user for approval.

**deny** `string[]`

Actions that are blocked.

The `ETag` response header identifies the current rule set. Pass it as `If-Match` when calling [Update CLI Permissions](https://docs.devin.ai/desktop/accounts/api-reference/update-cli-permissions.md).

See [Permission Syntax](https://docs.devin.ai/cli/reference/permissions.md#permission-syntax) for supported rule formats.

### Example Response

```json theme={null}
{
  "allow": ["Exec(git)", "Read(**)"],
  "ask": ["Fetch(domain:*)"],
  "deny": ["ExecExact(rm -rf /)"]
}
```

## Error Responses

Errors are returned as `{"error": "<message>"}`.

| Status | Cause |
| - | - |
| `401` | Missing or invalid API key, or a legacy Windsurf API key (only Devin `cog_...` service user keys are accepted) |
| `403` | Personal token used instead of a service user key, missing Devin Desktop access or `account.windsurf.admin` permission, or account is not on a Teams or Enterprise plan |
| `429` | Rate limit exceeded; retry after the `Retry-After` header |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.