---
agentTools:
  projectIndex: https://percolate.dev/llms.txt
---

# /api/v5/user/{user_id}

Update and return a user.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Percolate V5 OpenAPI Specification",
    "description": "The Percolate API is RESTful in nature. Our APIs use HTTP resource-oriented URLs. HTTP methods are used to issue requests. HTTP response codes are used to indicate API successes or failures. All API requests and responses are in JSON representation. This document describes the HTTP resources and methods that form the Percolate API.\n",
    "version": "1.0.0",
    "contact": {
      "name": "Percolate Engineering"
    }
  },
  "servers": [
    {
      "url": "https://percolate.com"
    },
    {
      "url": "https://devolate.com"
    }
  ],
  "tags": [
    {
      "name": "User"
    }
  ],
  "components": {
    "securitySchemes": {
      "oauth2": {
        "description": "Percolate supports OAuth 2.0 for authenticating all API requests.\n",
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://percolate.com/api/v5/authorize",
            "tokenUrl": "https://percolate.com/api/v5/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "paths": {
    "/api/v5/user/{user_id}": {
      "parameters": [
        {
          "name": "user_id",
          "in": "path",
          "required": true,
          "schema": {
            "pattern": "^user:[a-zA-Z0-9_-]+$",
            "type": "string"
          }
        }
      ],
      "put": {
        "description": "Update and return a user.",
        "operationId": "updateUser",
        "tags": [
          "User"
        ],
        "security": [
          {
            "oauth2": [
              "user:update"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "consent": {
                    "description": "`true` user consented terms, `false` user forbid terms. `null` when user hasn't responded yet or terms not required by the tenant. This attribute is only visible for the current user or system admins.\n",
                    "type": "boolean",
                    "nullable": true
                  },
                  "email": {
                    "description": "User's login email.",
                    "example": "firstname.lastname@percolate.com",
                    "type": "string",
                    "format": "email"
                  },
                  "name": {
                    "description": "The full name of the User.",
                    "example": "Firstname Lastname",
                    "type": "string"
                  },
                  "timezone": {
                    "title": "timezone",
                    "description": "A timezone name from the [tz database](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Timezone abbreviations (eg. EST) are *not* supported.\n",
                    "type": "string"
                  },
                  "active": {
                    "description": "The status of the user which is used for disabling/reactivating user",
                    "type": "boolean"
                  },
                  "sso_disabled": {
                    "description": "Whether SSO is disabled for this user.",
                    "type": "boolean"
                  },
                  "default_license_id": {
                    "title": "license_scope_id",
                    "description": "A valid license ID `^license:\\d+$`.",
                    "type": "string",
                    "pattern": "^license:\\d+$",
                    "example": "license:1",
                    "nullable": true
                  }
                }
              },
              "examples": {
                "request": {
                  "value": {
                    "email": "firstname123.lastname@percolate.com",
                    "name": "Firstname123 Lastname",
                    "timezone": "US/Pacific",
                    "active": true,
                    "sso_disabled": false,
                    "default_license_id": "license:1"
                  }
                }
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "Update and return a user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "title": "User",
                      "type": "object",
                      "required": [
                        "id",
                        "avatar_id",
                        "email",
                        "name",
                        "timezone",
                        "updated_at",
                        "disabled_at",
                        "is_tfa_enabled"
                      ],
                      "properties": {
                        "consent": {
                          "description": "`true` user consented terms, `false` user forbid terms. `null` when user hasn't responded yet or terms not required by the tenant. This attribute is only visible for the current user or system admins.\n",
                          "type": "boolean",
                          "nullable": true
                        },
                        "consented_at": {
                          "description": "When a user gave consent. See `disabled_at` for users who didn't consent. This attribute is only visible for the current user or system admins.\n",
                          "format": "date-time",
                          "type": "string",
                          "nullable": true
                        },
                        "id": {
                          "title": "user_id",
                          "type": "string",
                          "description": "The user ID.",
                          "pattern": "^user:\\d+$"
                        },
                        "email": {
                          "description": "User's login email.",
                          "example": "firstname.lastname@percolate.com",
                          "type": "string",
                          "format": "email"
                        },
                        "name": {
                          "description": "The full name of the User.",
                          "example": "Firstname Lastname",
                          "type": "string"
                        },
                        "timezone": {
                          "title": "timezone",
                          "description": "A timezone name from the [tz database](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Timezone abbreviations (eg. EST) are *not* supported.\n",
                          "type": "string"
                        },
                        "avatar_id": {
                          "nullable": true
                        },
                        "photo_url": {
                          "description": "The CDN URL for the user's avatar image.",
                          "example": "https://example.com/avatar.jpg",
                          "type": "string"
                        },
                        "default_license_id": {
                          "title": "license_scope_id",
                          "description": "A valid license ID `^license:\\d+$`.",
                          "type": "string",
                          "pattern": "^license:\\d+$",
                          "example": "license:1",
                          "nullable": true
                        },
                        "sso_disabled": {
                          "description": "Whether SSO is disabled for this user.",
                          "type": "boolean"
                        },
                        "is_tfa_enabled": {
                          "type": "boolean",
                          "description": "Whether two factor auth is enabled or not."
                        },
                        "updated_at": {
                          "title": "updated_At",
                          "description": "An absolute datetime indicating when this resource was last modified.",
                          "example": "2014-06-10T00:00:00Z",
                          "format": "date-time",
                          "type": "string"
                        },
                        "disabled_at": {
                          "description": "An absolute datetime indicating when this user was disabled.",
                          "example": "2014-06-10T00:00:00Z",
                          "format": "date-time",
                          "type": "string",
                          "nullable": true
                        }
                      }
                    },
                    "include": {
                      "type": "object",
                      "description": "An array of objects keyed by ID type (ex. `{ user: [] }`). ID type keys will only exist when a resource(s) is requested with the `?include=` query parameter.\n"
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "data": {
                        "id": "user:1",
                        "email": "firstname.lastname@percolate.com",
                        "name": "Firstname Lastname",
                        "timezone": "US/Pacific",
                        "avatar_id": null,
                        "photo_url": "https://example.com/avatar.jpg",
                        "default_license_id": "license:1",
                        "sso_disabled": false,
                        "is_tfa_enabled": false,
                        "updated_at": "2015-08-12T23:51:42Z",
                        "disabled_at": "2015-08-12T23:51:42Z"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "description": "A list of error objects for a given operation.",
                      "items": {
                        "description": "An error object",
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "code": {
                            "description": "An arbitrary error code",
                            "type": "string",
                            "nullable": true
                          },
                          "message": {
                            "description": "A human readable message description what the error was.",
                            "type": "string",
                            "nullable": true
                          },
                          "key": {
                            "description": "A subset of [JSONPath](http://goessner.net/articles/JsonPath/) format to identify which part of the input data triggered the error. The value may also be `null` to indicate errors that aren't specific to one input field.",
                            "type": "string",
                            "nullable": true
                          },
                          "value": {
                            "description": "A value associated with the error. Useful for eg. validation errors where it may be desirable to report which input value of many was bad.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "code"
                        ]
                      }
                    }
                  }
                },
                "example": {
                  "errors": [
                    {
                      "code": "input:invalid_value",
                      "message": "Invalid attribute(s) given: foo",
                      "key": "$.include",
                      "value": "foo"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "description": "A list of error objects for a given operation.",
                      "items": {
                        "description": "An error object",
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "code": {
                            "description": "An arbitrary error code",
                            "type": "string",
                            "nullable": true
                          },
                          "message": {
                            "description": "A human readable message description what the error was.",
                            "type": "string",
                            "nullable": true
                          },
                          "key": {
                            "description": "A subset of [JSONPath](http://goessner.net/articles/JsonPath/) format to identify which part of the input data triggered the error. The value may also be `null` to indicate errors that aren't specific to one input field.",
                            "type": "string",
                            "nullable": true
                          },
                          "value": {
                            "description": "A value associated with the error. Useful for eg. validation errors where it may be desirable to report which input value of many was bad.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "code"
                        ]
                      }
                    }
                  }
                },
                "example": {
                  "errors": [
                    {
                      "code": "input:invalid_value",
                      "message": "Invalid attribute(s) given: foo",
                      "key": "$.include",
                      "value": "foo"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid authorization or resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "description": "A list of error objects for a given operation.",
                      "items": {
                        "description": "An error object",
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "code": {
                            "description": "An arbitrary error code",
                            "type": "string",
                            "nullable": true
                          },
                          "message": {
                            "description": "A human readable message description what the error was.",
                            "type": "string",
                            "nullable": true
                          },
                          "key": {
                            "description": "A subset of [JSONPath](http://goessner.net/articles/JsonPath/) format to identify which part of the input data triggered the error. The value may also be `null` to indicate errors that aren't specific to one input field.",
                            "type": "string",
                            "nullable": true
                          },
                          "value": {
                            "description": "A value associated with the error. Useful for eg. validation errors where it may be desirable to report which input value of many was bad.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "code"
                        ]
                      }
                    }
                  }
                },
                "example": {
                  "errors": [
                    {
                      "code": "input:invalid_value",
                      "message": "Invalid attribute(s) given: foo",
                      "key": "$.include",
                      "value": "foo"
                    }
                  ]
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "description": "A list of error objects for a given operation.",
                      "items": {
                        "description": "An error object",
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "code": {
                            "description": "An arbitrary error code",
                            "type": "string",
                            "nullable": true
                          },
                          "message": {
                            "description": "A human readable message description what the error was.",
                            "type": "string",
                            "nullable": true
                          },
                          "key": {
                            "description": "A subset of [JSONPath](http://goessner.net/articles/JsonPath/) format to identify which part of the input data triggered the error. The value may also be `null` to indicate errors that aren't specific to one input field.",
                            "type": "string",
                            "nullable": true
                          },
                          "value": {
                            "description": "A value associated with the error. Useful for eg. validation errors where it may be desirable to report which input value of many was bad.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "code"
                        ]
                      }
                    }
                  }
                },
                "example": {
                  "errors": [
                    {
                      "code": "input:invalid_value",
                      "message": "Invalid attribute(s) given: foo",
                      "key": "$.include",
                      "value": "foo"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "description": "A list of error objects for a given operation.",
                      "items": {
                        "description": "An error object",
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "code": {
                            "description": "An arbitrary error code",
                            "type": "string",
                            "nullable": true
                          },
                          "message": {
                            "description": "A human readable message description what the error was.",
                            "type": "string",
                            "nullable": true
                          },
                          "key": {
                            "description": "A subset of [JSONPath](http://goessner.net/articles/JsonPath/) format to identify which part of the input data triggered the error. The value may also be `null` to indicate errors that aren't specific to one input field.",
                            "type": "string",
                            "nullable": true
                          },
                          "value": {
                            "description": "A value associated with the error. Useful for eg. validation errors where it may be desirable to report which input value of many was bad.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "code"
                        ]
                      }
                    }
                  }
                },
                "example": {
                  "errors": [
                    {
                      "code": "input:invalid_value",
                      "message": "Invalid attribute(s) given: foo",
                      "key": "$.include",
                      "value": "foo"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit. Response should contain a `Retry-After` header",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "description": "A list of error objects for a given operation.",
                      "items": {
                        "description": "An error object",
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "code": {
                            "description": "An arbitrary error code",
                            "type": "string",
                            "nullable": true
                          },
                          "message": {
                            "description": "A human readable message description what the error was.",
                            "type": "string",
                            "nullable": true
                          },
                          "key": {
                            "description": "A subset of [JSONPath](http://goessner.net/articles/JsonPath/) format to identify which part of the input data triggered the error. The value may also be `null` to indicate errors that aren't specific to one input field.",
                            "type": "string",
                            "nullable": true
                          },
                          "value": {
                            "description": "A value associated with the error. Useful for eg. validation errors where it may be desirable to report which input value of many was bad.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "code"
                        ]
                      }
                    }
                  }
                },
                "example": {
                  "errors": [
                    {
                      "code": "input:invalid_value",
                      "message": "Invalid attribute(s) given: foo",
                      "key": "$.include",
                      "value": "foo"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 93,
      "1": 205,
      "2": 195,
      "3": 215,
      "4": 75,
      "5": 71,
      "6": 148,
      "7": 0,
      "8": 18,
      "9": 126,
      "10": 128,
      "11": 225
    }
  }
}
```