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

# OpenAPI

> Send your CSV or Excel sheet data directly to any API described by an OpenAPI specification.

The OpenAPI destination sends each row of your users' CSV or Excel data to an endpoint of any API that publishes an OpenAPI specification. CSVbox loads the spec, lets you pick the endpoint, and maps your sheet columns to the fields it expects.

## How it works

**1. Select OpenAPI as the destination type**

Open your sheet, go to **Destination**, and choose **OpenAPI** from the list.

![OpenAPI selected as the destination type](https://mintcdn.com/csvbox-io/gyjvlPdP5mzE2jo9/images/image-40.png?fit=max\&auto=format\&n=gyjvlPdP5mzE2jo9\&q=85\&s=113b5bc4eaa3682c0e0c517769580b8e)

**2. Load the OpenAPI specification**

Paste the **OpenAPI Specification URL** (a link to the API's spec file) and click **Load Specification**. This pulls in the list of available endpoints.

**3. Select the endpoint**

Pick the endpoint you want to send data to, for example `POST /v1/prices - Create Tiered Price`.

**4. Set the HTTP method**

Choose the method for the request, such as **POST** to create new records.

**5. Choose the authentication type**

Select how the API verifies you (for example, **Bearer Token**) and enter your credentials in the field that appears, such as your **Bearer Token**.

**6. Test the connection**

Click **Test Connection**. A green checkmark means your settings are correct.

**7. Map sheet columns to the endpoint fields**

Match each column in your sheet to the matching field expected by the API. You can also map custom attributes.

![Map sheet columns to API endpoint fields](https://mintcdn.com/csvbox-io/gyjvlPdP5mzE2jo9/images/image-42.png?fit=max\&auto=format\&n=gyjvlPdP5mzE2jo9\&q=85\&s=cbefa739b929af765b4bfe914c690170)

Once set up, your sheet data is sent to the API endpoint, one request per row.

## Example

This example shows how to test the OpenAPI destination end to end, for free, using a temporary inbox. You send sheet data to a test URL and watch it arrive live. Once it works, you swap in a real API.

### What you'll use

* **webhook.site**: a free service that gives you a temporary URL and shows every request it receives. It stands in for a real API so you can see your data arriving.
* **GitHub Gist**: a free place to host your OpenAPI spec file so the destination can load it from a URL.

### Walkthrough

**1. Get your test URL**

Go to **webhook.site**. It instantly shows a unique URL at the top, like:

```text theme={"dark"}
https://webhook.site/abc-123
```

Leave this tab open. Every request you send appears here in real time.

**2. Create the spec file**

Go to **gist.github.com** and create a new gist. Paste in the spec below, replacing the `servers` URL with **your** webhook.site URL from the previous step.

```json theme={"dark"}
{
  "openapi": "3.0.0",
  "info": { "title": "Test API", "version": "1.0" },
  "servers": [{ "url": "YOUR WEBHOOK URL" }],
  "paths": {
    "/": {
      "post": {
        "summary": "Send Row",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": { "type": "string" },
                  "email": { "type": "string" }
                }
              }
            }
          }
        },
        "responses": {
          "200": { "description": "OK" }
        }
      }
    }
  }
}
```

**3. Configure the destination**

In your sheet, go to **Destination** and set it up:

| Field | Value |
| - | - |
| Send Data To | **OpenAPI** |
| OpenAPI Specification URL | Your **Raw** gist URL → click **Load Specification** |
| Select Endpoint | `POST / - Send Row` |
| HTTP Method | `POST` |
| Authentication Type | **None** |

Then click **Test Connection**.

> [!TIP]
>
> Why **None**? webhook.site accepts anything, so there's no token to provide. Leaving authentication on **Bearer Token** with an empty token is the most common reason the test fails.

**4. Map your columns**

Match each column in your sheet to a field in the API:

| Sheet column | API field |
| - | - |
| Name | name |
| Email | email |

**5. Import and watch it work**

Upload a small CSV with a couple of rows. As the import runs, switch to your webhook.site tab. Each row appears as its own incoming POST request, with the data inside it.

That confirms the whole loop is working.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.