---
title: "Assign roles to applications in an organization"
method: POST
path: "/api/organizations/{id}/applications/roles"
tags: ["Organizations"]
---

# Assign roles to applications in an organization

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

Assign roles to applications in the specified organization.

## Path parameters

- `id` string, required

## Request body

- object
  - `applicationIds` string[], required — An array of application IDs to assign roles to.
  - `organizationRoleIds` string[], required — An array of organization role IDs to assign to the applications.

## Response `201`

Roles were assigned to the applications successfully.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `422` — At least one of the IDs provided is not valid. For example, the organization ID, application ID, or organization role ID does not exist; the application is not a member of the organization; or the role type is not assignable to the application.

---

[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)
