---
schema_version: "1"
id: d446e72a23a7fa17a686c6be5fae730190d2709911f749d8cedd47f0803214e6
title: POST /hub/v1/workflowitems/{workflowItemId}/roles/{workflowRoleI...
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-apis/createWorkflowTeamUser.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/references/mc_rest_workflowteams/createWorkflowTeamUser.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 88ba4b79fc804f8aa8357391cc1b74d6dc8e1482014b0e21654b5cbfab687e75
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# POST /hub/v1/workflowitems/{workflowItemId}/roles/{workflowRoleI...

Creates a user role to assign to a workflow role.

## URL Parameters

| Name                       | Type   |            | Description                       |
| -------------------------- | ------ | ---------- | --------------------------------- |
| **workflowRoleInstanceId** | string | `Required` | Id of the workflow role instance. |
| workflowItemId             | string | `Required` | Id of the workflow item           |

## JSON Parameters

| Name         | Type   |            | Description                      |
| ------------ | ------ | ---------- | -------------------------------- |
| **userId**   | string | `Required` | Id of the user to be added       |
| **userName** | string | `Required` | Username of the user to be added |

## Responses

| Status  | Name                       | Type   | Description                                                      |
| ------- | -------------------------- | ------ | ---------------------------------------------------------------- |
| **200** | &nbsp;                     | &nbsp; | **Response contains a list of workflow teams just created.**     |
| &nbsp;  | workflowRoleInstanceUserId | string | Id of the newly created record in WorkflowRoleInstanceUser table |
| &nbsp;  | workflowItemId             | string | Id of the workflow item                                          |
| &nbsp;  | workflowRoleInstanceId     | string | Id of the WorkflowRoleInstance record                            |
| &nbsp;  | userId                     | string | Id of the user                                                   |
| &nbsp;  | memberId                   | string | MID the user belongs to                                          |
| &nbsp;  | enterpriseId               | string | EID the user’s MID belongs to                                    |
| &nbsp;  | modifiedBy                 | string | MemberId that created the record                                 |
| &nbsp;  | &nbsp;                     | &nbsp; | &nbsp;                                                           |
| **400** | &nbsp;                     | &nbsp; | **400 Bad Request**                                              |
| &nbsp;  | message                    | string | UserId is required.                                              |
| &nbsp;  | errorcode                  | string | Error code for the exception (10002)                             |
| &nbsp;  | &nbsp;                     | &nbsp; | &nbsp;                                                           |
| **403** | &nbsp;                     | &nbsp; | **403 Unauthorized**                                             |
| &nbsp;  | message                    | string | Insufficient Privileges.                                         |
| &nbsp;  | errorcode                  | string | Error code for the exception (20002)                             |
| &nbsp;  | &nbsp;                     | &nbsp; | &nbsp;                                                           |
| **404** | &nbsp;                     | &nbsp; | **404 Not Found**                                                |
| &nbsp;  | message                    | string | The UserId doesn’t exist, so the role user can’t be added.       |
| &nbsp;  | errorcode                  | string | Error code for the exception (30003)                             |
