---
title: "Assign role to applications"
method: POST
path: "/api/roles/{id}/applications"
tags: ["Roles"]
---

# Assign role to applications

`POST /api/roles/{id}/applications`

Assign a role to a list of applications. The role must have the type `Application`.

## Path parameters

- `id` string, required

## Request body

- object
  - `applicationIds` string[], required — An array of application IDs to be assigned.

## Response `201`

The role was assigned to the applications 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)
