Skip to main content
DELETE
/
v1
/
workspaces
/
{id}
/
members
/
{userId}
Remove Workspace Member
curl --request DELETE \
  --url https://api.vertracloud.app/v1/workspaces/{id}/members/{userId}
import requests

url = "https://api.vertracloud.app/v1/workspaces/{id}/members/{userId}"

response = requests.delete(url)

print(response.text)
const options = {method: 'DELETE'};

fetch('https://api.vertracloud.app/v1/workspaces/{id}/members/{userId}', 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.vertracloud.app/v1/workspaces/{id}/members/{userId}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
]);

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

curl_close($curl);

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

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

func main() {

	url := "https://api.vertracloud.app/v1/workspaces/{id}/members/{userId}"

	req, _ := http.NewRequest("DELETE", url, nil)

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

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

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.delete("https://api.vertracloud.app/v1/workspaces/{id}/members/{userId}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.vertracloud.app/v1/workspaces/{id}/members/{userId}")

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

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
{}
id
string
required
The ID of the workspace to remove the member from.
userId
string
required
The ID of the user to remove from the workspace.

Response

{}

Error Responses

code
string
The error code indicating the reason for failure. Possible values:
  • UNAUTHORIZED: The user is not authenticated.
  • ONLY_OWNER_CAN_REMOVE_MEMBERS: Only the workspace owner can remove members.
  • CANNOT_REMOVE_OWNER: The workspace owner cannot be removed.
  • MEMBER_NOT_FOUND: The specified user does not exist.
  • MEMBER_NOT_FOUND_IN_ORGANIZATION: The user is not a member of the workspace.
  • ORG_ID_MUST_BE_STRING: The provided workspace_id is not a string.
  • USER_ID_MUST_BE_STRING: The provided user ID is not a string.
message
string
A descriptive message providing additional details about the error.
{
  "code": "UNAUTHORIZED"
}
{
  "code": "ONLY_OWNER_CAN_REMOVE_MEMBERS"
}
{
  "code": "MEMBER_NOT_FOUND"
}