--- 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":"","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
Path Parameters
Request Body
update an account
    settings AccountSettings required
An Account object
Schema
    settings AccountSettings required
Bad Request
Requires authentication
Forbidden
Internal Server Error