Sample - OpenAI API
POST/organization/projects/{project_id}/hosted_tool_permissions

Modify project hosted tool permissions

Updates the hosted tool permissions configured for a project. Supply any permission updates you want to change, using an object with an enabled boolean or null to clear each selected permission.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter · 5 body fields
project_idstringrequired
The unique identifier of the project whose hosted tool permissions to update.

Hosted tool permission updates for a project; each property can be set to an object containing enabled or to null.

file_searchobjectoptional
The file search permission update.
web_searchobjectoptional
The web search permission update.
image_generationobjectoptional
The image generation permission update.
mcpobjectoptional
The MCP permission update.
code_interpreterobjectoptional
The code interpreter permission update.

1 status code
200Returns the updated project hosted tool permissions, including an `enabled` boolean for each hosted tool.
file_searchobjectrequired
Permission state for a single hosted tool on a project.
web_searchobjectrequired
Permission state for a single hosted tool on a project.
image_generationobjectrequired
Permission state for a single hosted tool on a project.
mcpobjectrequired
Permission state for a single hosted tool on a project.
code_interpreterobjectrequired
Permission state for a single hosted tool on a project.

Error handling

project_id must identify the project to update. Each supplied permission must be either null or an object containing the enabled boolean.