Overview
Updates the role/access level of an existing user in your account. This allows you to change a user’s permissions without removing and re-adding them.Purpose
Role Management
- Change User Permissions: Update user access levels
- Role Transitions: Promote or demote users
- Permission Updates: Modify user capabilities
- Access Control: Adjust user access as needed
User Administration
- Flexible Management: Change roles without re-inviting
- Permission Adjustments: Fine-tune user access
- Role Changes: Handle role transitions smoothly
- Access Updates: Update user permissions dynamically
Path Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
shared-user-id | integer | Yes | ID of the shared user to update | 479 |
Request Body (Form Data)
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
access_level | string | Yes | New access level ID | "2" |
Access Level Options
Default Roles
- Manager (ID: 1): Can create, edit, and manage QR codes
- Admin (ID: 2): Full access including user management
- Viewer (ID: 3): Read-only access to QR codes and analytics
Custom Roles
- Custom IDs: Use custom role IDs created in your account
- Specific Permissions: Custom roles with tailored permissions
- Flexible Access: Create roles for specific use cases
Examples
Promote User to Admin
Change User to Viewer Role
Assign Custom Role
Response
Success Response (200 OK)
Role Change Scenarios
Promotion Scenarios
- Viewer → Manager: Give user ability to create and edit QR codes
- Manager → Admin: Give user full access including user management
- Any Role → Custom: Assign specific custom role
Demotion Scenarios
- Admin → Manager: Remove user management capabilities
- Manager → Viewer: Make user read-only
- Any Role → Custom: Assign more restrictive custom role
Lateral Changes
- Manager → Different Manager: Change to different manager role
- Custom → Custom: Switch between custom roles
- Any Role → Equivalent: Change to equivalent role with different permissions
Integration Examples
JavaScript - Role Update Form
Python - Role Management System
PHP - Role Update Interface
Error Handling
Common Errors
Invalid Access Level
User Not Found
Missing Access Level
Best Practices
Role Management
- Review Before Change: Understand current and new permissions
- Communicate Changes: Inform users of role changes
- Document Changes: Keep records of role changes
- Regular Reviews: Periodically review user roles
Security Considerations
- Principle of Least Privilege: Give users minimum required access
- Role Validation: Ensure new roles are appropriate
- Change Monitoring: Monitor role changes for security
- Access Auditing: Regular access audits
User Experience
- Clear Communication: Explain role changes to users
- Smooth Transitions: Handle role changes gracefully
- Permission Clarity: Ensure users understand their new permissions
- Support: Provide support during role transitions
When you update a user’s role, the changes take effect immediately. The user will have the new permissions the next time they access the account.
Be careful when promoting users to Admin role, as they will have full access to your account including the ability to add and remove other users.
You can use custom role IDs instead of the default role IDs (1, 2, 3) to assign users to custom roles you’ve created in your account.
Authorizations
API key authentication. Enter your API key directly in the Authorization header.
Path Parameters
ID of the shared user
Body
multipart/form-data
New access level ID for the user. Pre-defined access levels: Manager (1), Admin (2), Viewer (3)
Example:
"2"
Response
User role updated successfully
Shared user relationship ID
Example:
479
When the invitation was sent
Example:
"2023-09-11T16:28:22.227002+05:30"
When the invitation was accepted
Example:
null
Whether invitation has been sent
Example:
true
Whether invitation has been accepted
Example:
false
When the user was added
Example:
"2023-09-11T16:28:22.223671+05:30"
When the user was last modified
Example:
"2023-09-11T16:28:22.227109+05:30"
Tags assigned to the user