---
agentTools:
  projectIndex: https://docs.cancergenomicscloud.org/llms.txt
---

# Add members to a volume

This call returns the members of a specific volume. The volume is specified as `volume_id` and consists of the owner and name of a volume (for example `rfranklin/my-first-volume`).

[block:api-header]
{
  "type": "basic",
  "title": "Request"
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": "https://cgc-api.sbgenomics.com/v2/storage/volumes/{volume_id}/members",
      "language": "text",
      "name": "Path"
    }
  ]
}
[/block]

[block:api-header]
{
  "type": "basic",
  "title": "Example request",
  "sidebar": true
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": "POST /v2/storage/volumes/rfranklin/my-first-volume/members HTTP/1.1\nHost: cgc-api.sbgenomics.com\nX-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74",
      "language": "http",
      "name": null
    },
    {
      "code": "curl  -s -H \"X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74\" -H \"Content-type: application/json\" -X POST \"https://cgc-api.sbgenomics.com/storage/volumes/rfranklin/my-first-volume/members\"",
      "language": "curl",
      "name": "cURL"
    }
  ],
  "sidebar": true
}
[/block]

\###Header Fields

[block:parameters]
{
  "data": {
    "h-0": "Key",
    "h-1": "Description of value",
    "0-0": "`X-SBG-Auth-Token`\n_required_",
    "0-1": "Your CGC [authentication token](https://docs.cancergenomicscloud.org/docs/get-your-authentication-token).",
    "h-2": "",
    "1-0": "`Content-type`\n_required_",
    "1-1": "`application/json`"
  },
  "cols": 2,
  "rows": 2
}
[/block]

\###Path parameters

[block:parameters]
{
  "data": {
    "0-0": "`volume_id`\n_required_",
    "1-0": "`description`",
    "h-0": "Key",
    "h-1": "Data type of value",
    "0-1": "String",
    "1-1": "String",
    "0-2": "The volume that you want to query, which consists of username of the volume owner and volume name, for example `rfranklin/my-first-volume`.",
    "h-2": "Description of value",
    "1-2": "An optional description of this volume.",
    "2-0": "`service`\n_required_",
    "2-1": "Object",
    "2-2": "This object should contain the information about the cloud service that this volume represents.\n\nSee the <code><a href=\"http://docs.sevenbridges.com/v1.0/docs/create-a-volume-v2#section-the-service-object\">service</code> object section</a> below for an explanation of its structure."
  },
  "cols": 3,
  "rows": 1
}
[/block]

\##Request body

In the body, you should enter a list of key-value pairs. The keys and the values they take are described in the following table.

[block:parameters]
{
  "data": {
    "2-2": "Set this to `true` to grant `read` permissions or `false` to remove them. `read` permissions allow a volume member to browse the contents of the volume.",
    "3-0": "`copy`",
    "3-1": "String",
    "3-2": "Set this to `true` to grant `copy` permissions or `false` to remove them. `copy` permissions allow a volume member to import the contents of the volume to the Platform.",
    "4-0": "`write`",
    "4-1": "String",
    "4-2": "Set this to `true` to grant `write` permissions or `false` to remove them. `write` permissions allow a volume member to export files from the CGC to the volume.",
    "5-0": "`admin`",
    "5-1": "String",
    "5-2": "Set this to `true` to grant admin permissions or `false` to remove them.",
    "2-0": "`read`",
    "2-1": "String",
    "h-0": "Key",
    "h-1": "Data type",
    "h-2": "Description",
    "0-0": "`username`",
    "0-1": "String",
    "0-2": "The CGC username of the collaborator you wish to invite to your volume.",
    "1-0": "`Permissions`\n_required_",
    "1-1": "Object",
    "1-2": "This object contains information about the permissions granted to the user being added.\n\nPermissions include listing the contents of a volume, importing files from the volume to the CGC, exporting files from the CGC to the volume, and admin privileges."
  },
  "cols": 3,
  "rows": 6
}
[/block]

\##Example request body

[block:code]
{
  "codes": [
    {
      "code": "{\n  \"username\": \"crickandwatson\",\n  \"permissions\": {\n    \"read\": true,\n    \"copy\": true,\n    \"write\": false,\n    \"admin\": false\n  }\n}",
      "language": "json"
    }
  ]
}
[/block]

[block:api-header]
{
  "type": "basic",
  "title": "Response"
}
[/block]

[See a list of CGC-specific response codes that may be contained in the body of the response.](https://docs.cancergenomicscloud.org/reference/api-status-codes)

[block:api-header]
{
  "type": "basic",
  "title": "Example response body",
  "sidebar": true
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": "{\n    \"username\": \"crickandwatson\",\n    \"email\": \"crickandwatson@sbgenomics.com\",\n    \"href\": \"https://cgc-api.sbgenomics.com/v2/storage/volumes/rfranklin/my-first-volume/members/members/ece8b123-5a6e-48e9-aa9a-9871568a1e5\",\n    \"permissions\": {\n        \"write\": false,\n        \"read\": true,\n        \"copy\": false,\n        \"admin\": false\n    },\n    \"type\": \"TEAM\",\n    \"id\": \"ece8b123-5a6e-48e9-aa9a-9871568a1e5\"\n}",
      "language": "json"
    }
  ],
  "sidebar": true
}
[/block]