> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.awork.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.awork.com/_mcp/server.

# Updates the account profile and starts email verification when required.

PUT https://api.awork.com/api/v1/accounts/{accountId}
Content-Type: application/json

Any authenticated user.

Reference: https://developers.awork.com/apiv1/accounts/put-accounts-by-account-id

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `accountId` (string, required) — The accountId value.

### Query parameters

- `skipEmailVerification` (boolean, optional, default: false) — The skipEmailVerification value.
- `sendAdminInitiatedVerificationEmail` (boolean, optional, default: false) — The sendAdminInitiatedVerificationEmail value.

### Body (application/json)

This endpoint expects an AccountForm.

- `email` (string, optional, nullable) — The email of the account.
- `firstName` (string, optional, nullable) — The first name of the account.
- `lastName` (string, optional, nullable) — The last name of the account.
- `language` (string, optional, nullable) — The language of the account, as a Language Culture Name (de-DE).
- `timezone` (string, optional, nullable) — The timezone of the account. The format of the timezone is the IANA standard.
- `mfaEnabled` (boolean, optional) — Whether MFA is enabled for the account.

## Response

### 200

OK

- `email` (string, optional, nullable) — The email of the account.
- `firstName` (string, optional, nullable) — The first name of the account.
- `lastName` (string, optional, nullable) — The last name of the account.
- `language` (string, optional, nullable) — The language of the account, as a Language Culture Name (de-DE).
- `timezone` (string, optional, nullable) — The timezone of the account. The format of the timezone is the IANA standard.
- `mfaEnabled` (boolean, optional) — Whether MFA is enabled for the account.
- `id` (string, optional) — The id of the account.
- `passwordIsAutoGenerated` (boolean, optional) — Whether the password is generated by awork.
- `emailConfirmed` (boolean, optional) — Whether the email has been confirmed by the user.
- `externalAccounts` (list of ExternalAccount, optional, nullable) — The list of connected social providers.
- `mfaProviders` (list of string, optional, nullable) — The enabled MFA providers for the account. Currently we support "Email" and "Authenticator".
- `passwordlessEnabled` (boolean, optional) — Whether the account has passwordless login enabled.

## Errors

### 400 Bad Request Error

Bad Request

- `code` (string, required) — The error code.
- `description` (string, required) — The description of the error.
- `link` (string, required) — The link to the API documentation page.
- `details` (list of string, optional, nullable) — A list of details describing the error.
- `validationErrors` (list of ValidationErrorResponse, optional, nullable) — If a validation error occurred, this contains the validation errors for each property.
- `traceId` (string, optional, nullable) — The request trace id for tracking the request.

### 401 Unauthorized Error

Unauthorized

- `code` (string, required) — The error code.
- `description` (string, required) — The description of the error.
- `link` (string, required) — The link to the API documentation page.
- `details` (list of string, optional, nullable) — A list of details describing the error.
- `validationErrors` (list of ValidationErrorResponse, optional, nullable) — If a validation error occurred, this contains the validation errors for each property.
- `traceId` (string, optional, nullable) — The request trace id for tracking the request.

### 404 Not Found Error

Not Found

- `code` (string, required) — The error code.
- `description` (string, required) — The description of the error.
- `link` (string, required) — The link to the API documentation page.
- `details` (list of string, optional, nullable) — A list of details describing the error.
- `validationErrors` (list of ValidationErrorResponse, optional, nullable) — If a validation error occurred, this contains the validation errors for each property.
- `traceId` (string, optional, nullable) — The request trace id for tracking the request.

## Types

### ExternalAccount

- `provider` (string, optional, nullable) — The name of the external provider.
- `externalUserId` (string, optional, nullable) — The id of the user for the external account.

### ValidationErrorResponse

The validation error response.

- `property` (string, optional, nullable) — The name of the property that failed validation.
- `message` (string, optional, nullable) — The reason why this property failed validation.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "email": "carla.creative@ncnstn.com",
  "firstName": "Carla",
  "lastName": "Creative",
  "language": "en-GB",
  "timezone": "Europe/London",
  "mfaEnabled": true,
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "passwordIsAutoGenerated": false,
  "emailConfirmed": true,
  "externalAccounts": [
    {
      "provider": "google",
      "externalUserId": "11112222333344445555"
    }
  ],
  "mfaProviders": [
    "Email",
    "Authenticator"
  ],
  "passwordlessEnabled": true
}
```

**SDK Code**

```python
import requests

url = "https://api.awork.com/api/v1/accounts/accountId"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.awork.com/api/v1/accounts/accountId';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.awork.com/api/v1/accounts/accountId"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.awork.com/api/v1/accounts/accountId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.awork.com/api/v1/accounts/accountId")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.awork.com/api/v1/accounts/accountId', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.awork.com/api/v1/accounts/accountId");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.awork.com/api/v1/accounts/accountId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```