NAME

OpenAPI::Client::OpenAI::Path::organization-roles-role_id - Documentation for the /organization/roles/{role_id} path.

OPERATIONS

DELETE /organization/roles/{role_id}

delete-role

$client->delete_role({
    body => { ... },
});

Deletes a custom role from the organization.

Path/query parameters

  • role_id (in path, required, string) - The ID of the role to delete.

Responses

200 - Role deleted successfully.

Content-Type: application/json

Example:

{
   "deleted" : true,
   "id" : "role_01J1F8ROLE01",
   "object" : "role.deleted"
}

GET /organization/roles/{role_id}

retrieve-role

$client->retrieve_role({
    body => { ... },
});

Retrieves an organization role.

Path/query parameters

  • role_id (in path, required, string) - The ID of the role to retrieve.

Responses

200 - Role retrieved successfully.

Content-Type: application/json

Example:

{
   "description" : "Allows managing organization groups",
   "id" : "role_01J1F8ROLE01",
   "name" : "API Group Manager",
   "object" : "role",
   "permissions" : [
      "api.groups.read",
      "api.groups.write"
   ],
   "predefined_role" : false,
   "resource_type" : "api.organization"
}

POST /organization/roles/{role_id}

update-role

$client->update_role({
    body => { ... },
});

Updates an existing organization role.

Path/query parameters

  • role_id (in path, required, string) - The ID of the role to update.

Responses

200 - Role updated successfully.

Content-Type: application/json

Example:

{
   "description" : "Allows managing organization groups",
   "id" : "role_01J1F8ROLE01",
   "name" : "API Group Manager",
   "object" : "role",
   "permissions" : [
      "api.groups.read",
      "api.groups.write"
   ],
   "predefined_role" : false,
   "resource_type" : "api.organization"
}

SCHEMAS

PublicUpdateOrganizationRoleBody

Properties:

  • description (anyOf) - New description for the role.

  • permissions (anyOf) - Updated set of permissions for the role.

  • role_name (anyOf) - New name for the role.

Role

Properties:

  • description (anyOf, required) - Optional description of the role.

  • id (string, required) - Identifier for the role.

  • name (string, required) - Unique name for the role.

  • object (string, required) - Always role .

    Allowed values: role

  • permissions (array of string, required) - Permissions granted by the role.

  • predefined_role (boolean, required) - Whether the role is predefined and managed by OpenAI.

  • resource_type (string, required) - Resource type the role is bound to (for example api.organization or api.project ).

RoleDeletedResource

Properties:

  • deleted (boolean, required) - Whether the role was deleted.

  • id (string, required) - Identifier of the deleted role.

  • object (string, required) - Always role.deleted .

    Allowed values: role.deleted

SEE ALSO

OpenAPI::Client::OpenAI::Path

COPYRIGHT AND LICENSE

Copyright (C) 2023-2026 by Nelson Ferraz

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.0 or, at your option, any later version of Perl 5 you may have available.