# Getting Started with the API

Before starting the API requests, you’ll need a Fungies.io account. If you haven’t already, please

1. Register an account&#x20;
2. Add some products
3. Customize your online store

To begin using the API, you'll need `API key` and `write-API key` for authorization. These keys can be generated from the Fungies.io Developers section.

## Generating the API Keys

To authenticate requests, you must include your `API key` and `write-API key` in the request headers. For all "read" actions (GET requests), you need at least the `API key` (public key). For all "write" actions (POST, PATCH, DELETE, and PUT), you need both the `API key` and `write-API key` (secret key).

### Steps to Generate the API Keys

**Step 1:** To generate the API key, click on the '**API Keys**' option at the sidebar and then select the '**Generate API Key**' button.

<figure><img src="/files/QyPMyHI1MQ0W1eHPwf8K" alt=""><figcaption><p>Generate API Keys</p></figcaption></figure>

**Step 2:** After clicking the '**Generate API Key**' button, the Fungies system will instantly create an `API key` and `write-API key`. Click the '**Copy**' button to save the keys to your clipboard.

<figure><img src="/files/J0BOuDN1K2bYjt2Ib4dH" alt=""><figcaption><p>Generated New API Keys</p></figcaption></figure>

> Keep your `API key` and `write-API key` private and secure. Don’t save them directly in your code or on GitHub. Instead, use environment files to store them. For added security, regularly update your API keys.

## When making an API Request

You can access the Fungies API at [`https://api.fungies.io/`](https://api.fungies.io/). Make sure all requests are made over HTTPS, as authentication is required for every request.

The API follows the JSON specification, so be sure to include the following headers in each request.

`header 'Content-Type: application/json'`

## Authentication

The API uses Bearer authentication for all requests. You will need an API key from the '[Generating the API Keys](https://help.fungies.io/for-saas-developers/getting-started-with-the-api#generating-the-api-keys)' section.&#x20;

To authenticate, add an Authorization header to all requests containing a valid API key:

For "read" actions (GET):

`header 'x-api-key:'`

For "write" actions (POST, PATCH, PUT, and DELETE):

`header 'x-write-api-key:'`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.fungies.io/for-saas-developers/getting-started-with-the-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
