---
id: update-account
title: "Update an Account"
description: "Update information about an account"
sidebar_label: "Update an Account"
hide_title: true
hide_table_of_contents: true
api: {"description":"Update information about an account","tags":["Accounts"],"operationId":"updateAccount","security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"accountId","required":true,"schema":{"type":"string"},"description":"The unique identifier of an account"}],"requestBody":{"description":"update an account","content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"properties":{"peer_login_expiration_enabled":{"description":"Enables or disables peer login expiration globally. After peer's login has expired the user has to log in (authenticate). Applies only to peers that were added by a user (interactive SSO login).","type":"boolean"},"peer_login_expiration":{"description":"Period of time after which peer login expires (seconds).","type":"integer"}},"required":["peer_login_expiration_enabled","peer_login_expiration"],"title":"AccountSettings"}},"required":["settings"]}}}},"responses":{"200":{"description":"An Account object","content":{"application/json":{"schema":{"properties":{"id":{"description":"Account ID","type":"string"},"settings":{"properties":{"peer_login_expiration_enabled":{"description":"Enables or disables peer login expiration globally. After peer's login has expired the user has to log in (authenticate). Applies only to peers that were added by a user (interactive SSO login).","type":"boolean"},"peer_login_expiration":{"description":"Period of time after which peer login expires (seconds).","type":"integer"}},"required":["peer_login_expiration_enabled","peer_login_expiration"],"title":"AccountSettings"}},"required":["id","settings"],"title":"Account"}}}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"put","path":"/api/accounts/{accountId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"jsonRequestBodyExample":{"settings":{"peer_login_expiration_enabled":true,"peer_login_expiration":0}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Update an Account","description":{"content":"Update information about an account","type":"text/plain"},"url":{"path":["api","accounts",":accountId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of an account","type":"text/plain"},"type":"any","value":"","key":"accountId"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
sidebar_class_name: "put api-method"
info_path: api/netbird-rest-api
custom_edit_url: null
---

import ApiTabs from "@theme/ApiTabs";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import TabItem from "@theme/TabItem";

## Update an Account



Update information about an account

<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"path","name":"accountId","required":true,"schema":{"type":"string"},"description":"The unique identifier of an account"}}></ParamsItem></ul></div></details><MimeTabs><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Request Body</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}><div style={{"marginTop":"1rem","marginBottom":"1rem"}}>

update an account

</div></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>settings</strong><span style={{"opacity":"0.6"}}> AccountSettings</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"peer_login_expiration_enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Enables or disables peer login expiration globally. After peer's login has expired the user has to log in (authenticate). Applies only to peers that were added by a user (interactive SSO login).","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"peer_login_expiration"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Period of time after which peer login expires (seconds).","type":"integer"}}></SchemaItem></div></details></SchemaItem></ul></details></TabItem></MimeTabs><div><ApiTabs><TabItem label={"200"} value={"200"}><div>

An Account object

</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Account ID","type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>settings</strong><span style={{"opacity":"0.6"}}> AccountSettings</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"peer_login_expiration_enabled"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Enables or disables peer login expiration globally. After peer's login has expired the user has to log in (authenticate). Applies only to peers that were added by a user (interactive SSO login).","type":"boolean"}}></SchemaItem><SchemaItem collapsible={false} name={"peer_login_expiration"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Period of time after which peer login expires (seconds).","type":"integer"}}></SchemaItem></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n  \"id\": \"string\",\n  \"settings\": {\n    \"peer_login_expiration_enabled\": true,\n    \"peer_login_expiration\": 0\n  }\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>

Bad Request

</div><div></div></TabItem><TabItem label={"401"} value={"401"}><div>

Requires authentication

</div><div></div></TabItem><TabItem label={"403"} value={"403"}><div>

Forbidden

</div><div></div></TabItem><TabItem label={"500"} value={"500"}><div>

Internal Server Error

</div><div></div></TabItem></ApiTabs></div>
      