# Postman, Insomnia, Bruno and OpenAPI

Download a ready-to-run collection for Postman, Insomnia or Bruno, or the OpenAPI contract for any other tool or generated client.

Source: https://docs.pantechdynamics.com/api/postman-openapi

Every endpoint in this reference is in each of these downloads. They are all generated from the same contract the API is tested against, every time the reference is, so they always match it and each other.

::::cards
:::card[Postman collection]{href=/postman/pantech-public-api.postman_collection.json cta="Download"}
Every request, ready to run: grouped like this reference, with example bodies, your key and the `Idempotency-Key` already set up.
:::
:::card[Insomnia collection]{href=/insomnia/pantech-public-api.insomnia.json cta="Download"}
The same requests as an Insomnia export, with the key in its base environment.
:::
:::card[Bruno collection]{href=/bruno/pantech-public-api.bruno.zip cta="Download"}
The same requests as a Bruno collection folder, zipped, with the key as a secret environment variable.
:::
:::card[OpenAPI contract]{href=/openapi/public-api.yaml cta="Download"}
The OpenAPI 3.1 description of the API, for any other tool, code generators and AI agents.
:::
::::

The contract is also published as [JSON](https://docs.pantechdynamics.com/openapi/public-api.json). The Postman collection and the contract are also at the top of the sidebar on every API page.

## Use it in Postman

1. In Postman, choose **Import**, and paste this link:

   ```text
   https://docs.pantechdynamics.com/postman/pantech-public-api.postman_collection.json
   ```

2. Open the **Pantech Dynamics public API** collection, then its **Variables** tab. Put your [API key](https://docs.pantechdynamics.com/getting-started/api-keys) in the **Current value** of `apiKey`. The current value stays on your machine; it is not synced to your Postman workspace.
3. Send **Account → Describe this API key**. A `200` with your organization means the key works.

Then try any request. Ids in the example URLs and bodies are placeholders: replace them with ids from your own account. For example, run **Instances → List instances** and copy an `id` into the `instance_id` path variable.

:::note[What the collection sets for you]
- `Authorization: Bearer {{apiKey}}` on every request, from the collection's auth.
- `Idempotency-Key: {{$guid}}` on every `POST`, `PUT` and `DELETE`: a new value each time you press **Send**. To retry a change safely, replace it with the value you sent the first time.
- `baseUrl`: the API's base URL, `/public/v1` on api.pantechdynamics.com.
:::

When you import a newer collection, Postman offers to replace the one you have. Replacing it clears its variables, so if you update often, keep `apiKey` in a Postman environment instead.

## Use it in Insomnia

1. In Insomnia, choose **Import**, and paste this link, or pick the downloaded file:

   ```text
   https://docs.pantechdynamics.com/insomnia/pantech-public-api.insomnia.json
   ```

2. Open the **Pantech Dynamics public API** collection, then **Base Environment**, and set `apiKey` to your [API key](https://docs.pantechdynamics.com/getting-started/api-keys).
3. Send **Account → Describe this API key**.

Every request sends `Authorization: Bearer` with your key, and every write a fresh `Idempotency-Key` (`{% uuid 'v4' %}`). Ids in the URLs are placeholders: replace them with your own.

## Use it in Bruno

Bruno keeps a collection as a folder of plain-text `.bru` files, which you can commit next to your code.

1. Download the [Bruno collection](https://docs.pantechdynamics.com/bruno/pantech-public-api.bruno.zip) and unzip it.
2. In Bruno, choose **Open Collection** and pick the unzipped `pantech-public-api` folder.
3. Choose the **Production** environment, and set its `apiKey`. It is a secret variable, so Bruno keeps its value on your machine and out of the files.
4. Send **Account → Describe this API key**.

Writes send `Idempotency-Key: {{$randomUUID}}`, a new value each time. Path ids are in each request's **Params** tab: replace the placeholders with your own.

## Use the OpenAPI contract

The contract describes every path, parameter, request body, response and error code. Most tools take it directly:

- **Postman:** **Import** → paste the contract's link:

  ```text
  https://docs.pantechdynamics.com/openapi/public-api.yaml
  ```

  Postman builds its own collection from it; the collection above is the same, with the auth and idempotency already set up.
- **Insomnia** and **Bruno:** both import the contract too; the collections above are the same requests with the auth and idempotency already set up.
- **Generated clients:** point a generator at the contract to get a typed client:

  ```console
  $ npx @openapitools/openapi-generator-cli generate \
      -i https://docs.pantechdynamics.com/openapi/public-api.yaml \
      -g typescript-fetch -o ./pantech-client
  ```

- **AI agents:** see [Using the API from an AI agent](https://docs.pantechdynamics.com/api/ai-agents).

Every operation in the contract carries an `operationId` (such as `createInstance`), and `x-scope` says whether it needs a `read` or a `write` key.

## Keeping up to date

Within v1 the API only adds: new endpoints, new optional fields, new response fields. A file you downloaded keeps working; download it again to see what is new. Changes are listed in the [changelog](https://docs.pantechdynamics.com/changelog).
