POST
/organization/projects/{project_id}/model_permissionsUpdate model permissions for a project
Updates a project's model permission policy. Provide mode and model_ids to specify whether the listed models are allowed or denied. The response returns the updated policy.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
project_idstringrequired
The ID of the project.
Model permission policy to apply. Provide both mode and model_ids.
modestringrequired
The model permissions mode to apply.
model_idsarray<string>required
The model IDs included in this permissions policy.
200Returns the updated project model permission policy, including its mode and model IDs.
objectstringrequired
The object type, which is always `project.model_permissions`.
modestringrequired
Whether the project uses an allowlist or a denylist.
model_idsarray<string>required
The model IDs included in the model permissions policy.
400Returned when the model permission request is invalid or the project is archived.
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
429Returned when the management request rate is exceeded.
errorobjectrequired
Error handling
A 400 is returned when the request is invalid or the project is archived. A 403 is returned when the caller lacks permission, a 404 when the project is not found, and a 429 when the management request rate is exceeded. mode and model_ids are required, and mode must be allow_list or deny_list. The project_id path parameter identifies the project.