Remove Member
curl --request DELETE \
--url https://api.bunship.com/api/v1/organizations/{orgId}/members/{memberId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bunship.com/api/v1/organizations/{orgId}/members/{memberId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bunship.com/api/v1/organizations/{orgId}/members/{memberId}', 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.bunship.com/api/v1/organizations/{orgId}/members/{memberId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.bunship.com/api/v1/organizations/{orgId}/members/{memberId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.bunship.com/api/v1/organizations/{orgId}/members/{memberId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bunship.com/api/v1/organizations/{orgId}/members/{memberId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Member removed successfully"
}
Members
Remove Member
Remove a member from the organization
DELETE
/
api
/
v1
/
organizations
/
{orgId}
/
members
/
{memberId}
Remove Member
curl --request DELETE \
--url https://api.bunship.com/api/v1/organizations/{orgId}/members/{memberId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bunship.com/api/v1/organizations/{orgId}/members/{memberId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bunship.com/api/v1/organizations/{orgId}/members/{memberId}', 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.bunship.com/api/v1/organizations/{orgId}/members/{memberId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.bunship.com/api/v1/organizations/{orgId}/members/{memberId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.bunship.com/api/v1/organizations/{orgId}/members/{memberId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bunship.com/api/v1/organizations/{orgId}/members/{memberId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Member removed successfully"
}
Removes a member from the organization. You cannot remove the organization owner (transfer ownership first) or yourself (use “leave organization” instead). Requires the
members:remove permission.
Auth
Requires a valid Bearer token with
members:remove permission.Path Parameters
string
required
Organization identifier.
string
required
Membership identifier of the member to remove.
Response
string
Confirmation message.
{
"message": "Member removed successfully"
}
Errors
| Status | Code | Description |
|---|---|---|
400 | VALIDATION_ERROR | Cannot remove the owner or yourself |
401 | AUTHENTICATION_ERROR | Missing or invalid Bearer token |
403 | AUTHORIZATION_ERROR | Insufficient permissions (members:remove required) |
404 | NOT_FOUND | Member not found in this organization |
Example
curl -X DELETE https://api.bunship.com/api/v1/organizations/org_cld2abc123def456/members/mbr_def456 \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."

