---
title: Partially update a user
slug: partially-update-a-user
docTags: 
createdAt: 2026-04-17T07:48:39.600Z
---

{
  "id": "NF9qpWTQ4wJXLSChraMX7",
  "type": "api-oas-v2",
  "data": {
    "method": "PATCH",
    "url": "https://api.archbee.com/v2/users/{userId}",
    "servers": [
      {
        "url": "https://api.archbee.com/v2/users/{userId}",
        "description": "Production server"
      },
      {
        "url": "https://staging-api.archbee.com/v2/users/{userId}",
        "description": "Staging server"
      },
      {
        "url": "https://{region}.api.archbee.com/{version}/users/{userId}",
        "description": "Regional server with variables"
      }
    ],
    "name": "Partially update a user",
    "description": "Partially updates user data using JSON Merge Patch. Only provided fields are updated.",
    "contentType": "application/merge-patch+json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "userId",
          "type": "string<uuid>",
          "description": "",
          "format": "uuid"
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "bearerAuth",
          "name": "bearerAuth",
          "kind": "optional",
          "type": "http",
          "description": "<p>HTTP Bearer token authentication (JWT)</p>",
          "scheme": "bearer"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "User updated successfully",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Full user object returned in API responses. Uses `allOf` to merge base fields with response-specific fields.",
            "customType": "User",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "",
                "example": "Jane Smith",
                "minLength": 1,
                "maxLength": 100
              },
              {
                "name": "email",
                "kind": "required",
                "type": "string<email>",
                "description": "",
                "example": "jane@example.com",
                "format": "email"
              },
              {
                "name": "role",
                "kind": "optional",
                "type": "string<admin | editor | viewer | guest>",
                "description": "",
                "example": "",
                "default": "viewer",
                "enum": [
                  "admin",
                  "editor",
                  "viewer",
                  "guest"
                ]
              },
              {
                "name": "profile",
                "kind": "optional",
                "type": "object",
                "description": "User profile details",
                "modelRef": "#/components/schemas/UserProfile",
                "customType": "UserProfile",
                "schema": [
                  {
                    "name": "bio",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "Software engineer and API enthusiast",
                    "maxLength": 500
                  },
                  {
                    "name": "avatarUrl",
                    "kind": "optional",
                    "type": "string<uri>",
                    "description": "",
                    "example": "https://example.com/avatars/jane.png",
                    "format": "uri"
                  },
                  {
                    "name": "timezone",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "America/New_York"
                  },
                  {
                    "name": "socialLinks",
                    "kind": "optional",
                    "type": "map",
                    "description": "",
                    "example": "{\"github\":\"https://github.com/janesmith\",\"linkedin\":\"https://linkedin.com/in/janesmith\"}",
                    "customType": "map<string, string>",
                    "schema": []
                  }
                ]
              },
              {
                "name": "id",
                "kind": "optional",
                "type": "string<uuid>",
                "readOnly": true,
                "description": "",
                "example": "550e8400-e29b-41d4-a716-446655440000",
                "format": "uuid"
              },
              {
                "name": "status",
                "kind": "optional",
                "type": "string<active | inactive | suspended | pending>",
                "readOnly": true,
                "description": "",
                "example": "active",
                "enum": [
                  "active",
                  "inactive",
                  "suspended",
                  "pending"
                ]
              },
              {
                "name": "createdAt",
                "kind": "optional",
                "type": "string<date-time>",
                "readOnly": true,
                "description": "",
                "example": "2025-01-15T09:30:00Z",
                "format": "date-time"
              },
              {
                "name": "updatedAt",
                "kind": "optional",
                "type": "string<date-time>",
                "readOnly": true,
                "description": "",
                "example": "2025-06-01T14:22:00Z",
                "format": "date-time"
              },
              {
                "name": "permissions",
                "kind": "optional",
                "type": "array",
                "readOnly": true,
                "description": "",
                "example": "[\"read\",\"write\",\"admin\"]",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              }
            ],
            "modelRef": "#/components/schemas/User",
            "complexItems": [
              {
                "name": "object",
                "schema": [
                  {
                    "name": "name",
                    "kind": "required",
                    "type": "string",
                    "description": "",
                    "example": "Jane Smith",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  {
                    "name": "email",
                    "kind": "required",
                    "type": "string<email>",
                    "description": "",
                    "example": "jane@example.com",
                    "format": "email"
                  },
                  {
                    "name": "role",
                    "kind": "optional",
                    "type": "string<admin | editor | viewer | guest>",
                    "description": "",
                    "example": "",
                    "default": "viewer",
                    "enum": [
                      "admin",
                      "editor",
                      "viewer",
                      "guest"
                    ]
                  },
                  {
                    "name": "profile",
                    "kind": "optional",
                    "type": "object",
                    "description": "User profile details",
                    "modelRef": "#/components/schemas/UserProfile",
                    "customType": "UserProfile",
                    "schema": [
                      {
                        "name": "bio",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "Software engineer and API enthusiast",
                        "maxLength": 500
                      },
                      {
                        "name": "avatarUrl",
                        "kind": "optional",
                        "type": "string<uri>",
                        "description": "",
                        "example": "https://example.com/avatars/jane.png",
                        "format": "uri"
                      },
                      {
                        "name": "timezone",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "America/New_York"
                      },
                      {
                        "name": "socialLinks",
                        "kind": "optional",
                        "type": "map",
                        "description": "",
                        "example": "{\"github\":\"https://github.com/janesmith\",\"linkedin\":\"https://linkedin.com/in/janesmith\"}",
                        "customType": "map<string, string>",
                        "schema": []
                      }
                    ]
                  }
                ],
                "modelRef": "#/components/schemas/UserBase",
                "customType": "UserBase"
              },
              {
                "name": "object",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "string<uuid>",
                    "readOnly": true,
                    "description": "",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "format": "uuid"
                  },
                  {
                    "name": "status",
                    "kind": "optional",
                    "type": "string<active | inactive | suspended | pending>",
                    "readOnly": true,
                    "description": "",
                    "example": "active",
                    "enum": [
                      "active",
                      "inactive",
                      "suspended",
                      "pending"
                    ]
                  },
                  {
                    "name": "createdAt",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "readOnly": true,
                    "description": "",
                    "example": "2025-01-15T09:30:00Z",
                    "format": "date-time"
                  },
                  {
                    "name": "updatedAt",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "readOnly": true,
                    "description": "",
                    "example": "2025-06-01T14:22:00Z",
                    "format": "date-time"
                  },
                  {
                    "name": "permissions",
                    "kind": "optional",
                    "type": "array",
                    "readOnly": true,
                    "description": "",
                    "example": "[\"read\",\"write\",\"admin\"]",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  }
                ]
              }
            ],
            "complexType": "allOf",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad request — invalid input or missing required fields",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"code\":\"BAD_REQUEST\",\"message\":\"The request body is invalid\",\"details\":[{\"field\":\"email\",\"message\":\"must be a valid email address\",\"code\":\"INVALID_FORMAT\"}]}",
            "description": "Standard error response",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "Machine-readable error code",
                "example": "VALIDATION_ERROR"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Human-readable error message",
                "example": "The request body contains invalid fields"
              },
              {
                "name": "details",
                "kind": "optional",
                "type": "array",
                "description": "Detailed validation errors (when applicable)",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "field",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "email"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "must be a valid email address"
                  },
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "INVALID_FORMAT"
                  }
                ]
              },
              {
                "name": "requestId",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "Correlation ID for support inquiries",
                "example": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "Not found — the requested resource does not exist",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"code\":\"NOT_FOUND\",\"message\":\"The requested resource was not found\"}",
            "description": "Standard error response",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "Machine-readable error code",
                "example": "VALIDATION_ERROR"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Human-readable error message",
                "example": "The request body contains invalid fields"
              },
              {
                "name": "details",
                "kind": "optional",
                "type": "array",
                "description": "Detailed validation errors (when applicable)",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "field",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "email"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "must be a valid email address"
                  },
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "INVALID_FORMAT"
                  }
                ]
              },
              {
                "name": "requestId",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "Correlation ID for support inquiries",
                "example": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "h-fccwjGdlNDFAQqHmW8N",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PATCH \\\n     --url https://api.archbee.com/v2/users/{userId} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "hVyd9QBXqSbJGesW3d34Y",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/merge-patch+json\");\n\nvar requestOptions = {\n   method: 'PATCH',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.archbee.com/v2/users/{userId}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "I_YJUMHmlPKbAI0cSTIEj",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.archbee.com/v2/users/{userId}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Patch.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/merge-patch+json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "d0v__rS9fga51hRKSqEwD",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.archbee.com/v2/users/{userId}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/merge-patch+json'\n}\n\nresponse = requests.request(\"PATCH\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "h-fccwjGdlNDFAQqHmW8N"
    },
    "results": {
      "languages": [
        {
          "id": "9-oqFIi6_3Wj2TK1fapqh",
          "language": "200",
          "code": "// User updated successfully\n{\n  \"name\": \"Jane Smith\",\n  \"email\": \"jane@example.com\",\n  \"role\": \"\",\n  \"profile\": {\n    \"bio\": \"Software engineer and API enthusiast\",\n    \"avatarUrl\": \"https://example.com/avatars/jane.png\",\n    \"timezone\": \"America/New_York\",\n    \"socialLinks\": \"{\\\"github\\\":\\\"https://github.com/janesmith\\\",\\\"linkedin\\\":\\\"https://linkedin.com/in/janesmith\\\"}\"\n  },\n  \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n  \"status\": \"active\",\n  \"createdAt\": \"2025-01-15T09:30:00Z\",\n  \"updatedAt\": \"2025-06-01T14:22:00Z\",\n  \"permissions\": [\n    \"\"\n  ]\n}"
        },
        {
          "id": "rlaHeDTgo48XJx6YTtn4V",
          "language": "400",
          "code": "// Bad request — invalid input or missing required fields\n{\n  \"code\": \"VALIDATION_ERROR\",\n  \"message\": \"The request body contains invalid fields\",\n  \"details\": [\n    {\n      \"field\": \"email\",\n      \"message\": \"must be a valid email address\",\n      \"code\": \"INVALID_FORMAT\"\n    }\n  ],\n  \"requestId\": \"\"\n}"
        },
        {
          "id": "Zr_kX-8__CwrsYfMqxo9-",
          "language": "404",
          "code": "// Not found — the requested resource does not exist\n{\n  \"code\": \"VALIDATION_ERROR\",\n  \"message\": \"The request body contains invalid fields\",\n  \"details\": [\n    {\n      \"field\": \"email\",\n      \"message\": \"must be a valid email address\",\n      \"code\": \"INVALID_FORMAT\"\n    }\n  ],\n  \"requestId\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "9-oqFIi6_3Wj2TK1fapqh"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}