---
title: "Add grants to a connection"
method: POST
path: "/v2/connections/{connectionId}/grants"
tags: ["Connections"]
---

# Add grants to a connection

`POST /v2/connections/{connectionId}/grants`

## Request

- Base URL: `https://api.sigmacomputing.com`
- URL: `https://api.sigmacomputing.com/v2/connections/{connectionId}/grants`
- Auth: HTTP bearer

Add grants to grant permissions on a connection to specific users or teams.

  ### Usage notes
  - See [Data permissions overview](https://help.sigmacomputing.com/docs/data-permissions-overview) for details about permissions that can be granted on a connection.
  - Retrieve the **connectionId** by calling the [/v2/connections](https://help.sigmacomputing.com/reference/list-connections) endpoint.
  - Specify the team or user IDs to grant permissions:

    - Retrieve the **memberId** by calling the [/v2/members](https://help.sigmacomputing.com/reference/list-members) endpoint.
    - Retrieve the **teamId** by calling the [/v2/teams](https://help.sigmacomputing.com/reference/list-teams) endpoint.

  ### Usage scenarios
  - Grant a specific team `Can use` access to a connection.

## Path parameters

- `connectionId` string, required

## Request body

- object
  - `grants` V2ConnectionsConnectionIdGrantsPostRequestBodyContentApplicationJsonSchemaGrantsItems[], required
    - `grantee` union, required
      - V2ConnectionsConnectionIdGrantsPostRequestBodyContentApplicationJsonSchemaGrantsItemsGrantee0: The UUID of the member receiving the grant
        - `memberId` string, required
      - V2ConnectionsConnectionIdGrantsPostRequestBodyContentApplicationJsonSchemaGrantsItemsGrantee1: The UUID of the team receiving the grant
        - `teamId` string, required
    - `permission` 'annotate' | 'usage', required: Connection permissions of Can Use & Annotate and Can Use.

## Response `200`

The response body.

- ConnectionsCreateConnectionGrantResponse200

---

[API](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api.md) - [All operations](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api/revisions/fb6036208c49?raw)
