# Replace organization application roles **PUT /api/organizations/{id}/applications/{applicationId}/roles** Replace all roles associated with the application in the organization with the given data. ## Servers - Logto endpoint address.: https://[tenant_id].logto.app (Logto endpoint address.) ## Authentication methods - O auth2 ## Parameters ### Path parameters - **id** (string) The unique identifier of the organization. - **applicationId** (string) The unique identifier of the application. ### Body: application/json (object) - **organizationRoleIds** (array[string]) An array of role IDs to replace existing roles. ## Responses ### 204 The roles were replaced successfully. ### 400 Bad Request ### 401 Unauthorized ### 403 Forbidden ### 422 The roles could not be replaced. Some of the roles may not exist. [Powered by Bump.sh](https://bump.sh)