---
title: "Attach roles to access profile"
method: POST
path: "/api/access-profiles/{id}/roles"
tags: ["Access Profiles"]
---

# Attach roles to access profile

`POST /api/access-profiles/{id}/roles`

Attaches one or more roles. Setting `is_default: true` makes the profile the role's default
for new users. `apply_to_existing: true` provisions the profile to users already in the role.

## Path parameters

- `id` integer, required

## Request body

- object
  - `role_ids` integer[], required
  - `is_default` boolean
  - `apply_to_existing` boolean

## Response `200`

Roles attached.

- object
  - `message` string
  - `users_applied` integer

## Other responses

- `400` — Bad request
- `404` — Profile not found
- `500` — Internal server error

---

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