Skip to content

Remove user from organization

DELETE
/api/v1/organizations/{organizationId}/members/{userId}
curl --request DELETE \
--url https://localhost:8080/api/v1/organizations/example/members/example \
--header 'Authorization: <Authorization>'

Remove a user from an organization and best-effort remove them from the bound IDP organization

organizationId
required
string

Organization ID or UUID (bare or urn:uuid)

userId
required
string

User UUID (bare or urn:uuid) or did:key

User removed successfully

Media type application/json

Confirmation that a user was removed from an organization, naming who was removed

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

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

Unauthorized

Media type application/json

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

Forbidden - requires Organization Owner role

Media type application/json

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

Organization, user, or membership not found

Media type application/json

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

Internal server error

Media type application/json

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}