# Change the API version

`POST https://api.fiscalisto.com/v1/account`

Moves the account's API version: the one your requests get without the Fiscalisto-Version header and your webhooks without their own api_version. First, try the new one by sending Fiscalisto-Version in your requests. With an account key with every permission (not one of a test environment). It's recorded in Desarrolladores › Actividad.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | header |  | Optional (the SDKs send it on their own). If the response is lost, repeat the request with the same value within 24 hours: it answers the same, with idempotent-replayed: true, and doesn't do it twice (it doesn't create, send emails or charge). |

## Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `api_version` | string | yes | The account's API version: the one your requests get without Fiscalisto-Version and your webhooks without their own api_version. Try the new one first with the header. |

Example:

```json
{
  "api_version": "2026-10-24"
}
```

## With the TypeScript SDK

```ts
import { Fiscalisto } from "fiscalisto";

// La llave viene de FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const account = await fiscalisto.account.update({ api_version: "2026-10-24" }, { idempotencyKey: "pedido-A-1042" });
```

## With the Python SDK

```python
from fiscalisto import Fiscalisto

# La llave viene de FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

account = fiscalisto.account.update({"api_version": "2026-10-24"}, idempotency_key="pedido-A-1042")
```

## With the PHP SDK

```php
<?php

use Fiscalisto\Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$account = $fiscalisto->account->update(['api_version' => '2026-10-24'], ['idempotency_key' => 'pedido-A-1042']);
```

## With the .NET SDK

```csharp
using Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var account = await fiscalisto.Account.UpdateAsync(new UpdateAccountParams { ApiVersion = "2026-10-24" }, new RequestOptions { IdempotencyKey = "pedido-A-1042" });
```

## With the Go SDK

```go
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// La llave viene de FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	account, err := client.Account.Update(ctx, &fiscalisto.UpdateAccountParams{APIVersion: "2026-10-24"}, fiscalisto.WithIdempotencyKey("pedido-A-1042"))
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(account.ID)
}
```

## With the Java SDK

```java
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.RequestOptions;
import com.fiscalisto.model.UpdateAccountParams;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var account = fiscalisto.account().update(new UpdateAccountParams().setApiVersion("2026-10-24"), RequestOptions.idempotencyKey("pedido-A-1042"));
System.out.println(account.getId());
```

## Response 200

OK.

A `Account` object:

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `object` | `"account"` | yes | What kind of object it is («invoice», «customer»…). |
| `name` | string | yes | The API account's name. |
| `api_version` | string | yes | The account's API version (the one used by your requests without Fiscalisto-Version). See Versions. |
| `latest_api_version` | string | yes | The latest API version. |
| `key` | object | yes | The key the request was made with: id, name and the issuers it is limited to. |
| `key.id` | string | yes | Key id. |
| `key.name` | string | yes | Key name. |
| `key.issuers` | array of string or null | yes | Issuers the key is limited to; null if it can use all of them. |
| `key.read_only` | boolean | yes | true if the key is read-only (key_read_only on everything else). |
| `key.expires_at` | string (date-time) or null | yes | When it stops working: the lifetime chosen when it was created, or the end of the overlap when it was rotated. null if it doesn't expire. |
| `key.sandbox` | string or null | yes | The key's sandbox (sbx_…): it only sees its own issuers, webhooks and events. null if it belongs to the account. |

```json
{
  "id": "org_39c5a6b2-02b3-8453-9c35-aba6b43c876a",
  "object": "account",
  "livemode": false,
  "name": "Mi plataforma",
  "api_version": "2026-10-24",
  "latest_api_version": "2026-10-24",
  "key": {
    "id": "key_vFQbeTxgHVoTlowHaTLR",
    "name": "Pruebas",
    "issuers": null,
    "read_only": false,
    "expires_at": null,
    "sandbox": null
  }
}
```

## Errors

- `api_version_invalid` (400): There's no such API version (in Fiscalisto-Version or api_version). See Versiones in the docs for the ones there are.

Plus those of any call (key, fields, limits): https://fiscalisto.com/en/docs/api/errores.md.
