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

# Update account

PATCH https://app.lumenia.net/api/v1/accounts/{accountId}
Content-Type: application/json

Update the supplied fields on an account.

Reference: https://docs.lumenia.net/api-reference/accounts/update-account

## Authentication

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

## Request

### Path parameters

- `accountId` (string, required) — Account to update.

### Body (application/json)

This endpoint expects an object.

- `name` (string, optional) — New name shown to users.

## Response

### 200

The updated account.

- `account` (V1AccountsAccountIdPatchResponsesContentApplicationJsonSchemaAccount, required) — The updated account.

## Errors

### 400 Bad Request Error

No updatable field was provided, or the new value failed validation.

- `error` (string, optional) — Human-readable reason the update was rejected.

### 403 Forbidden Error

The API key is missing or invalid.

- `message` (string, optional)

### 404 Not Found Error

The account was not found or is not available to this API key.

- `any`

### 500 Internal Server Error

Internal Server Error

- `any`

## Types

### V1AccountsAccountIdPatchResponsesContentApplicationJsonSchemaAccount

The updated account.

- `id` (string, optional) — The sole identifier for the account.
- `name` (string, optional) — Human-readable account name.
- `type` (string, optional) — The account type.
- `createdAt` (string, optional) — ISO 8601 timestamp of when the account was created.

## Examples

**Request**

```json
{
  "name": "New account name"
}
```

**Response**

```json
{
  "account": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "New account name",
    "type": "ipaas",
    "createdAt": "2026-06-15T05:24:00.000Z"
  }
}
```

**SDK Code**

```python Accounts_updateAccount_example
import requests

url = "https://app.lumenia.net/api/v1/accounts/accountId"

payload = { "name": "New account name" }
headers = {
    "Authorization": "Bearer <API_KEY>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Accounts_updateAccount_example
const url = 'https://app.lumenia.net/api/v1/accounts/accountId';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <API_KEY>', 'Content-Type': 'application/json'},
  body: '{"name":"New account name"}'
};

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

```go Accounts_updateAccount_example
package main

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

func main() {

	url := "https://app.lumenia.net/api/v1/accounts/accountId"

	payload := strings.NewReader("{\n  \"name\": \"New account name\"\n}")

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

	req.Header.Add("Authorization", "Bearer <API_KEY>")
	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 Accounts_updateAccount_example
require 'uri'
require 'net/http'

url = URI("https://app.lumenia.net/api/v1/accounts/accountId")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <API_KEY>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"New account name\"\n}"

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

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

HttpResponse<String> response = Unirest.patch("https://app.lumenia.net/api/v1/accounts/accountId")
  .header("Authorization", "Bearer <API_KEY>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"New account name\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://app.lumenia.net/api/v1/accounts/accountId', [
  'body' => '{
  "name": "New account name"
}',
  'headers' => [
    'Authorization' => 'Bearer <API_KEY>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Accounts_updateAccount_example
using RestSharp;

var client = new RestClient("https://app.lumenia.net/api/v1/accounts/accountId");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <API_KEY>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"New account name\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Accounts_updateAccount_example
import Foundation

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

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

let request = NSMutableURLRequest(url: NSURL(string: "https://app.lumenia.net/api/v1/accounts/accountId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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()
```