POST /v1beta1/policies
Create a new policy that assigns a specific role to a principal (user or group) on a resource (organization, project, etc.).Request Body
Policy creation details.
ID of the role to assign. Must be a valid role ID.
Resource identifier in the format
namespace:resource_id.Examples:app/organization:org-123- Organization resourceapp/project:proj-456- Project resourceapp/group:group-789- Group resource
Principal identifier in the format
namespace:principal_id.Examples:app/user:user-123- User principalapp/group:group-456- Group principalapp/serviceuser:sa-789- Service account principal
Optional human-readable title for the policy.
Optional metadata to associate with the policy. Can contain arbitrary key-value pairs.
Response
The newly created policy object.
Unique identifier for the created policy.
ID of the role assigned by this policy.
Resource identifier in the format
namespace:resource_id.Principal identifier in the format
namespace:principal_id.Metadata associated with the policy.
Timestamp when the policy was created.
Timestamp when the policy was last updated.
Response Example
Error Responses
Notes
- The resource and principal must use the
namespace:resource_idformat (e.g.,app/organization:org-id) - The role ID must exist and be valid
- Creating a policy generates an audit event (
policy.created) - Policies define access control by linking principals (who), resources (what), and roles (permissions)