> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usebruno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

Each function is used in a complete, runnable script in its guide: [Postman](https://docs.usebruno.com/converters/postman-to-bruno.md), [Insomnia](https://docs.usebruno.com/converters/insomnia-to-bruno.md), [OpenAPI](https://docs.usebruno.com/converters/openapi-to-bruno.md), and [WSDL](https://docs.usebruno.com/converters/wsdl-to-bruno.md).

## postmanToBruno

Converts a Postman collection to a Bruno collection.

> [!WARNING]
>
> `postmanToBruno` is async and returns a Promise. `await` the result, or the value you get back is a pending Promise rather than the collection.

```javascript theme={null}
const { collection, issues } = await postmanToBruno(postmanCollection, options);
```

**Parameters**

**postmanCollection** `object` *required*

The Postman collection, parsed from its JSON export.

**options** `object`

**properties**

**preserveScripts** `boolean` (default: false)

Keep pre-request and post-response scripts exactly as written in Postman instead of translating `pm.*` calls to Bruno's `bru.*` API.

**useWorkers** `boolean` (default: false)

Translate scripts in worker threads. Speeds up large collections.

**Returns**

**collection** `object`

The Bruno collection.

**issues** `array`

Items that could not be converted cleanly. Each entry has a `severity`, the `path` of the item it concerns, and a `message`.

## postmanToBrunoEnvironment

Converts a Postman environment to a Bruno environment.

```javascript theme={null}
const environment = postmanToBrunoEnvironment(postmanEnvironment);
```

**Parameters**

**postmanEnvironment** `object` *required*

The Postman environment, parsed from its JSON export.

**Returns**

**environment** `object`

The Bruno environment.

## insomniaToBruno

Converts an Insomnia collection to a Bruno collection.

```javascript theme={null}
const collection = insomniaToBruno(insomniaCollection);
```

**Parameters**

**insomniaCollection** `object` *required*

The Insomnia export, parsed from JSON.

**Returns**

**collection** `object`

The Bruno collection.

## openApiToBruno

Converts an OpenAPI 3.x or Swagger 2.0 specification to a Bruno collection.

```javascript theme={null}
const collection = openApiToBruno(openApiSpec, options);
```

**Parameters**

**openApiSpec** `object | string` *required*

The specification as a parsed object, or as a raw JSON or YAML string.

**options** `object`

**properties**

**groupBy** `string` (default: tags)

How requests are grouped into folders: `"tags"` groups by operation tag, `"path"` groups by URL path.

**Returns**

**collection** `object`

The Bruno collection.

## wsdlToBruno

Converts a WSDL file to a Bruno collection of SOAP requests.

> [!WARNING]
>
> `wsdlToBruno` is async and returns a Promise. `await` the result, or the value you get back is a pending Promise rather than the collection.

```javascript theme={null}
const collection = await wsdlToBruno(wsdlContent);
```

**Parameters**

**wsdlContent** `string` *required*

The WSDL file content.

**Returns**

**collection** `object`

The Bruno collection.
