OpenAI Roles API

The Roles API from OpenAI — 4 operation(s) for roles.

Business capability
Identity & Access Management BC-620.20

Operations 8

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /organization/roles List the organization's roles · Lists the roles configured for the organization #
Ask an LLM
“Which roles are configured at the organization level?”
“Can I see the custom organization roles we've defined?”
Tell an agent
List the organization roles.
Show {limit} organization-wide roles ordered {order}.
POST /organization/roles Create a custom organization role · Creates a custom role for the organization #
Ask an LLM
“How do I define a custom role for my whole organization?”
“Which permissions can I bundle into a new organization role?”
Tell an agent
Create an organization role {role_name} with permissions {permissions}.
Add org-wide role {role_name} granting {permissions}, described as {description}.
POST /organization/roles/{role_id} Update an organization role · Updates an existing organization role #
Ask an LLM
“Can I change the permissions on an existing organization role?”
“Is it possible to rename a custom role at the org level?”
Tell an agent
Set organization role {role_id}'s permissions to {permissions}.
Rename organization role {role_id} to {role_name}.
DELETE /organization/roles/{role_id} Delete a custom organization role · Deletes a custom role from the organization #
Ask an LLM
“How do I remove a custom role from the organization?”
“Can I delete an organization role we no longer use?”
Tell an agent destructive · confirm first
Delete organization role {role_id}.
Remove custom org role {role_id}.
GET /projects/{project_id}/roles List the roles in a project · Lists the roles configured for a project #
Ask an LLM
“Which roles are defined inside a particular project?”
“Can I see the custom roles available in one project?”
Tell an agent
List the roles in project {project_id}.
Show {limit} roles configured for project {project_id}.
POST /projects/{project_id}/roles Create a custom role in a project · Creates a custom role for a project #
Ask an LLM
“How do I create a role that only applies within one project?”
“Can a project have its own custom set of permissions?”
Tell an agent
Create role {role_name} in project {project_id} with permissions {permissions}.
Add a project-scoped role {role_name} to {project_id} granting {permissions}.
POST /projects/{project_id}/roles/{role_id} Update a role in a project · Updates an existing project role #
Ask an LLM
“Can I change what a project-level role is allowed to do?”
“Is it possible to rename a role inside a project?”
Tell an agent
Set role {role_id} in project {project_id} to permissions {permissions}.
Rename project {project_id}'s role {role_id} to {role_name}.
DELETE /projects/{project_id}/roles/{role_id} Delete a custom role from a project · Deletes a custom role from a project #
Ask an LLM
“How do I delete a custom role from a single project?”
“Can I remove a project role that nobody uses anymore?”
Tell an agent destructive · confirm first
Delete role {role_id} from project {project_id}.
Remove project {project_id}'s custom role {role_id}.

Documentation

📖
Documentation
https://platform.openai.com/docs/assistants/overview
📖
Documentation
https://platform.openai.com/docs/api-reference/assistants
📖
Documentation
https://platform.openai.com/docs/guides/text-to-speech
📖
Documentation
https://platform.openai.com/docs/api-reference/audio
📖
Documentation
https://platform.openai.com/docs/guides/speech-to-text
📖
Documentation
https://developers.openai.com/api/docs/guides/audio/
📖
Documentation
https://developers.openai.com/api/docs/guides/voice-agents/
📖
Documentation
https://platform.openai.com/docs/api-reference/chat
📖
Documentation
https://platform.openai.com/docs/guides/embeddings
📖
Documentation
https://platform.openai.com/docs/api-reference/embeddings
📖
Documentation
https://platform.openai.com/docs/api-reference/files
📖
Documentation
https://platform.openai.com/docs/guides/fine-tuning
📖
Documentation
https://platform.openai.com/docs/api-reference/fine-tuning
📖
Documentation
https://platform.openai.com/docs/guides/images
📖
Documentation
https://platform.openai.com/docs/api-reference/images
📖
Documentation
https://platform.openai.com/docs/guides/image-generation
📖
Documentation
https://platform.openai.com/docs/guides/images-vision
📖
Documentation
https://platform.openai.com/docs/models
📖
Documentation
https://platform.openai.com/docs/api-reference/models
📖
Documentation
https://platform.openai.com/docs/assistants/how-it-works/managing-threads-and-messages
📖
Documentation
https://platform.openai.com/docs/api-reference/threads
📖
Documentation
https://platform.openai.com/docs/api-reference/completions

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/openai-roles-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

openai-roles-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OpenAI Roles API
  description: The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.
  version: 2.3.0
  termsOfService: https://openai.com/policies/terms-of-use
  contact:
    name: OpenAI Support
    url: https://help.openai.com/
  license:
    name: MIT
    url: https://github.com/openai/openai-openapi/blob/master/LICENSE
servers:
- url: https://api.openai.com/v1
security:
- ApiKeyAuth: []
tags:


# --- truncated at 32 KB (54 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/openai/refs/heads/main/openapi/openai-roles-api-openapi.yml