Remove user from organization
DELETE
/api/v1/organizations/{organizationId}/members/{userId}
const
url
=
'
https://localhost:8080/api/v1/organizations/example/members/example
'
;
const
options
= {method:
'
DELETE
'
, headers: {Authorization:
'
'
}}
;
try
{
const
response
= await
fetch
(url
,
options);
const
data
= await
response
.
json
();
console
.
log
(data);
}
catch
(error) {
console
.
error
(error);
}
curl
--request
DELETE
\
--url
https://localhost:8080/api/v1/organizations/example/members/example
\
--header
'
Authorization:
'
Remove a user from an organization and best-effort remove them from the bound IDP organization
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”
organizationId
required
string
Organization ID (integer)
userId
required
string
User ID (UUID)
Responses
Section titled “ Responses ”User removed successfully
Media type
application/json
object
message
string
organizationId
integer
userId
string
Example
{
"message"
:
"
User removed from organization successfully
"
,
"organizationId"
:
123
,
"userId"
:
"
550e8400-e29b-41d4-a716-446655440000
"
}
Invalid request
Media type
application/json
object
error
string
error_description
string
Example
{
"error"
:
"
Unauthorized
"
,
"error_description"
:
"
Invalid token
"
}
Unauthorized
Media type
application/json
object
error
string
error_description
string
Example
{
"error"
:
"
Unauthorized
"
,
"error_description"
:
"
Invalid token
"
}
Forbidden - requires Organization Owner role
Media type
application/json
object
error
string
error_description
string
Example
{
"error"
:
"
Unauthorized
"
,
"error_description"
:
"
Invalid token
"
}
Membership not found
Media type
application/json
object
error
string
error_description
string
Example
{
"error"
:
"
Unauthorized
"
,
"error_description"
:
"
Invalid token
"
}
Internal server error
Media type
application/json
object
error
string
error_description
string
Example
{
"error"
:
"
Unauthorized
"
,
"error_description"
:
"
Invalid token
"
}