# /portal/{portalId}/user/{userId}

Edit the portal user

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Formstack API v2025.0",
    "version": "0.0.4"
  },
  "servers": [
    {
      "url": "https://www.formstack.com/api/v2025",
      "description": "Production server"
    },
    {
      "url": "https://staging-formstack.com/api/v2025",
      "description": "Staging server"
    },
    {
      "url": "https://dev-formstack.com/api/v2025",
      "description": "Development server"
    }
  ],
  "paths": {
    "/portal/{portalId}/user/{userId}": {
      "put": {
        "tags": [
          "Portals",
          "Classic"
        ],
        "description": "Edit the portal user",
        "operationId": "editPortalUser",
        "parameters": [
          {
            "name": "portalId",
            "in": "path",
            "description": "Portal ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "description": "User ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EditPortalUserInputApiDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortalUserApiDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PortalUserApiDto": {
        "title": "Portal User",
        "description": "Portal user response",
        "properties": {
          "id": {
            "description": "Unique identifier of the portal user",
            "type": "integer",
            "nullable": false
          },
          "avatarUrl": {
            "description": "Avatar URL of the portal user",
            "type": "string",
            "nullable": false
          },
          "email": {
            "description": "Email address of the portal user",
            "type": "string",
            "nullable": false
          },
          "name": {
            "description": "Name of the portal user",
            "type": "string",
            "nullable": false
          },
          "type": {
            "description": "Type of the portal user (account or external)",
            "type": "string",
            "nullable": false
          }
        },
        "type": "object"
      },
      "EditPortalUserInputApiDto": {
        "title": "Edit Portal User",
        "description": "Edit Portal User request",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "description": "Name of the portal user",
            "type": "string",
            "nullable": false
          }
        },
        "type": "object"
      }
    }
  },
  "tags": [
    {
      "name": "Portals",
      "description": "Portals provide a branded hub where users access a curated collection of forms. Use these endpoints to manage a portal and its forms and users—copying (to create new portals), editing, and deleting portals, adding, editing, and removing portal forms, managing portal users, and setting or removing the portal avatar."
    },
    {
      "name": "Classic",
      "description": "Classic"
    }
  ]
}
```