Skip to main content
POST
/
api
/
v1
/
projects
/
{projectId}
/
memberships
/
groups
/
{groupId}
cURL
curl --request POST \
  --url https://us.infisical.com/api/v1/projects/{projectId}/memberships/groups/{groupId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "role": "no-access",
  "roles": [
    {
      "role": "<string>",
      "isTemporary": false
    }
  ]
}
'
{
  "groupMembership": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "group": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "slug": "<string>",
      "orgId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    },
    "roles": [
      {
        "id": "<string>",
        "role": "<string>",
        "isTemporary": true,
        "customRoleId": "<string>",
        "customRoleName": "<string>",
        "customRoleSlug": "<string>",
        "temporaryMode": "<string>",
        "temporaryRange": "<string>",
        "temporaryAccessStartTime": "2023-11-07T05:31:56Z",
        "temporaryAccessEndTime": "2023-11-07T05:31:56Z",
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z"
      }
    ],
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}
Adds a group to the project with the given role(s).

Authorizations

Authorization
string
header
required

An access token in Infisical

Path Parameters

projectId
string
required
groupId
string<uuid>
required

Body

application/json
role
string
default:no-access
Minimum string length: 1
roles
object[]

Response

Default Response

groupMembership
object
required