## DeleteProjects `client.Projects.BulkDelete(ctx, body) (*ProjectBulkDeleteResponse, error)` **post** `/gitpod.v1.ProjectService/DeleteProjects` Deletes multiple projects in a single request. Use this method to: - Remove multiple unused projects at once - Clean up projects in batch Returns successfully deleted project IDs and details about any failures. Each project in the request is processed independently — partial success is possible. ### Examples - Delete multiple projects: Permanently removes several projects in one request. ```yaml projectIds: - "b0e12f6c-4c67-429d-a4a6-d9838b5da047" - "c1f23g7d-5d78-430e-b5b7-e0949c6eb158" ``` ### Parameters - `body ProjectBulkDeleteParams` - `ProjectIDs param.Field[[]string]` ### Returns - `type ProjectBulkDeleteResponse struct{…}` - `DeletedProjectIDs []string` deleted_project_ids contains the IDs of successfully deleted projects - `FailedProjects []ProjectBulkDeleteResponseFailedProject` failed_projects contains details about projects that failed to delete - `Error string` error describes why the project deletion failed - `Index int64` index is the position in the request array (0-based) - `ProjectID string` project_id is the project ID that failed ### Example ```go package main import ( "context" "fmt" "github.com/gitpod-io/gitpod-sdk-go" "github.com/gitpod-io/gitpod-sdk-go/option" ) func main() { client := gitpod.NewClient( option.WithBearerToken("My Bearer Token"), ) response, err := client.Projects.BulkDelete(context.TODO(), gitpod.ProjectBulkDeleteParams{ ProjectIDs: gitpod.F([]string{"b0e12f6c-4c67-429d-a4a6-d9838b5da047", "c1f23g7d-5d78-430e-b5b7-e0949c6eb158"}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.DeletedProjectIDs) } ``` #### Response ```json { "deletedProjectIds": [ "string" ], "failedProjects": [ { "error": "error", "index": 0, "projectId": "projectId" } ] } ```