Skip to content
Ona Docs

DeleteOrganization

client.Organizations.Delete(ctx, body) (*OrganizationDeleteResponse, error)
POST/gitpod.v1.OrganizationService/DeleteOrganization

Permanently deletes an organization.

Use this method to:

  • Remove unused organizations
  • Clean up test organizations
  • Complete organization migration

Examples

  • Delete organization:

    Permanently removes an organization and all its data.

    organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
ParametersExpand Collapse
body OrganizationDeleteParams
OrganizationID param.Field[string]

organization_id is the ID of the organization to delete

formatuuid
ReturnsExpand Collapse
type OrganizationDeleteResponse interface{…}

DeleteOrganization

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"),
  )
  organization, err := client.Organizations.Delete(context.TODO(), gitpod.OrganizationDeleteParams{
    OrganizationID: gitpod.F("b0e12f6c-4c67-429d-a4a6-d9838b5da047"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", organization)
}
{}
Returns Examples
{}