# Create Custom Role using the api

**URL:** <https://devforum.okta.com/t/create-custom-role-using-the-api/22885>\
**Category:** API\
**Created:** [December 24, 2022, 3:54pm UTC](https://devforum.okta.com/t/create-custom-role-using-the-api/22885 "2022-12-24T15:54:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wellmaster](https://avatars.discourse-cdn.com/v4/letter/w/9d8465/32.png) [@wellmaster](https://devforum.okta.com/u/wellmaster)\
**Post date:** [December 24, 2022, 3:54pm UTC](https://devforum.okta.com/t/create-custom-role-using-the-api/22885/1 "2022-12-24T15:54:22Z")

</div>

I need to create dozens of custom roles and assign them to groups.

How can I do this using the API?

Is there a way to use a CSV to do this upload in bulk?

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [December 27, 2022, 6:21pm UTC](https://devforum.okta.com/t/create-custom-role-using-the-api/22885/2 "2022-12-27T18:21:26Z")

</div>

Are you talking about Admin Roles? If so, you can use the [/api/v1/iam/roles endpoint](https://developer.okta.com/docs/reference/api/roles/) to create and manage custom admin roles, including [assigning them to users or groups.](https://developer.okta.com/docs/reference/api/roles/#create-a-new-binding)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [February 12, 2024, 10:42pm UTC](https://devforum.okta.com/t/create-custom-role-using-the-api/22885/3 "2024-02-12T22:42:12Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
