Skip to main content
PATCH
/
workspaces
/
{wid}
/
members
/
{id}
Update member permissions
curl --request PATCH \
  --url https://api.gologin.com/workspaces/{wid}/members/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "limitedAccess": false,
  "folders": [
    {
      "name": "<string>",
      "role": {}
    }
  ]
}
'
import requests

url = "https://api.gologin.com/workspaces/{wid}/members/{id}"

payload = {
"limitedAccess": False,
"folders": [
{
"name": "<string>",
"role": {}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({limitedAccess: false, folders: [{name: '<string>', role: {}}]})
};

fetch('https://api.gologin.com/workspaces/{wid}/members/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gologin.com/workspaces/{wid}/members/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'limitedAccess' => false,
'folders' => [
[
'name' => '<string>',
'role' => [

]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.gologin.com/workspaces/{wid}/members/{id}"

payload := strings.NewReader("{\n \"limitedAccess\": false,\n \"folders\": [\n {\n \"name\": \"<string>\",\n \"role\": {}\n }\n ]\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://api.gologin.com/workspaces/{wid}/members/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"limitedAccess\": false,\n \"folders\": [\n {\n \"name\": \"<string>\",\n \"role\": {}\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.gologin.com/workspaces/{wid}/members/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"limitedAccess\": false,\n \"folders\": [\n {\n \"name\": \"<string>\",\n \"role\": {}\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "email": "<string>",
  "role": {},
  "limitedAccess": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "permissions": {
    "kickMember": true,
    "manageWorkspaceWideAccess": true,
    "manageWorkspaceWideAdminAccess": true,
    "viewMember": true
  },
  "user": "<string>",
  "folders": [
    {
      "name": "<string>",
      "role": {},
      "permissions": {
        "manageAccess": true,
        "manageAdminAccess": true
      }
    }
  ],
  "joined": true,
  "invitedByEmail": "<string>",
  "lastActiveAt": "2023-11-07T05:31:56Z",
  "workspaceVisited": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

wid
string
required

Workspace ID

id
string
required

Member ID

Body

application/json
limitedAccess
boolean
required

If true, the member will have access only to a particular folder.

Example:

false

role
enum<string>
required

Role of the member.

Available options:
owner,
admin,
editor,
guest
folders
object[]

Folders that the member will have access to. Need to specify only if limitedAccess is true.

Response

200 - application/json
id
string
required
email
string
required
role
object
required
limitedAccess
boolean
required
createdAt
string<date-time>
required
permissions
object
required
user
string
folders
object[]
joined
boolean
invitedByEmail
string
lastActiveAt
string<date-time>
workspaceVisited
boolean