---
agentTools:
  projectIndex: https://docs.edrv.io/llms.txt
---

# /v1.1/users/{id}

Update a user. **Not allowed to update: email**

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "eDRV API",
    "version": "v1.1",
    "description": "edrv.io API Documentation",
    "contact": {
      "name": "eDRV",
      "url": "https://edrv.io",
      "email": "support@edrv.io"
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "paths": {
    "/v1.1/users/{id}": {
      "patch": {
        "operationId": "patchUser",
        "description": "Update a user. **Not allowed to update: email**",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of user that needs to be updated",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "picture": {
                    "type": "string",
                    "example": "Image URL"
                  },
                  "active": {
                    "type": "boolean",
                    "default": true,
                    "description": "Activate/Deactivate this user",
                    "example": true
                  },
                  "firstname": {
                    "type": "string",
                    "example": "James"
                  },
                  "lastname": {
                    "type": "string",
                    "example": "Brown"
                  },
                  "address": {
                    "type": "object",
                    "properties": {
                      "streetAndNumber": {
                        "type": "string",
                        "example": "1 Soul Avenue"
                      },
                      "city": {
                        "type": "string",
                        "example": "Atlanta"
                      },
                      "postalCode": {
                        "type": "string",
                        "example": "30901"
                      },
                      "country": {
                        "type": "string",
                        "example": "USA"
                      }
                    }
                  },
                  "phone": {
                    "type": "object",
                    "properties": {
                      "mobile": {
                        "type": "string",
                        "example": "(705)123-1212"
                      },
                      "home": {
                        "type": "string",
                        "example": "(706)124-1212"
                      },
                      "work": {
                        "type": "string",
                        "example": "(706)125-1212"
                      }
                    }
                  },
                  "meta_data": {
                    "type": "object",
                    "example": {}
                  }
                }
              }
            }
          },
          "description": "Include user properties to edit here",
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns the updated user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "result": {
                      "$ref": "#/components/schemas/schema7"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A failure response"
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "//api.edrv.io"
    }
  ],
  "components": {
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://auth.edrv.io/authorize",
            "scopes": {}
          }
        }
      }
    },
    "schemas": {
      "schema2": {
        "type": "string",
        "format": "date-time",
        "description": "UTC Date as an ISO String",
        "example": "2021-07-21T12:50:36.660Z",
        "readOnly": true
      },
      "schema7": {
        "type": "object",
        "properties": {
          "picture": {
            "type": "string",
            "example": "Image URL"
          },
          "active": {
            "type": "boolean",
            "default": true,
            "description": "Activate/Deactivate this user (*Not implimented yet)",
            "example": true
          },
          "firstname": {
            "type": "string",
            "example": "James"
          },
          "lastname": {
            "type": "string",
            "example": "Brown"
          },
          "email": {
            "type": "string",
            "example": "godfather@soul.com"
          },
          "address": {
            "type": "object",
            "properties": {
              "streetAndNumber": {
                "type": "string",
                "example": "1 Soul Avenue"
              },
              "city": {
                "type": "string",
                "example": "Atlanta"
              },
              "postalCode": {
                "type": "string",
                "example": "30901"
              },
              "state": {
                "type": "string",
                "example": "New York"
              },
              "country": {
                "type": "string",
                "example": "USA"
              }
            }
          },
          "phone": {
            "type": "object",
            "properties": {
              "mobile": {
                "type": "string",
                "example": "(705)123-1212"
              },
              "home": {
                "type": "string",
                "example": "(706)124-1212"
              },
              "work": {
                "type": "string",
                "example": "(706)125-1212"
              }
            }
          },
          "meta_data": {
            "type": "object",
            "example": {}
          },
          "createdAt": {
            "$ref": "#/components/schemas/schema2"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/schema2"
          }
        },
        "required": [
          "firstname",
          "lastname",
          "email"
        ]
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 97,
      "1": 225,
      "2": 98,
      "3": 122,
      "4": 47,
      "5": 2,
      "6": 237,
      "7": 203,
      "8": 210,
      "9": 128,
      "10": 101,
      "11": 166
    }
  }
}
```