{"openapi":"3.1.0","info":{"title":"OpenAI roles, groups, data retention and project permissions (your admin key) API","version":"0.1.0","description":"OpenAI roles, groups, data retention and project permissions (your admin key) lets an AI assistant read your own OpenAI Admin Access data through the OpenAI Admin Access API with a key you supply (OpenAI Admin API key). Read-only: 10 tools (list_roles, get_role, list_groups, list_group_roles, get_org_data_retention, get_project_data_retention, get_project_model_permissions,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-openai-admin-access.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-openai-admin-access/docs"},"termsOfService":"https://connectorbay.com/byok-openai-admin-access/terms"},"servers":[{"url":"https://byok-openai-admin-access.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-openai-admin-access/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_roles":{"post":{"operationId":"list_roles","summary":"List the roles defined for the organization (predefined and custom) with the permissions each grants and the resource ty","description":"List the roles defined for the organization (predefined and custom) with the permissions each grants and the resource type it applies to. Needs an Admin API key. Use for \"What roles and permissions exist in my OpenAI organization\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many items to return (1 to 100).","title":"Limit"},"after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's next field, to get the following page.","title":"After"}},"title":"list_rolesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_role":{"post":{"operationId":"get_role","summary":"Get one organization role by id with its permissions and description. Needs an Admin API key. Use for \"Which permissions","description":"Get one organization role by id with its permissions and description. Needs an Admin API key. Use for \"Which permissions does a given OpenAI role grant\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"role_id":{"description":"Role id from list_roles.","maxLength":200,"title":"Role Id","type":"string"}},"required":["role_id"],"title":"get_roleArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_groups":{"post":{"operationId":"list_groups","summary":"List the organization's groups with type, creation time and whether each is managed by SCIM. Needs an Admin API key. Use","description":"List the organization's groups with type, creation time and whether each is managed by SCIM. Needs an Admin API key. Use for \"Which groups exist in my OpenAI organization\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many items to return (1 to 100).","title":"Limit"},"after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's next field, to get the following page.","title":"After"}},"title":"list_groupsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_group_roles":{"post":{"operationId":"list_group_roles","summary":"List the roles assigned to one group with their permissions. Needs an Admin API key. Use for \"What roles does an OpenAI ","description":"List the roles assigned to one group with their permissions. Needs an Admin API key. Use for \"What roles does an OpenAI group have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"group_id":{"description":"Group id from list_groups.","maxLength":200,"title":"Group Id","type":"string"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many items to return (1 to 100).","title":"Limit"},"after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's next field, to get the following page.","title":"After"}},"required":["group_id"],"title":"list_group_rolesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_org_data_retention":{"post":{"operationId":"get_org_data_retention","summary":"Show the organization's configured data retention type (for example zero data retention). Needs an Admin API key. Use fo","description":"Show the organization's configured data retention type (for example zero data retention). Needs an Admin API key. Use for \"What data retention setting does my OpenAI organization use\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_org_data_retentionArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_project_data_retention":{"post":{"operationId":"get_project_data_retention","summary":"Show a project's data retention type, or that it follows the organization default. Needs an Admin API key. Use for \"What","description":"Show a project's data retention type, or that it follows the organization default. Needs an Admin API key. Use for \"What data retention setting does my OpenAI project use\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"project_id":{"description":"Project id, for example 'proj_abc123', from the organization's project list.","maxLength":200,"title":"Project Id","type":"string"}},"required":["project_id"],"title":"get_project_data_retentionArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_project_model_permissions":{"post":{"operationId":"get_project_model_permissions","summary":"Show whether a project uses a model allowlist or denylist and which model ids it names. Needs an Admin API key. Use for ","description":"Show whether a project uses a model allowlist or denylist and which model ids it names. Needs an Admin API key. Use for \"Which models are allowed in my OpenAI project\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"project_id":{"description":"Project id, for example 'proj_abc123', from the organization's project list.","maxLength":200,"title":"Project Id","type":"string"}},"required":["project_id"],"title":"get_project_model_permissionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_project_hosted_tool_permissions":{"post":{"operationId":"get_project_hosted_tool_permissions","summary":"Show which hosted tools (code interpreter, file search, image generation, MCP, web search) are enabled for a project. Ne","description":"Show which hosted tools (code interpreter, file search, image generation, MCP, web search) are enabled for a project. Needs an Admin API key. Use for \"Is web search enabled in my OpenAI project\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"project_id":{"description":"Project id, for example 'proj_abc123', from the organization's project list.","maxLength":200,"title":"Project Id","type":"string"}},"required":["project_id"],"title":"get_project_hosted_tool_permissionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_project_roles":{"post":{"operationId":"list_project_roles","summary":"List the roles available in a project with their permissions. Needs an Admin API key. Use for \"What roles can be assigne","description":"List the roles available in a project with their permissions. Needs an Admin API key. Use for \"What roles can be assigned inside my OpenAI project\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"project_id":{"description":"Project id, for example 'proj_abc123', from the organization's project list.","maxLength":200,"title":"Project Id","type":"string"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many items to return (1 to 100).","title":"Limit"},"after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's next field, to get the following page.","title":"After"}},"required":["project_id"],"title":"list_project_rolesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_project_groups":{"post":{"operationId":"list_project_groups","summary":"List the groups that have access to a project. Needs an Admin API key. Use for \"Which groups have access to my OpenAI pr","description":"List the groups that have access to a project. Needs an Admin API key. Use for \"Which groups have access to my OpenAI project\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"project_id":{"description":"Project id, for example 'proj_abc123', from the organization's project list.","maxLength":200,"title":"Project Id","type":"string"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many items to return (1 to 100).","title":"Limit"},"after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's next field, to get the following page.","title":"After"}},"required":["project_id"],"title":"list_project_groupsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}