Skip to main content
PUT
/
api
/
adm
/
companyProjectUsers
/
{id}
Update Project User Association
curl --request PUT \
  --url https://localhost:44371/api/adm/companyProjectUsers/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "success": true,
  "code": 200,
  "errorMessage": null
}

Description

Updates existing user-project association for role promotions/demotions or permission adjustments. Changes take effect immediately.

Input

  • Path Parameter: id (guid, required) — Association identifier.
  • Body: model (CompanyProjectUserUpdateCommandRequest, required) — Updates including:
    • role (string, optional) — New role (Admin, Member, Viewer).
    • permissions (array, optional) — Updated permission list.

Output

Returns a CompanyProjectUserUpdateCommandResponse indicating update success.

Example Request

PUT /api/admin/companyProjectUsers/9d3e5f12-4a6b-4c8d-9e2f-1a3b5c7d9e0f
Content-Type: application/json
Authorization: Bearer {token}

{
  "role": "Admin",
  "permissions": ["read", "write", "delete", "manage_users"]
}

Example Response

{
  "success": true,
  "code": 200,
  "errorMessage": null
}

Errors

  • 400 Bad Request — Cannot remove last admin from project, or validation errors.
  • 404 Not Found — Association not found.

Notes

  • Each project must have at least one admin.
  • Permission changes take effect immediately.
  • All changes are audited for compliance.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

id
string<guid>
required

The unique identifier of the project user association to update.

Body

application/json

The updated association details including role or permission changes.

Represents the payload used to update a project membership for a company user.

companyProjectId
string<guid>

The identifier of the project to which the user is being assigned.

companyUserId
string<guid>

The identifier of the company user being assigned to the project.

roles
enum<string>

The project level roles granted to the user.

Available options:
None,
Admin,
User
id
string<guid>

The identifier of the project membership being updated.

Response

Returns success when the project user association is updated successfully.

Represents the response returned after updating a company project user.

success
boolean

True if the operation completed successfully; false if an error occurred.

Example:

true

code
enum<string>

Result code indicating the outcome of the operation.

Available options:
Unknown,
Success,
BadRequest,
Unauthorized,
NotFound,
Error
Example:

200

errorMessage
string | null

Human-readable error message when an error occurs.

Example:

null