POST
/organization/projects/{project_id}/hosted_tool_permissionsUpdate hosted tool permissions for a project
Updates the hosted tool permissions for a project. Supply settings for the tools you want to change using file_search, web_search, image_generation, mcp, or code_interpreter. The response returns the project's resulting permission states.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
project_idstringrequired
The ID of the project.
Hosted tool permission settings to update; supply settings for the tools you want to change.
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.
200Returns the project's permission states for file search, web search, image generation, MCP, and code interpreter.
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.
400Returned when the hosted tool permission request is invalid.
errorobjectrequired
403Returned when the caller does not have permission to perform this operation.
errorobjectrequired
Details about the permission error.
404Returned when the project was not found.
errorobjectrequired
409Returned when a requested project setting conflicts with organization policy.
errorobjectrequired
429Returned when the management request rate is exceeded.
errorobjectrequired
Error handling
A 400 is returned when the permission request is invalid, a 403 when the caller lacks permission, a 404 when the project is not found, a 409 when a requested setting conflicts with organization policy, and a 429 when the management request rate is exceeded. The project_id path parameter identifies the project. Each supplied permission setting must include an enabled boolean.