Delete users from an organization

1 minute read

Use this endpoint to delete a specific user from an organization. This action permanently revokes all of the user’s CloudBees platform access, including access to all applications, environments, and teams within an organization.

To manage or perform organization-scoped API calls, you need the UUID (organizationId) for your target organization. You can obtain this UUID through the CloudBees platform UI. Refer to Organizations and sub-organizations.

Delete a user from an organization

This endpoint is commonly used during offboarding workflows to ensure a user’s access is fully revoked when they leave the organization.

Endpoint
DELETE /v3/organizations/{orgId}/user/{userId}

Parameters

Parameter name In Type Required? Description

organizationId

path

string

Yes

The UUID of the organization that the user belongs to.

userId

path

string

Yes

The CloudBees platform internal ID for the user you want to remove.

Request body

There is no request body for this endpoint.

Responses

Status code Description

204

Success. The user was successfully removed from the organization.

403

Forbidden. The caller does not have permission to remove users.

404

The specified user or organization was not found.

Response example

This endpoint returns no content when successful (204 No Content).

Example use case

As an administrator, you want to remove a user who has left the company to ensure they no longer have access to the CloudBees platform.

curl -X DELETE \ https://api.cloudbees.com/v3/organizations/`{organizationId}`/user/`{userId}` \ -H "Authorization: Bearer `<YOUR_PAT>`"

After submitting this request, the user is fully removed from the organization, and all team memberships and scoped permissions are revoked.