---
title: "Update API resource roles for application"
method: PUT
path: "/api/applications/{applicationId}/roles"
tags: ["Applications"]
---

# Update API resource roles for application

`PUT /api/applications/{applicationId}/roles`

Update API resource roles assigned to the specified application. This will replace the existing API resource roles.

## Path parameters

- `applicationId` string, required

## Request body

- object
  - `roleIds` string[], required — An array of API resource role IDs to update for the application.

## Response `200`

The API resource roles have been updated for the application successfully.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Unprocessable Content

---

[API](https://skmtc.net/logto/apis/logto-api-references.md) · [All operations](https://skmtc.net/logto/apis/logto-api-references/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/logto/logto-api-references/versions/a163dc77d842/schema)
