## Delete organization role

`client.Admin.Organization.Roles.Delete(ctx, roleID) (*AdminOrganizationRoleDeleteResponse, error)`

**delete** `/organization/roles/{role_id}`

Deletes a custom role from the organization.

### Parameters

- `roleID string`

### Returns

- `type AdminOrganizationRoleDeleteResponse struct{…}`

  Confirmation payload returned after deleting a role.

  - `ID string`

    Identifier of the deleted role.

  - `Deleted bool`

    Whether the role was deleted.

  - `Object RoleDeleted`

    Always `role.deleted`.

    - `const RoleDeletedRoleDeleted RoleDeleted = "role.deleted"`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/openai/openai-go"
  "github.com/openai/openai-go/option"
)

func main() {
  client := openai.NewClient(
    option.WithAdminAPIKey("My Admin API Key"),
  )
  role, err := client.Admin.Organization.Roles.Delete(context.TODO(), "role_id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", role.ID)
}
```

#### Response

```json
{
  "id": "id",
  "deleted": true,
  "object": "role.deleted"
}
```
