# Update User

PUT https://services.leadconnectorhq.com/users/{userId}

Update User

## Authentication

Send `Authorization: Bearer <token>` using any one of:

- **Agency token: OAuth access token or Private Integration Token.** Scopes: `users.write`
- **Sub-Account token: OAuth access token or Private Integration Token.** Scopes: `users.write`

## Parameters

### Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Version` | string | Yes | API Version |

## OpenAPI Specification

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "HighLevel API",
    "version": "2021-07-28"
  },
  "servers": [
    {
      "url": "https://services.leadconnectorhq.com"
    }
  ],
  "paths": {
    "/users/{userId}": {
      "put": {
        "summary": "Update User",
        "operationId": "updateUser",
        "description": "Update User",
        "parameters": [
          {
            "name": "Version",
            "in": "header",
            "description": "API Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2021-07-28"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserSuccessfulResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedDTO"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnprocessableDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agency-Access": [
              "users.write"
            ]
          },
          {
            "Location-Access": [
              "users.write"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account.",
        "type": "http"
      },
      "Agency-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.",
        "type": "http"
      },
      "Agency-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency.",
        "type": "http"
      }
    },
    "schemas": {
      "UpdateUserDto": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "example": "John",
            "description": "First name of the user"
          },
          "lastName": {
            "type": "string",
            "example": "Deo",
            "description": "Last name of the user"
          },
          "email": {
            "type": "string",
            "example": "john@deo.com",
            "deprecated": true,
            "description": "Email update is no longer supported due to security reasons."
          },
          "password": {
            "type": "string",
            "example": "************",
            "description": "New password for the user account. All passwords will be required to meet the following criteria:\n\n- Minimum 12 characters\n- At least one uppercase letter (A–Z)\n- At least one lowercase letter (a–z)\n- At least one number (0–9)\n- At least one special character (e.g., !, @, #, $)"
          },
          "phone": {
            "type": "string",
            "example": "+18832327657",
            "description": "Phone number of the user in E.164 format"
          },
          "type": {
            "type": "string",
            "example": "account",
            "description": "User account type (account for sub-account users, agency for agency-level users)"
          },
          "role": {
            "type": "string",
            "example": "admin",
            "description": "User role within the account (admin or user)"
          },
          "companyId": {
            "type": "string",
            "description": "Company/Agency Id. Required for Agency Level access",
            "example": "UAXssdawIWAWD"
          },
          "locationIds": {
            "example": [
              "C2QujeCh8ZnC7al2InWR"
            ],
            "description": "List of sub-account location IDs the user should have access to",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "permissions": {
            "description": "User permissions controlling access to various features",
            "example": {
              "campaignsEnabled": true,
              "campaignsReadOnly": false,
              "contactsEnabled": true,
              "workflowsEnabled": true
            },
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "campaignsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether campaigns are enabled for this user"
                  },
                  "campaignsReadOnly": {
                    "type": "boolean",
                    "example": false,
                    "default": false,
                    "description": "Whether campaigns are in read-only mode for this user"
                  },
                  "contactsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether contacts are enabled for this user"
                  },
                  "workflowsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether workflows are enabled for this user"
                  },
                  "workflowsReadOnly": {
                    "type": "boolean",
                    "example": true,
                    "default": false,
                    "description": "Whether workflows are in read-only mode for this user"
                  },
                  "triggersEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether triggers are enabled for this user"
                  },
                  "funnelsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether funnels are enabled for this user"
                  },
                  "websitesEnabled": {
                    "type": "boolean",
                    "example": false,
                    "default": false,
                    "description": "Whether websites are enabled for this user"
                  },
                  "opportunitiesEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether opportunities are enabled for this user"
                  },
                  "dashboardStatsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether dashboard statistics are enabled for this user"
                  },
                  "bulkRequestsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether bulk requests are enabled for this user"
                  },
                  "appointmentsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether appointments are enabled for this user"
                  },
                  "reviewsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether reviews are enabled for this user"
                  },
                  "onlineListingsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether online listings are enabled for this user"
                  },
                  "phoneCallEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether phone calls are enabled for this user"
                  },
                  "conversationsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether conversations are enabled for this user"
                  },
                  "assignedDataOnly": {
                    "type": "boolean",
                    "example": false,
                    "default": false,
                    "description": "Whether the user can only access data assigned to them"
                  },
                  "adwordsReportingEnabled": {
                    "type": "boolean",
                    "example": false,
                    "default": false,
                    "description": "Whether AdWords reporting is enabled for this user"
                  },
                  "membershipEnabled": {
                    "type": "boolean",
                    "example": false,
                    "default": false,
                    "description": "Whether membership features are enabled for this user"
                  },
                  "facebookAdsReportingEnabled": {
                    "type": "boolean",
                    "example": false,
                    "default": false,
                    "description": "Whether Facebook Ads reporting is enabled for this user"
                  },
                  "attributionsReportingEnabled": {
                    "type": "boolean",
                    "example": false,
                    "default": false,
                    "description": "Whether attributions reporting is enabled for this user"
                  },
                  "settingsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether settings are enabled for this user"
                  },
                  "tagsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether tags are enabled for this user"
                  },
                  "leadValueEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether lead value features are enabled for this user"
                  },
                  "marketingEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether marketing features are enabled for this user"
                  },
                  "agentReportingEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether agent reporting is enabled for this user"
                  },
                  "botService": {
                    "type": "boolean",
                    "example": false,
                    "default": false,
                    "description": "Whether the bot service is enabled for this user"
                  },
                  "socialPlanner": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether the social planner is enabled for this user"
                  },
                  "bloggingEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether blogging is enabled for this user"
                  },
                  "invoiceEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether invoices are enabled for this user"
                  },
                  "affiliateManagerEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether the affiliate manager is enabled for this user"
                  },
                  "contentAiEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether Content AI is enabled for this user"
                  },
                  "refundsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether refunds are enabled for this user"
                  },
                  "recordPaymentEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether recording payments is enabled for this user"
                  },
                  "cancelSubscriptionEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether cancelling subscriptions is enabled for this user"
                  },
                  "paymentsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether payments are enabled for this user"
                  },
                  "communitiesEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether communities are enabled for this user"
                  },
                  "exportPaymentsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether exporting payments is enabled for this user"
                  }
                },
                "title": "PermissionsDto"
              }
            ]
          },
          "scopes": {
            "type": "array",
            "example": [
              "contacts.write",
              "campaigns.readonly"
            ],
            "description": "Scopes allowed for users. Only scopes that have been passed will be enabled. If passed empty all the scopes will be get disabled",
            "items": {
              "type": "string",
              "enum": [
                "campaigns.readonly",
                "campaigns.write",
                "calendars.readonly",
                "calendars/events.write",
                "calendars/groups.write",
                "calendars.write",
                "contacts.write",
                "contacts/bulkActions.write",
                "workflows.readonly",
                "workflows.write",
                "triggers.write",
                "funnels.write",
                "forms.write",
                "surveys.write",
                "quizzes.write",
                "websites.write",
                "medias.write",
                "medias.readonly",
                "opportunities.write",
                "opportunities/leadValue.readonly",
                "opportunities/bulkActions.write",
                "pipelines.create",
                "reporting/phone.readonly",
                "reporting/adwords.readonly",
                "reporting/facebookAds.readonly",
                "reporting/attributions.readonly",
                "prospecting/auditReport.write",
                "reporting/reports.readonly",
                "reporting/agent.readonly",
                "reporting/reports.write",
                "reporting/stats.export",
                "payments.write",
                "payments/records.write",
                "payments/orders.readonly",
                "payments/orders.export",
                "payments/orders.import",
                "payments/orders.collectPayment",
                "payments/subscriptions.readonly",
                "payments/subscriptions.write",
                "payments/subscriptions.update",
                "payments/subscriptions.export",
                "payments/subscriptions.pauseResumeCancel",
                "payments/subscriptions.sharePaymentMethod",
                "payments/transactions.readonly",
                "payments/transactions.export",
                "payments/transactions.import",
                "payments/transactions.refund",
                "payments/transactions.viewReceipts",
                "payments/taxesSettings.readonly",
                "payments/settings.readonly",
                "payments/taxesSettings.updateInclusiveExclusive",
                "payments/taxesSettings.manageRates",
                "payments/taxesSettings.configureAutomatic",
                "products.readonly",
                "products.write",
                "products.delete",
                "products.duplicate",
                "products.bulkActions",
                "payments/settings.write",
                "payments/settings.configureReceipt",
                "payments/settings.configureSubscription",
                "invoices.write",
                "invoices.readonly",
                "invoices/schedule.readonly",
                "invoices/schedule.write",
                "invoices/template.readonly",
                "invoices/template.write",
                "reputation/review.write",
                "reputation/listing.write",
                "reputation/reviewsAIAgents.write",
                "reputation/gbp.write",
                "conversations.write",
                "conversations.readonly",
                "conversations/message.readonly",
                "conversations/message.write",
                "contentAI.write",
                "ai-studio.readonly",
                "ai-studio.write",
                "dashboard/stats.readonly",
                "locations/tags.write",
                "locations/tags.readonly",
                "marketing.write",
                "eliza.write",
                "settings.write",
                "socialplanner/post.write",
                "socialplanner/account.readonly",
                "socialplanner/account.write",
                "socialplanner/category.readonly",
                "socialplanner/category.write",
                "socialplanner/csv.readonly",
                "socialplanner/csv.write",
                "socialplanner/group.write",
                "socialplanner/hashtag.readonly",
                "socialplanner/hashtag.write",
                "socialplanner/oauth.readonly",
                "socialplanner/oauth.write",
                "socialplanner/post.readonly",
                "socialplanner/recurring.readonly",
                "socialplanner/recurring.write",
                "socialplanner/review.readonly",
                "socialplanner/review.write",
                "socialplanner/rss.readonly",
                "socialplanner/rss.write",
                "socialplanner/search.readonly",
                "socialplanner/setting.readonly",
                "socialplanner/setting.write",
                "socialplanner/stat.readonly",
                "socialplanner/tag.readonly",
                "socialplanner/tag.write",
                "socialplanner/filters.readonly",
                "socialplanner/medias.readonly",
                "socialplanner/medias.write",
                "socialplanner/watermarks.readonly",
                "socialplanner/watermarks.write",
                "socialplanner/metatag.readonly",
                "socialplanner/facebook.readonly",
                "socialplanner/linkedin.readonly",
                "socialplanner/twitter.readonly",
                "socialplanner/notification.readonly",
                "socialplanner/notification.write",
                "socialplanner/snapshot.readonly",
                "socialplanner/snapshot.write",
                "marketing/affiliate.write",
                "blogs.write",
                "membership.write",
                "communities.write",
                "gokollab.write",
                "certificates.write",
                "certificates.readonly",
                "adPublishing.write",
                "adPublishing.readonly",
                "prospecting.write",
                "prospecting.readonly",
                "prospecting/reports.readonly",
                "private-integration-location.readonly",
                "private-integration-location.write",
                "private-integration-company.readonly",
                "private-integration-company.write",
                "native-integrations.readonly",
                "native-integrations.write",
                "wordpress.write",
                "wordpress.read",
                "custom-menu-link.write",
                "qrcodes.write",
                "users/team-management.write",
                "users/team-management.readonly",
                "loginas.write",
                "users-sso-login-management.write",
                "users-sso-login-management.readonly",
                "sso-config.write",
                "snapshots/api.readonly",
                "snapshots/api.create",
                "snapshots/api.edit",
                "snapshots/api.push",
                "snapshots/api.refresh",
                "snapshots/api.share",
                "snapshots/api.delete",
                "internaltools.location-transfer.write",
                "internaltools.location-transfer.readonly",
                "affiliateportal.write",
                "affiliateportal.readonly",
                "companies.write",
                "internaltools.billing.write",
                "internaltools.billing.readonly",
                "internaltools.billing-common.readonly",
                "internaltools.billing-common.write",
                "voice-ai-agents.write",
                "voice-ai-agents.readonly",
                "voice-ai-common.readonly",
                "voice-ai-common.write",
                "voice-ai-agent-goals.readonly",
                "voice-ai-agent-goals.write",
                "voice-ai-dashboard.readonly",
                "agency/launchpad.write",
                "agency/launchpad.readonly",
                "launchpad/location.write",
                "launchpad/location.readonly",
                "text-ai-agents.write",
                "text-ai-agent-goals.readonly",
                "text-ai-agent-goals.write",
                "text-ai-agent-training.write",
                "text-ai-agents-dashboard.readonly",
                "locations.create",
                "locations.delete",
                "askai.write",
                "copilot.readonly",
                "locations.export.list",
                "locations.features-limits.manage",
                "locations.pause-resume",
                "locations.agency-subaccounts.manage",
                "locations.billing.manage",
                "locations.details.manage",
                "audit-logs.readonly",
                "audit-logs.export"
              ]
            }
          },
          "scopesAssignedToOnly": {
            "type": "array",
            "example": [
              "contacts.write",
              "campaigns.readonly"
            ],
            "description": "Assigned Scopes allowed for users. Only scopes that have been passed will be enabled. If passed empty all the assigned scopes will be get disabled",
            "items": {
              "type": "string",
              "enum": [
                "campaigns.readonly",
                "campaigns.write",
                "calendars.readonly",
                "calendars/events.write",
                "calendars/groups.write",
                "calendars.write",
                "contacts.write",
                "contacts/bulkActions.write",
                "workflows.readonly",
                "workflows.write",
                "triggers.write",
                "funnels.write",
                "forms.write",
                "surveys.write",
                "quizzes.write",
                "websites.write",
                "medias.write",
                "medias.readonly",
                "opportunities.write",
                "opportunities/leadValue.readonly",
                "opportunities/bulkActions.write",
                "pipelines.create",
                "reporting/phone.readonly",
                "reporting/adwords.readonly",
                "reporting/facebookAds.readonly",
                "reporting/attributions.readonly",
                "prospecting/auditReport.write",
                "reporting/reports.readonly",
                "reporting/agent.readonly",
                "reporting/reports.write",
                "reporting/stats.export",
                "payments.write",
                "payments/records.write",
                "payments/orders.readonly",
                "payments/orders.export",
                "payments/orders.import",
                "payments/orders.collectPayment",
                "payments/subscriptions.readonly",
                "payments/subscriptions.write",
                "payments/subscriptions.update",
                "payments/subscriptions.export",
                "payments/subscriptions.pauseResumeCancel",
                "payments/subscriptions.sharePaymentMethod",
                "payments/transactions.readonly",
                "payments/transactions.export",
                "payments/transactions.import",
                "payments/transactions.refund",
                "payments/transactions.viewReceipts",
                "payments/taxesSettings.readonly",
                "payments/settings.readonly",
                "payments/taxesSettings.updateInclusiveExclusive",
                "payments/taxesSettings.manageRates",
                "payments/taxesSettings.configureAutomatic",
                "products.readonly",
                "products.write",
                "products.delete",
                "products.duplicate",
                "products.bulkActions",
                "payments/settings.write",
                "payments/settings.configureReceipt",
                "payments/settings.configureSubscription",
                "invoices.write",
                "invoices.readonly",
                "invoices/schedule.readonly",
                "invoices/schedule.write",
                "invoices/template.readonly",
                "invoices/template.write",
                "reputation/review.write",
                "reputation/listing.write",
                "reputation/reviewsAIAgents.write",
                "reputation/gbp.write",
                "conversations.write",
                "conversations.readonly",
                "conversations/message.readonly",
                "conversations/message.write",
                "contentAI.write",
                "ai-studio.readonly",
                "ai-studio.write",
                "dashboard/stats.readonly",
                "locations/tags.write",
                "locations/tags.readonly",
                "marketing.write",
                "eliza.write",
                "settings.write",
                "socialplanner/post.write",
                "socialplanner/account.readonly",
                "socialplanner/account.write",
                "socialplanner/category.readonly",
                "socialplanner/category.write",
                "socialplanner/csv.readonly",
                "socialplanner/csv.write",
                "socialplanner/group.write",
                "socialplanner/hashtag.readonly",
                "socialplanner/hashtag.write",
                "socialplanner/oauth.readonly",
                "socialplanner/oauth.write",
                "socialplanner/post.readonly",
                "socialplanner/recurring.readonly",
                "socialplanner/recurring.write",
                "socialplanner/review.readonly",
                "socialplanner/review.write",
                "socialplanner/rss.readonly",
                "socialplanner/rss.write",
                "socialplanner/search.readonly",
                "socialplanner/setting.readonly",
                "socialplanner/setting.write",
                "socialplanner/stat.readonly",
                "socialplanner/tag.readonly",
                "socialplanner/tag.write",
                "socialplanner/filters.readonly",
                "socialplanner/medias.readonly",
                "socialplanner/medias.write",
                "socialplanner/watermarks.readonly",
                "socialplanner/watermarks.write",
                "socialplanner/metatag.readonly",
                "socialplanner/facebook.readonly",
                "socialplanner/linkedin.readonly",
                "socialplanner/twitter.readonly",
                "socialplanner/notification.readonly",
                "socialplanner/notification.write",
                "socialplanner/snapshot.readonly",
                "socialplanner/snapshot.write",
                "marketing/affiliate.write",
                "blogs.write",
                "membership.write",
                "communities.write",
                "gokollab.write",
                "certificates.write",
                "certificates.readonly",
                "adPublishing.write",
                "adPublishing.readonly",
                "prospecting.write",
                "prospecting.readonly",
                "prospecting/reports.readonly",
                "private-integration-location.readonly",
                "private-integration-location.write",
                "private-integration-company.readonly",
                "private-integration-company.write",
                "native-integrations.readonly",
                "native-integrations.write",
                "wordpress.write",
                "wordpress.read",
                "custom-menu-link.write",
                "qrcodes.write",
                "users/team-management.write",
                "users/team-management.readonly",
                "loginas.write",
                "users-sso-login-management.write",
                "users-sso-login-management.readonly",
                "sso-config.write",
                "snapshots/api.readonly",
                "snapshots/api.create",
                "snapshots/api.edit",
                "snapshots/api.push",
                "snapshots/api.refresh",
                "snapshots/api.share",
                "snapshots/api.delete",
                "internaltools.location-transfer.write",
                "internaltools.location-transfer.readonly",
                "affiliateportal.write",
                "affiliateportal.readonly",
                "companies.write",
                "internaltools.billing.write",
                "internaltools.billing.readonly",
                "internaltools.billing-common.readonly",
                "internaltools.billing-common.write",
                "voice-ai-agents.write",
                "voice-ai-agents.readonly",
                "voice-ai-common.readonly",
                "voice-ai-common.write",
                "voice-ai-agent-goals.readonly",
                "voice-ai-agent-goals.write",
                "voice-ai-dashboard.readonly",
                "agency/launchpad.write",
                "agency/launchpad.readonly",
                "launchpad/location.write",
                "launchpad/location.readonly",
                "text-ai-agents.write",
                "text-ai-agent-goals.readonly",
                "text-ai-agent-goals.write",
                "text-ai-agent-training.write",
                "text-ai-agents-dashboard.readonly",
                "locations.create",
                "locations.delete",
                "askai.write",
                "copilot.readonly",
                "locations.export.list",
                "locations.features-limits.manage",
                "locations.pause-resume",
                "locations.agency-subaccounts.manage",
                "locations.billing.manage",
                "locations.details.manage",
                "audit-logs.readonly",
                "audit-logs.export"
              ]
            }
          },
          "profilePhoto": {
            "type": "string",
            "example": "https://img.png",
            "description": "URL of the user profile photo"
          },
          "twilioPhone": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "example": {
              "C2QujeCh8ZnC7al2InWR": "+18832327657",
              "M2QrtfVt8ZnC7cv2InDL": "+18832327657"
            },
            "description": "Per-location inbound Twilio number in E.164 format, keyed by location id (Call and Voicemail Inbound Number for direct Twilio, not LC Phone). Replacement semantics: if you send twilioPhone in the request body, the stored map is replaced entirely with this object (not merged). Any location id omitted from the object is removed from the saved map. Omit the twilioPhone property entirely to leave existing numbers unchanged. Send an empty object {} to clear all per-location numbers. To clear a single location only, set that location id to an empty string \"\"."
          },
          "platformLanguage": {
            "type": "string",
            "example": "en_US",
            "description": "Platform language preference for the user",
            "enum": [
              "en_US",
              "es",
              "fr_CA",
              "fr_FR",
              "nl",
              "de",
              "pt_PT",
              "pt_BR",
              "it",
              "sv",
              "da",
              "fi",
              "no"
            ]
          }
        },
        "title": "UpdateUserDto"
      },
      "UserSuccessfulResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "0IHuJvc2ofPAAA8GzTRi",
            "description": "Unique identifier of the user"
          },
          "name": {
            "type": "string",
            "example": "John Deo",
            "description": "Full name of the user"
          },
          "firstName": {
            "type": "string",
            "example": "John",
            "description": "First name of the user"
          },
          "lastName": {
            "type": "string",
            "example": "Deo",
            "description": "Last name of the user"
          },
          "email": {
            "type": "string",
            "example": "john@deo.com",
            "description": "Email address of the user"
          },
          "phone": {
            "type": "string",
            "example": "+1 808-868-8888",
            "description": "Phone number of the user"
          },
          "extension": {
            "type": "string",
            "example": "",
            "description": "Phone extension of the user"
          },
          "permissions": {
            "description": "User permissions controlling access to various features",
            "example": {
              "campaignsEnabled": true,
              "campaignsReadOnly": false,
              "contactsEnabled": true,
              "workflowsEnabled": true
            },
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "campaignsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether campaigns are enabled for this user"
                  },
                  "campaignsReadOnly": {
                    "type": "boolean",
                    "example": false,
                    "default": false,
                    "description": "Whether campaigns are in read-only mode for this user"
                  },
                  "contactsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether contacts are enabled for this user"
                  },
                  "workflowsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether workflows are enabled for this user"
                  },
                  "workflowsReadOnly": {
                    "type": "boolean",
                    "example": true,
                    "default": false,
                    "description": "Whether workflows are in read-only mode for this user"
                  },
                  "triggersEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether triggers are enabled for this user"
                  },
                  "funnelsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether funnels are enabled for this user"
                  },
                  "websitesEnabled": {
                    "type": "boolean",
                    "example": false,
                    "default": false,
                    "description": "Whether websites are enabled for this user"
                  },
                  "opportunitiesEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether opportunities are enabled for this user"
                  },
                  "dashboardStatsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether dashboard statistics are enabled for this user"
                  },
                  "bulkRequestsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether bulk requests are enabled for this user"
                  },
                  "appointmentsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether appointments are enabled for this user"
                  },
                  "reviewsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether reviews are enabled for this user"
                  },
                  "onlineListingsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether online listings are enabled for this user"
                  },
                  "phoneCallEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether phone calls are enabled for this user"
                  },
                  "conversationsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether conversations are enabled for this user"
                  },
                  "assignedDataOnly": {
                    "type": "boolean",
                    "example": false,
                    "default": false,
                    "description": "Whether the user can only access data assigned to them"
                  },
                  "adwordsReportingEnabled": {
                    "type": "boolean",
                    "example": false,
                    "default": false,
                    "description": "Whether AdWords reporting is enabled for this user"
                  },
                  "membershipEnabled": {
                    "type": "boolean",
                    "example": false,
                    "default": false,
                    "description": "Whether membership features are enabled for this user"
                  },
                  "facebookAdsReportingEnabled": {
                    "type": "boolean",
                    "example": false,
                    "default": false,
                    "description": "Whether Facebook Ads reporting is enabled for this user"
                  },
                  "attributionsReportingEnabled": {
                    "type": "boolean",
                    "example": false,
                    "default": false,
                    "description": "Whether attributions reporting is enabled for this user"
                  },
                  "settingsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether settings are enabled for this user"
                  },
                  "tagsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether tags are enabled for this user"
                  },
                  "leadValueEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether lead value features are enabled for this user"
                  },
                  "marketingEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether marketing features are enabled for this user"
                  },
                  "agentReportingEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether agent reporting is enabled for this user"
                  },
                  "botService": {
                    "type": "boolean",
                    "example": false,
                    "default": false,
                    "description": "Whether the bot service is enabled for this user"
                  },
                  "socialPlanner": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether the social planner is enabled for this user"
                  },
                  "bloggingEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether blogging is enabled for this user"
                  },
                  "invoiceEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether invoices are enabled for this user"
                  },
                  "affiliateManagerEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether the affiliate manager is enabled for this user"
                  },
                  "contentAiEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether Content AI is enabled for this user"
                  },
                  "refundsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether refunds are enabled for this user"
                  },
                  "recordPaymentEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether recording payments is enabled for this user"
                  },
                  "cancelSubscriptionEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether cancelling subscriptions is enabled for this user"
                  },
                  "paymentsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether payments are enabled for this user"
                  },
                  "communitiesEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether communities are enabled for this user"
                  },
                  "exportPaymentsEnabled": {
                    "type": "boolean",
                    "example": true,
                    "default": true,
                    "description": "Whether exporting payments is enabled for this user"
                  }
                },
                "title": "PermissionsDto"
              }
            ]
          },
          "scopes": {
            "type": "string",
            "description": "List of OAuth scopes granted to this user",
            "example": [
              "contacts.write",
              "campaigns.readonly"
            ],
            "enum": [
              "campaigns.readonly",
              "campaigns.write",
              "calendars.readonly",
              "calendars/events.write",
              "calendars/groups.write",
              "calendars.write",
              "contacts.write",
              "contacts/bulkActions.write",
              "workflows.readonly",
              "workflows.write",
              "triggers.write",
              "funnels.write",
              "forms.write",
              "surveys.write",
              "quizzes.write",
              "websites.write",
              "medias.write",
              "medias.readonly",
              "opportunities.write",
              "opportunities/leadValue.readonly",
              "opportunities/bulkActions.write",
              "pipelines.create",
              "reporting/phone.readonly",
              "reporting/adwords.readonly",
              "reporting/facebookAds.readonly",
              "reporting/attributions.readonly",
              "prospecting/auditReport.write",
              "reporting/reports.readonly",
              "reporting/agent.readonly",
              "reporting/reports.write",
              "reporting/stats.export",
              "payments.write",
              "payments/records.write",
              "payments/orders.readonly",
              "payments/orders.export",
              "payments/orders.import",
              "payments/orders.collectPayment",
              "payments/subscriptions.readonly",
              "payments/subscriptions.write",
              "payments/subscriptions.update",
              "payments/subscriptions.export",
              "payments/subscriptions.pauseResumeCancel",
              "payments/subscriptions.sharePaymentMethod",
              "payments/transactions.readonly",
              "payments/transactions.export",
              "payments/transactions.import",
              "payments/transactions.refund",
              "payments/transactions.viewReceipts",
              "payments/taxesSettings.readonly",
              "payments/settings.readonly",
              "payments/taxesSettings.updateInclusiveExclusive",
              "payments/taxesSettings.manageRates",
              "payments/taxesSettings.configureAutomatic",
              "products.readonly",
              "products.write",
              "products.delete",
              "products.duplicate",
              "products.bulkActions",
              "payments/settings.write",
              "payments/settings.configureReceipt",
              "payments/settings.configureSubscription",
              "invoices.write",
              "invoices.readonly",
              "invoices/schedule.readonly",
              "invoices/schedule.write",
              "invoices/template.readonly",
              "invoices/template.write",
              "reputation/review.write",
              "reputation/listing.write",
              "reputation/reviewsAIAgents.write",
              "reputation/gbp.write",
              "conversations.write",
              "conversations.readonly",
              "conversations/message.readonly",
              "conversations/message.write",
              "contentAI.write",
              "ai-studio.readonly",
              "ai-studio.write",
              "dashboard/stats.readonly",
              "locations/tags.write",
              "locations/tags.readonly",
              "marketing.write",
              "eliza.write",
              "settings.write",
              "socialplanner/post.write",
              "socialplanner/account.readonly",
              "socialplanner/account.write",
              "socialplanner/category.readonly",
              "socialplanner/category.write",
              "socialplanner/csv.readonly",
              "socialplanner/csv.write",
              "socialplanner/group.write",
              "socialplanner/hashtag.readonly",
              "socialplanner/hashtag.write",
              "socialplanner/oauth.readonly",
              "socialplanner/oauth.write",
              "socialplanner/post.readonly",
              "socialplanner/recurring.readonly",
              "socialplanner/recurring.write",
              "socialplanner/review.readonly",
              "socialplanner/review.write",
              "socialplanner/rss.readonly",
              "socialplanner/rss.write",
              "socialplanner/search.readonly",
              "socialplanner/setting.readonly",
              "socialplanner/setting.write",
              "socialplanner/stat.readonly",
              "socialplanner/tag.readonly",
              "socialplanner/tag.write",
              "socialplanner/filters.readonly",
              "socialplanner/medias.readonly",
              "socialplanner/medias.write",
              "socialplanner/watermarks.readonly",
              "socialplanner/watermarks.write",
              "socialplanner/metatag.readonly",
              "socialplanner/facebook.readonly",
              "socialplanner/linkedin.readonly",
              "socialplanner/twitter.readonly",
              "socialplanner/notification.readonly",
              "socialplanner/notification.write",
              "socialplanner/snapshot.readonly",
              "socialplanner/snapshot.write",
              "marketing/affiliate.write",
              "blogs.write",
              "membership.write",
              "communities.write",
              "gokollab.write",
              "certificates.write",
              "certificates.readonly",
              "adPublishing.write",
              "adPublishing.readonly",
              "prospecting.write",
              "prospecting.readonly",
              "prospecting/reports.readonly",
              "private-integration-location.readonly",
              "private-integration-location.write",
              "private-integration-company.readonly",
              "private-integration-company.write",
              "native-integrations.readonly",
              "native-integrations.write",
              "wordpress.write",
              "wordpress.read",
              "custom-menu-link.write",
              "qrcodes.write",
              "users/team-management.write",
              "users/team-management.readonly",
              "loginas.write",
              "users-sso-login-management.write",
              "users-sso-login-management.readonly",
              "sso-config.write",
              "snapshots/api.readonly",
              "snapshots/api.create",
              "snapshots/api.edit",
              "snapshots/api.push",
              "snapshots/api.refresh",
              "snapshots/api.share",
              "snapshots/api.delete",
              "internaltools.location-transfer.write",
              "internaltools.location-transfer.readonly",
              "affiliateportal.write",
              "affiliateportal.readonly",
              "companies.write",
              "internaltools.billing.write",
              "internaltools.billing.readonly",
              "internaltools.billing-common.readonly",
              "internaltools.billing-common.write",
              "voice-ai-agents.write",
              "voice-ai-agents.readonly",
              "voice-ai-common.readonly",
              "voice-ai-common.write",
              "voice-ai-agent-goals.readonly",
              "voice-ai-agent-goals.write",
              "voice-ai-dashboard.readonly",
              "agency/launchpad.write",
              "agency/launchpad.readonly",
              "launchpad/location.write",
              "launchpad/location.readonly",
              "text-ai-agents.write",
              "text-ai-agent-goals.readonly",
              "text-ai-agent-goals.write",
              "text-ai-agent-training.write",
              "text-ai-agents-dashboard.readonly",
              "locations.create",
              "locations.delete",
              "askai.write",
              "copilot.readonly",
              "locations.export.list",
              "locations.features-limits.manage",
              "locations.pause-resume",
              "locations.agency-subaccounts.manage",
              "locations.billing.manage",
              "locations.details.manage",
              "audit-logs.readonly",
              "audit-logs.export"
            ]
          },
          "roles": {
            "description": "Role and access configuration for the user",
            "example": {
              "type": "account",
              "role": "admin",
              "locationIds": [
                "ve9EPM428h8vShlRW1KT"
              ]
            },
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "example": "account",
                    "description": "User account type (account for sub-account users, agency for agency-level users)"
                  },
                  "role": {
                    "type": "string",
                    "example": "admin",
                    "description": "User role within the account (admin or user)"
                  },
                  "locationIds": {
                    "example": [
                      "ve9EPM428h8vShlRW1KT"
                    ],
                    "description": "List of location IDs the user has access to",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "restrictSubAccount": {
                    "type": "boolean",
                    "example": true,
                    "description": "Whether the user is restricted to specific sub-accounts only"
                  }
                },
                "title": "RoleSchema"
              }
            ]
          },
          "lcPhone": {
            "type": "object",
            "example": {
              "locationId": "+1234556677"
            },
            "description": "LC Phone Inbound Phone Numbers"
          },
          "platformLanguage": {
            "type": "string",
            "example": "en_US",
            "description": "Platform language preference for the user",
            "enum": [
              "en_US",
              "es",
              "fr_CA",
              "fr_FR",
              "nl",
              "de",
              "pt_PT",
              "pt_BR",
              "it",
              "sv",
              "da",
              "fi",
              "no"
            ]
          }
        },
        "title": "UserSuccessfulResponseDto"
      },
      "BadRequestDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 400
          },
          "message": {
            "type": "string",
            "example": "Bad Request"
          }
        },
        "title": "BadRequestDTO"
      },
      "UnauthorizedDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 401
          },
          "message": {
            "type": "string",
            "example": "Invalid token: access token is invalid"
          },
          "error": {
            "type": "string",
            "example": "Unauthorized"
          }
        },
        "title": "UnauthorizedDTO"
      },
      "UnprocessableDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 422
          },
          "message": {
            "example": [
              "Unprocessable Entity"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "error": {
            "type": "string",
            "example": "Unprocessable Entity"
          }
        },
        "title": "UnprocessableDTO"
      }
    }
  }
}
```

## HighLevel SDK Examples

**Node.js** (`@gohighlevel/api-client`)

```javascript
import HighLevel from '@gohighlevel/api-client';

const ghl = new HighLevel({
  privateIntegrationToken: '<PRIVATE_INTEGRATION_TOKEN>'
});

const body = {
  "firstName": "John",
  "lastName": "Deo",
  "email": "john@deo.com",
  "password": "************",
  "phone": "+18832327657",
  "type": "account",
  "role": "admin",
  "companyId": "UAXssdawIWAWD",
  "locationIds": [
    "C2QujeCh8ZnC7al2InWR"
  ],
  "permissions": {
    "campaignsEnabled": true,
    "campaignsReadOnly": false,
    "contactsEnabled": true,
    "workflowsEnabled": true
  },
  "scopes": [
    "contacts.write",
    "campaigns.readonly"
  ],
  "scopesAssignedToOnly": [
    "contacts.write",
    "campaigns.readonly"
  ],
  "profilePhoto": "https://img.png",
  "twilioPhone": {
    "C2QujeCh8ZnC7al2InWR": "+18832327657",
    "M2QrtfVt8ZnC7cv2InDL": "+18832327657"
  },
  "platformLanguage": "en_US"
};

const response = await ghl.users.updateUser(body);
console.log(response);
```

**Python** (`gohighlevel-api-client`)

```python
from highlevel import HighLevel

client = HighLevel(
    private_integration_token='<PRIVATE_INTEGRATION_TOKEN>'
)

body = {
    "firstName": "John",
    "lastName": "Deo",
    "email": "john@deo.com",
    "password": "************",
    "phone": "+18832327657",
    "type": "account",
    "role": "admin",
    "companyId": "UAXssdawIWAWD",
    "locationIds": [
        "C2QujeCh8ZnC7al2InWR"
    ],
    "permissions": {
        "campaignsEnabled": true,
        "campaignsReadOnly": false,
        "contactsEnabled": true,
        "workflowsEnabled": true
    },
    "scopes": [
        "contacts.write",
        "campaigns.readonly"
    ],
    "scopesAssignedToOnly": [
        "contacts.write",
        "campaigns.readonly"
    ],
    "profilePhoto": "https://img.png",
    "twilioPhone": {
        "C2QujeCh8ZnC7al2InWR": "+18832327657",
        "M2QrtfVt8ZnC7cv2InDL": "+18832327657"
    },
    "platformLanguage": "en_US"
}

response = await client.users.update_user(body=body)
print(response)
```

**PHP** (`gohighlevel/api-client`)

```php
<?php
require_once 'vendor/autoload.php';

use HighLevel\HighLevel;
use HighLevel\HighLevelConfig;

$config = new HighLevelConfig([
    'privateIntegrationToken' => '<PRIVATE_INTEGRATION_TOKEN>'
]);
$ghl = new HighLevel($config);

$body = [
    'firstName' => 'John',
    'lastName' => 'Deo',
    'email' => 'john@deo.com',
    'password' => '************',
    'phone' => '+18832327657',
    'type' => 'account',
    'role' => 'admin',
    'companyId' => 'UAXssdawIWAWD',
    'locationIds' => [
        'C2QujeCh8ZnC7al2InWR'
    ],
    'permissions' => [
        'campaignsEnabled' => true,
        'campaignsReadOnly' => false,
        'contactsEnabled' => true,
        'workflowsEnabled' => true
    ],
    'scopes' => [
        'contacts.write',
        'campaigns.readonly'
    ],
    'scopesAssignedToOnly' => [
        'contacts.write',
        'campaigns.readonly'
    ],
    'profilePhoto' => 'https://img.png',
    'twilioPhone' => [
        'C2QujeCh8ZnC7al2InWR' => '+18832327657',
        'M2QrtfVt8ZnC7cv2InDL' => '+18832327657'
    ],
    'platformLanguage' => 'en_US'
];

$response = $ghl->users->updateUser($body);
echo json_encode($response, JSON_PRETTY_PRINT);
```

## Code Examples

**cURL**

```bash
curl -L -X PUT 'https://services.leadconnectorhq.com/users/<userId>' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "firstName": "John",
  "lastName": "Deo",
  "email": "john@deo.com",
  "password": "************",
  "phone": "+18832327657",
  "type": "account",
  "role": "admin",
  "companyId": "UAXssdawIWAWD",
  "locationIds": [
    "C2QujeCh8ZnC7al2InWR"
  ],
  "permissions": {
    "campaignsEnabled": true,
    "campaignsReadOnly": false,
    "contactsEnabled": true,
    "workflowsEnabled": true
  },
  "scopes": [
    "contacts.write",
    "campaigns.readonly"
  ],
  "scopesAssignedToOnly": [
    "contacts.write",
    "campaigns.readonly"
  ],
  "profilePhoto": "https://img.png",
  "twilioPhone": {
    "C2QujeCh8ZnC7al2InWR": "+18832327657",
    "M2QrtfVt8ZnC7cv2InDL": "+18832327657"
  },
  "platformLanguage": "en_US"
}'
```

**Node.js**

```javascript
const options = {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer <TOKEN>',
    Version: '2021-07-28',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "firstName": "John",
      "lastName": "Deo",
      "email": "john@deo.com",
      "password": "************",
      "phone": "+18832327657",
      "type": "account",
      "role": "admin",
      "companyId": "UAXssdawIWAWD",
      "locationIds": [
        "C2QujeCh8ZnC7al2InWR"
      ],
      "permissions": {
        "campaignsEnabled": true,
        "campaignsReadOnly": false,
        "contactsEnabled": true,
        "workflowsEnabled": true
      },
      "scopes": [
        "contacts.write",
        "campaigns.readonly"
      ],
      "scopesAssignedToOnly": [
        "contacts.write",
        "campaigns.readonly"
      ],
      "profilePhoto": "https://img.png",
      "twilioPhone": {
        "C2QujeCh8ZnC7al2InWR": "+18832327657",
        "M2QrtfVt8ZnC7cv2InDL": "+18832327657"
      },
      "platformLanguage": "en_US"
  })
};

try {
  const response = await fetch('https://services.leadconnectorhq.com/users/<userId>', options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**Python**

```python
import requests

url = "https://services.leadconnectorhq.com/users/{userId}"

headers = {
    "Authorization": "Bearer <TOKEN>",
    "Version": "2021-07-28"
}

payload = {
    "firstName": "John",
    "lastName": "Deo",
    "email": "john@deo.com",
    "password": "************",
    "phone": "+18832327657",
    "type": "account",
    "role": "admin",
    "companyId": "UAXssdawIWAWD",
    "locationIds": [
        "C2QujeCh8ZnC7al2InWR"
    ],
    "permissions": {
        "campaignsEnabled": true,
        "campaignsReadOnly": false,
        "contactsEnabled": true,
        "workflowsEnabled": true
    },
    "scopes": [
        "contacts.write",
        "campaigns.readonly"
    ],
    "scopesAssignedToOnly": [
        "contacts.write",
        "campaigns.readonly"
    ],
    "profilePhoto": "https://img.png",
    "twilioPhone": {
        "C2QujeCh8ZnC7al2InWR": "+18832327657",
        "M2QrtfVt8ZnC7cv2InDL": "+18832327657"
    },
    "platformLanguage": "en_US"
}

response = requests.put(url, json=payload, headers=headers)
print(response.json())
```

**PHP**

```php
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://services.leadconnectorhq.com/users/<userId>',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <TOKEN>',
    'Version: 2021-07-28',
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => '{
  "firstName": "John",
  "lastName": "Deo",
  "email": "john@deo.com",
  "password": "************",
  "phone": "+18832327657",
  "type": "account",
  "role": "admin",
  "companyId": "UAXssdawIWAWD",
  "locationIds": [
    "C2QujeCh8ZnC7al2InWR"
  ],
  "permissions": {
    "campaignsEnabled": true,
    "campaignsReadOnly": false,
    "contactsEnabled": true,
    "workflowsEnabled": true
  },
  "scopes": [
    "contacts.write",
    "campaigns.readonly"
  ],
  "scopesAssignedToOnly": [
    "contacts.write",
    "campaigns.readonly"
  ],
  "profilePhoto": "https://img.png",
  "twilioPhone": {
    "C2QujeCh8ZnC7al2InWR": "+18832327657",
    "M2QrtfVt8ZnC7cv2InDL": "+18832327657"
  },
  "platformLanguage": "en_US"
}',
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

**Java**

```java
HttpResponse<String> response = Unirest
  .put("https://services.leadconnectorhq.com/users/<userId>")
  .header("Authorization", "Bearer <TOKEN>")
  .header("Version", "2021-07-28")
  .header("Content-Type", "application/json")
  .body("{\"firstName\":\"John\",\"lastName\":\"Deo\",\"email\":\"john@deo.com\",\"password\":\"************\",\"phone\":\"+18832327657\",\"type\":\"account\",\"role\":\"admin\",\"companyId\":\"UAXssdawIWAWD\",\"locationIds\":[\"C2QujeCh8ZnC7al2InWR\"],\"permissions\":{\"campaignsEnabled\":true,\"campaignsReadOnly\":false,\"contactsEnabled\":true,\"workflowsEnabled\":true},\"scopes\":[\"contacts.write\",\"campaigns.readonly\"],\"scopesAssignedToOnly\":[\"contacts.write\",\"campaigns.readonly\"],\"profilePhoto\":\"https://img.png\",\"twilioPhone\":{\"C2QujeCh8ZnC7al2InWR\":\"+18832327657\",\"M2QrtfVt8ZnC7cv2InDL\":\"+18832327657\"},\"platformLanguage\":\"en_US\"}")
  .asString();
```

**Go**

```go
package main

import (
  "fmt"
  "net/http"
  "io"
  "strings"
)

func main() {
  url := "https://services.leadconnectorhq.com/users/<userId>"
  payload := strings.NewReader(`{
  "firstName": "John",
  "lastName": "Deo",
  "email": "john@deo.com",
  "password": "************",
  "phone": "+18832327657",
  "type": "account",
  "role": "admin",
  "companyId": "UAXssdawIWAWD",
  "locationIds": [
    "C2QujeCh8ZnC7al2InWR"
  ],
  "permissions": {
    "campaignsEnabled": true,
    "campaignsReadOnly": false,
    "contactsEnabled": true,
    "workflowsEnabled": true
  },
  "scopes": [
    "contacts.write",
    "campaigns.readonly"
  ],
  "scopesAssignedToOnly": [
    "contacts.write",
    "campaigns.readonly"
  ],
  "profilePhoto": "https://img.png",
  "twilioPhone": {
    "C2QujeCh8ZnC7al2InWR": "+18832327657",
    "M2QrtfVt8ZnC7cv2InDL": "+18832327657"
  },
  "platformLanguage": "en_US"
}`)
  req, _ := http.NewRequest("PUT", url, payload)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  req.Header.Add("Version", "2021-07-28")

  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
```

**Ruby**

```ruby
require 'uri'
require 'net/http'

url = URI("https://services.leadconnectorhq.com/users/<userId>")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = "Bearer <TOKEN>"
request["Version"] = "2021-07-28"
request["Content-Type"] = "application/json"
request.body = '{
  "firstName": "John",
  "lastName": "Deo",
  "email": "john@deo.com",
  "password": "************",
  "phone": "+18832327657",
  "type": "account",
  "role": "admin",
  "companyId": "UAXssdawIWAWD",
  "locationIds": [
    "C2QujeCh8ZnC7al2InWR"
  ],
  "permissions": {
    "campaignsEnabled": true,
    "campaignsReadOnly": false,
    "contactsEnabled": true,
    "workflowsEnabled": true
  },
  "scopes": [
    "contacts.write",
    "campaigns.readonly"
  ],
  "scopesAssignedToOnly": [
    "contacts.write",
    "campaigns.readonly"
  ],
  "profilePhoto": "https://img.png",
  "twilioPhone": {
    "C2QujeCh8ZnC7al2InWR": "+18832327657",
    "M2QrtfVt8ZnC7cv2InDL": "+18832327657"
  },
  "platformLanguage": "en_US"
}'

response = http.request(request)
puts response.read_body
```

**PowerShell**

```powershell
$headers = @{
  "Authorization" = "Bearer <TOKEN>"
  "Version" = "2021-07-28"
}

$body = '{
  "firstName": "John",
  "lastName": "Deo",
  "email": "john@deo.com",
  "password": "************",
  "phone": "+18832327657",
  "type": "account",
  "role": "admin",
  "companyId": "UAXssdawIWAWD",
  "locationIds": [
    "C2QujeCh8ZnC7al2InWR"
  ],
  "permissions": {
    "campaignsEnabled": true,
    "campaignsReadOnly": false,
    "contactsEnabled": true,
    "workflowsEnabled": true
  },
  "scopes": [
    "contacts.write",
    "campaigns.readonly"
  ],
  "scopesAssignedToOnly": [
    "contacts.write",
    "campaigns.readonly"
  ],
  "profilePhoto": "https://img.png",
  "twilioPhone": {
    "C2QujeCh8ZnC7al2InWR": "+18832327657",
    "M2QrtfVt8ZnC7cv2InDL": "+18832327657"
  },
  "platformLanguage": "en_US"
}'

$response = Invoke-RestMethod -Uri 'https://services.leadconnectorhq.com/users/<userId>' -Method 'PUT' -Headers $headers -Body $body -ContentType 'application/json'
$response | ConvertTo-Json
```
