# @vtex/api

> VTEX I/O API client

Latest version **7.5.0** (published 2026-08-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @vtex/api
pnpm add @vtex/api
yarn add @vtex/api
bun add @vtex/api
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

Negative: insecure dependencies.

## Facts

| | |
|---|---|
| Version | 7.5.0 |
| Published | 2026-08-27 |
| First published | 2016-08-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 46 |
| Unpacked size | 647.9 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 78 |
| Maintainers | alcar, arturpimentel, iago, salesfelipe, andreldsa, lurian, rafarubim, rafabac, victorhmp, augustob, afonsopraca, amoreira, nandoacoelho, kevinchevallier, vtexlab-user, eduardoformiga, natamelo, emersonlaurentino, viniagostini, lucasaarcoverde, lariciamota, geraldo.fernandes, mateuspontes, vitorlgomes, marcelovicentegc, maianabt, hiagolcm, wender, mendescamara, thiago.pereira.vtex, kevinvtex, myllena.alves, enzomerca, jardelymaris, daniyelnnr, denissilvavtex, vinhags, georgebrindeiro, marcos_vtex, laisribeiro, lucasfp13-vtex, brunoamui, fdaciuk_vtex, sophreisvtex, sagginvtex, williamcunhavtex, amandascmvtex, gabriel_bozelli, thaynannunes, yasminteles, guieevc-vtex, evertonstrack, arthurtriis1vtex, mmartinsoliv, rerissonvtex, ernestosbarbosa, wisney.cardeal, gabriellymoura, mpcardoso, rafael.pereira, amilton.vtex, orem, luis.mafra, luis.mollmann, leidymgdev, guilhermeribeiro30 |
| Keywords | vtex |

## Links

- npm: https://www.npmjs.com/package/@vtex/api
- Repository: https://github.com/vtex/node-vtex-api
- Homepage: https://github.com/vtex/node-vtex-api#readme
- Issues: https://github.com/vtex/node-vtex-api/issues
- npm.io page: https://npm.io/package/@vtex/api

## Dependencies (46)

- [qs](https://npm.io/package/qs.md) ^6.5.1
- [koa](https://npm.io/package/koa.md) ^2.11.0
- [xss](https://npm.io/package/xss.md) ^1.0.6
- [uuid](https://npm.io/package/uuid.md) ^3.3.3
- [axios](https://npm.io/package/axios.md) ^1.8.4
- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [ramda](https://npm.io/package/ramda.md) ^0.26.0
- [cookie](https://npm.io/package/cookie.md) ^0.3.1
- [rwlock](https://npm.io/package/rwlock.md) ^5.0.0
- [semver](https://npm.io/package/semver.md) ^5.5.1
- [tar-fs](https://npm.io/package/tar-fs.md) ^2.0.0
- [co-body](https://npm.io/package/co-body.md) ^6.0.0
- [graphql](https://npm.io/package/graphql.md) ^14.5.8
- [p-limit](https://npm.io/package/p-limit.md) ^2.2.0
- [archiver](https://npm.io/package/archiver.md) ^3.0.0
- [bluebird](https://npm.io/package/bluebird.md) ^3.5.4
- [fs-extra](https://npm.io/package/fs-extra.md) ^7.0.0
- [js-base64](https://npm.io/package/js-base64.md) ^2.5.1
- [lru-cache](https://npm.io/package/lru-cache.md) ^5.1.1
- [@types/koa](https://npm.io/package/@types/koa.md) ^2.11.0
- [dataloader](https://npm.io/package/dataloader.md) ^1.4.0
- [koa-router](https://npm.io/package/koa-router.md) ^7.4.0
- [mime-types](https://npm.io/package/mime-types.md) ^2.1.12
- [stats-lite](https://npm.io/package/stats-lite.md) github:vtex/node-stats-lite#v2.2.1
- [axios-retry](https://npm.io/package/axios-retry.md) ^3.1.2
- [koa-compose](https://npm.io/package/koa-compose.md) ^4.1.0
- [opentracing](https://npm.io/package/opentracing.md) ^0.14.4
- [prom-client](https://npm.io/package/prom-client.md) ^14.2.0
- [querystring](https://npm.io/package/querystring.md) ^0.2.0
- [tokenbucket](https://npm.io/package/tokenbucket.md) ^0.3.2
- [koa-compress](https://npm.io/package/koa-compress.md) ^3.0.0
- [@wry/equality](https://npm.io/package/@wry/equality.md) ^0.1.9
- [graphql-tools](https://npm.io/package/graphql-tools.md) ^4.0.6
- [jaeger-client](https://npm.io/package/jaeger-client.md) ^3.18.0
- [agentkeepalive](https://npm.io/package/agentkeepalive.md) ^4.0.2
- [graphql-upload](https://npm.io/package/graphql-upload.md) ^13.0.0
- [@opentelemetry/api](https://npm.io/package/@opentelemetry/api.md) ^1.9.0
- [@types/koa-compose](https://npm.io/package/@types/koa-compose.md) ^3.2.3
- [apollo-server-errors](https://npm.io/package/apollo-server-errors.md) ^2.2.1
- [@vtex/node-error-report](https://npm.io/package/@vtex/node-error-report.md) ^0.0.3
- [@vtex/diagnostics-nodejs](https://npm.io/package/@vtex/diagnostics-nodejs.md) 0.1.8-io
- [@vtex/diagnostics-semconv](https://npm.io/package/@vtex/diagnostics-semconv.md) 5.5.2
- [fast-json-stable-stringify](https://npm.io/package/fast-json-stable-stringify.md) ^2.0.0
- [@opentelemetry/host-metrics](https://npm.io/package/@opentelemetry/host-metrics.md) 0.35.5
- [@opentelemetry/instrumentation](https://npm.io/package/@opentelemetry/instrumentation.md) 0.57.2
- [@opentelemetry/instrumentation-koa](https://npm.io/package/@opentelemetry/instrumentation-koa.md) 0.47.1

## Recent versions

- 7.5.0 (latest) — 2026-08-27
- 6.51.3 (v6-latest) — 2026-08-05
- 6.51.1-beta (beta) — 2026-08-05
- 6.51.0 (vv6-latest) — 2026-07-03
- 3.77.8 (v3-latest) — 2022-12-15
- 1.9.4 (v1-latest) — 2022-04-18
- 6.45.1-alpha (alpha) — 2021-08-26
- 3.77.2-beta (v3-beta) — 2021-02-05
- 3.71.2-toolbelt.0 (toolbelt) — 2020-08-26
- 6.1.0-beta.8 (6xbeta) — 2019-12-09
- 6.52.0 — 2026-08-27
- 7.4.2 — 2026-08-05
- 7.4.2-beta.1 — 2026-08-05
- 7.4.1 — 2026-08-03
- 7.4.1-beta.1 — 2026-07-22
- … 949 more at https://npm.io/package/@vtex/api/versions

## README

# VTEX IO API Client for Node


This library enables developers to quickly integrate with the VTEX IO APIs and create full fledged node services using VTEX IO.

[![Build Status](https://travis-ci.org/vtex/node-vtex-api.svg?branch=master)](https://travis-ci.org/vtex/node-vtex-api)

## Getting started

For a complete example on using `@vtex/api`, check out this app: https://github.com/vtex-apps/service-example

The most basic usage is to export a new `Service()` with your route handlers:

```javascript
// Import global types
import './globals'

import { Service } from '@vtex/api'

import { clients } from './clients'
import example from './handlers/example'

// Export a service that defines route handlers and client options.
export default new Service({
  clients,
  routes: {
    example,
  },
})
```

This allows you to define middlewares that receive a `Context` param which contains all IO Clients in the `clients` property:

```javascript
export const example = async (ctx: Context, next: () => Promise<void>) => {
  const {state: {code}, clients: {apps}} = ctx
  console.log('Received code:', code)

  const apps = await apps.listApps()
  
  ctx.status = 200
  ctx.body = apps
  ctx.set('Cache-Control', 'private')

  await next()
}
```

`ctx.clients.apps` is an instance of `Apps`.

## Development

- Install the dependencies: `yarn`
- Watch for changes: `yarn watch`

### Development with IO clients

- Install the dependencies: `yarn`
- [Link](https://classic.yarnpkg.com/en/docs/cli/link/) this package: `yarn link`
- Watch for changes: `yarn watch`
- Move to the app that depends on the changes made on this package: `cd ../<your-app>/node`
- Link this package to your app's node_modules: `yarn link @vtex/api`

Now, when you get a workspace up and running for your app with `vtex link`, you'll have this package linked as well.

> When done developing, don't forget to unlink it from `<your-app>/node`: `yarn unlink @vtex/api`

<!-- Test PR to validate SonarQube configuration -->

---
_Source: https://npm.io/package/@vtex/api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
