---
title: "Replace organization JIT default roles"
method: PUT
path: "/api/organizations/{id}/jit/roles"
tags: ["Organizations"]
---

# Replace organization JIT default roles

`PUT /api/organizations/{id}/jit/roles`

Replace all organization roles that will be assigned to users during just-in-time provisioning with the given data.

## Path parameters

- `id` string, required

## Request body

- object
  - `organizationRoleIds` string[], required — An array of organization role IDs to replace existing organization roles.

## Response `204`

The organization roles were replaced successfully.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `422` — The organization roles could not be replaced. Some of the organization roles may not exist.

---

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