# FAQ

<details>

<summary>Can I use JSON to connect to any REST API?</summary>

Yes, JSON works with virtually any REST API that returns JSON data. This includes:

* Third-party SaaS platforms with REST APIs
* Custom internal APIs
* Microservices and webhooks
* Any endpoint that supports GET, POST, PUT, PATCH, or DELETE

If the API requires authentication (API key, OAuth token, etc.), add it to the **Request headers** field.

</details>

<details>

<summary>How do I extract nested data from a JSON response?</summary>

Use the [**Path** field](https://docs.coupler.io/sources/category/files-and-tables/json/best-practices/how-to-define-the-path-for-selecting-json-objects) with dot notation to navigate nested objects.

**Examples:**

* If your API returns `{ "data": { "users": [{...}] } }`, set **Path** to `data.users`
* Leave **Path** blank if your API returns data at the root level (e.g., a direct array of objects).&#x20;

</details>

<details>

<summary>What's the difference between GET, POST, PUT, PATCH, and DELETE?</summary>

* **GET** — Fetch (retrieve) data. No request body needed. Most common for APIs.
* **POST** — Create new data or submit queries. Usually requires a request body.
* **PUT** — Replace an entire record. Requires a request body with complete data.
* **PATCH** — Update specific fields of a record. Requires a request body with only the fields to update.
* **DELETE** — Delete a record or request. May or may not require a request body.

Check your API documentation to see which method is required.

</details>

<details>

<summary>How do I add authentication to a JSON data flow?</summary>

Add authentication in the **Request headers** field. The format depends on your API:

* **API Key:** `X-API-Key: YOUR_API_KEY` or `Authorization: YOUR_API_KEY`
* **Bearer token:** `Authorization: Bearer YOUR_TOKEN`
* **Basic auth:** `Authorization: Basic BASE64_ENCODED_CREDENTIALS`
* **Custom header:** Any header your API specifies

Add each header on a new line. Check your API documentation for the exact format required.

{% hint style="info" %}
Never share your API keys or tokens publicly. Keep them secure in Coupler.io.
{% endhint %}

</details>

<details>

<summary>Can I use a request body with GET requests?</summary>

No, GET requests do not support request bodies. If your API requires a body, use POST, PUT, or PATCH instead.

For GET requests, use **URL query parameters** to pass filtering or pagination parameters (e.g., `?limit=100&filter=active`).

</details>

<details>

<summary>How do I format a request body in YAML?</summary>

Convert your JSON request body to YAML format using a tool like [JSON2YAML](https://www.json2yaml.com/).

**JSON example:**

```json
{
  "customer_id": 1,
  "customer_email": "email@example.com"
```

</details>
