Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation
Theme

Delete organization role

admin.organization.roles.delete(role_id) -> RoleDeleteResponse { id, deleted, object }
DELETE
/organization/roles/{role_id}

Deletes a custom role from the organization.

Delete organization role

require "openai"

openai = OpenAI::Client.new(admin_api_key: "My Admin API Key")

role = openai.admin.organization.roles.delete("role_id")

puts(role)
Response example
{
    "object": "role.deleted",
    "id": "role_01J1F8ROLE01",
    "deleted": true
}
Parameters
role_id: String
Returns
class RoleDeleteResponse { id, deleted, object }

Confirmation payload returned after deleting a role.

id: String

Identifier of the deleted role.

deleted: bool

Whether the role was deleted.

object: :"role.deleted"

Always role.deleted.

Returns Examples
Response example
{
    "object": "role.deleted",
    "id": "role_01J1F8ROLE01",
    "deleted": true
}