Skip to content
Last updated

Update a member's role and/or status.

PUT/v1/organizations/{organization_id}/users/{user_id}

organization_id string required

Organization ID

user_id string required

User ID (usr_...) or OrganizationUser ID (orgusr_...) of the member to update

Request Body

role_id string optional

New role ID

status_id string optional

New status ID

At least one of role_id or status_id must be provided.

Returns

Returns the updated member object.

Notes

  • Creates an audit log entry
  • Cannot change organization owner's role
  • Cannot set owner to inactive status

Authorization

Requires Admin or Owner role.

Bash
curl -X PUT https://api.aitronos.com/v1/organizations/org_abc123/users/usr_xyz789 \
  -H "X-API-Key: $FREDDY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "role_id": "role_abc123",
    "status_id": "status_xyz789"
  }'

Response:

{
  "id": "orguser_abc123",
  "user_id": "usr_xyz789",
  "organization_id": "org_def456",
  "full_name": "John Doe",
  "email": "john@example.com",
  "username": "johndoe",
  "role": {
    "id": "role_abc123",
    "name": "Member"
  },
  "status": {
    "id": "status_xyz789",
    "name": "Active",
    "selectable_in_ui": true
  },
  "joined_at": "2025-01-15T10:30:00Z",
  "created_at": "2025-01-15T10:30:00Z",
  "last_modified_at": "2025-01-20T14:45:00Z"
}