---
title: "POST /role_user_assignments/"
method: POST
path: "/role_user_assignments/"
tags: ["role_user_assignments"]
---

# POST /role_user_assignments/

`POST /role_user_assignments/`

Create a RoleUserAssignment.

## Request body

- RoleUserAssignmentCreate
  - `object_id` string, nullable — Primary key of the object this assignment applies to, null value indicates system-wide assignment
  - `object_ansible_id` string, uuid, nullable — Resource id of the object this role applies to. Alternative to the object_id field.
  - `role_definition` integer, required — The role definition which defines permissions conveyed by this assignment
  - `user` integer
  - `user_ansible_id` string, uuid, nullable — Resource id of the user who will receive permissions from this assignment. Alternative to user field.

## Response `201`

Return a created RoleUserAssignment.

- RoleUserAssignment
  - `id` integer, required
  - `url` string, required
  - `related` object, required
  - `summary_fields` object, required
  - `created` string, date-time, required — The date/time this resource was created
  - `created_by` integer, nullable, required — The user who created this resource
  - `content_type` 'eda.activation' | 'eda.auditrule' | 'eda.decisionenvironment' | 'eda.edacredential' | 'eda.eventstream' | 'eda.project' | 'eda.rulebook' | 'eda.rulebookprocess' | 'shared.organization' | 'shared.team', required — * `eda.activation` - Activation * `eda.auditrule` - Audit Rule * `eda.decisionenvironment` - Decision Environment * `eda.edacredential` - Eda Credential * `eda.eventstream` - Event Stream * `eda.project` - Project * `eda.rulebook` - Rulebook * `eda.rulebookprocess` - Rulebook Process * `shared.organization` - Organization * `shared.team` - Team
  - `object_id` string, nullable — Primary key of the object this assignment applies to, null value indicates system-wide assignment
  - `object_ansible_id` string, uuid, nullable — Resource id of the object this role applies to. Alternative to the object_id field.
  - `role_definition` integer, required — The role definition which defines permissions conveyed by this assignment
  - `user` integer
  - `user_ansible_id` string, uuid, nullable — Resource id of the user who will receive permissions from this assignment. Alternative to user field.

## Changes

- **2026-07-17** `c04fc5f09692` — 2 breaking, 1 warning, 7 info
  - the response property `object_ansible_id` became nullable for the status `201`
  - the response property `user_ansible_id` became nullable for the status `201`
  - added the new `eda.eventstream` enum value to the `content_type/allOf[#/components/schemas/ContentTypeEnum]/` response property for the response status `201`
  - the request property `object_ansible_id` became nullable (media type: application/json)
  - …6 more
- **2024-04-29** `feeac1db5ade` — 1 info
  - removed the `eda.extravar` enum value from the `content_type/allOf[#/components/schemas/ContentTypeEnum]/` response property for the response status `201`
- **2024-04-23** `cbf68ddd9760` — 1 info
  - endpoint added
- **2023-04-25** `62d33b790834` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/ansible/apis/event-driven-ansible-api/changes/role_user_assignments/post.md)

---

[API](https://skmtc.dev/ansible/apis/event-driven-ansible-api.md) · [All operations](https://skmtc.dev/ansible/apis/event-driven-ansible-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ansible/event-driven-ansible-api/revisions/c04fc5f09692/schema)
