# v0.103.0: Removal of axios
The `api.axios` library has been removed from the backend scripting API.

Scripts that attempt to use `api.axios` will now throw an error with migration instructions.

## Reasoning

Axios was marked as deprecated at least since April 2024 in favor of the native `fetch()` API, which is available in both browser and Node.js environments. After two years of deprecation, the library was removed following the [March 2026 npm supply chain compromise](https://www.malwarebytes.com/blog/news/2026/03/axios-supply-chain-attack-chops-away-at-npm-trust), where attackers published malicious versions that deployed a remote access trojan. The Trilium's main developer almost got compromised, but `pnpm` not trusting unknown post-install scripts successfully avoided that.

## Migration

Replace `api.axios` calls with the native `fetch()` API.

### `GET` calls

Before (Axios):

```javascript
const response = await api.axios.get('https://api.example.com/data');
const data = response.data;
```

After (`fetch`):

```javascript
const response = await fetch('https://api.example.com/data');
const data = await response.json();
```

### `POST` calls

Before (Axios):

```javascript
await api.axios.post('https://api.example.com/data', { key: 'value' });
```

After (fetch):

```javascript
await fetch('https://api.example.com/data', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ key: 'value' })
});
```