# Welcome

Fireapis is a no-code backend platform that manages scaling (server, database and infrastructure) and builds fully functional (complex logic) backends without coding.

Our purpose is to help businesses manage their backend using no-code, which can save them time and money.

Our mission is to create a simple and user-friendly UI to build a fully no-code backend and save time and money for businesses on their engineering side.

## Moving on

All good? Let's explore the how you are going to build your backend.


# Basics

Just to give you some introduction about fireapis core features

**Environment**

You can build your backend for various products in each environment. Each environment can be configured with a separate custom domain or your own domain. Learn more.<br>

Within each environment, you can manage separate list of tables, logic, webhooks and marketplaces. logs will also be recorded for each of these.

**Dashboard**

View your backend usage and performance with ease- essentially, this serves as monitoring. Lean more.

The two main aspects are covered here. We will explore the core functionalities of environments in more detail.


# Environment

Manage individual backends for businesses.

Having covered the basics of environments, here's a list of sections you can manage within an environment.

#### Tables

This section allows you to create and  manage different tables required for your business.[ We will go deeper into the tables section here.](#tables)

#### Logics

This section empowers you to build complex business logics using simple UI, though it may require a slight learning curve. [Learn more about logics here.](#logics)

#### Webhooks

Webhooks are useful for transferring data to another service or external API. You can easily set this up using webhooks. [Learn more about webhooks here.](#webhooks)

#### Marketplace

In this section, you can integrate third-party services like Airtable, Notion, stripe, and more. This allows you to pull or push data using their APIs.

#### Logs

All requests made in the environment are logged here. You can view whether the request was successful or failed, along with additional details like IP, timestamp ,response time, and data size. [Learn more](#logs)

<br>


# Creating an Environment

Information about environment creation

1. **Log in to FireAPIs**\
   Use your email to log in to FireAPIs. Once logged in, you’ll be redirected to the **Environment Page**.
2. **Create a New Environment**\
   On the Environment Page, you’ll see a **Create** button in the Environment section. Click it to open the **Create Environment Popup**.

***

<figure><img src="/files/eeYYy4OVZhIdZrAWS045" alt="" width="563"><figcaption><p>Environment Empty Page</p></figcaption></figure>

***

3. #### Setting Up Your Environment

   This popup allows you to provide the necessary details to set up your environment. You’ll need to fill in three key sections:

   1. **Environment Details**\
      Provide basic information about your environment, such as its name, purpose, and subdomain.
   2. **Database Configuration**\
      Configure the database settings for your environment to ensure your data is stored and managed correctly.
   3. **Subscription Plan**\
      Choose the subscription plan that best fits your needs for this environment.

***

<figure><img src="/files/w4Yx5HAuVl2qgbebXupU" alt=""><figcaption><p>Environment Details Section</p></figcaption></figure>

***

#### Environment Detail

This section includes three key pieces of information about your environment:

1. **Environment Name**\
   Give your environment a name. This helps you easily identify and manage it.
2. **Description** \
   Add a clear description of the environment. Explain its purpose or what it will be used for (e.g., testing, development, or production).
3. **Subdomain**\
   Each environment has a unique subdomain, which becomes part of the base URL for making API requests.
   1. For example, if your subdomain is `acme`, your base URL will be:

      ```url
      https://acme.fireapis.com
      ```
   2. After creating the environment, you can also configure your own custom domain using CNAME settings.

#### **Database Configuration:**

In this section, you’ll provide details about the database for your environment. You have two options:

1. **Use Fireapis Database**

   Fireapis provides a managed database for your environment.
2. **Use Custom Database**\
   Connect your own database or a third-party database (like Supabase).

Choosing either of these options will adjust the subscription plan pricing based on your selection.

<figure><img src="/files/w4Yx5HAuVl2qgbebXupU" alt=""><figcaption><p>Choosing Database Options</p></figcaption></figure>

#### If You Choose "**Use Custom Database"**

Once you select **Use Custom Database**, you’ll see a **Database Credentials** section. Here’s how to proceed:

**Option 1: Integrate with Supabase (Third-Party Apps)**

1. Click the **Sync Automatically** button.
2. A **Connect Supabase** button will appear. Click it to be redirected to Supabase’s OAuth page.
3. On Supabase’s page, grant Fireapis access to the project database you want to use.
4. After authorization, you’ll be redirected back to Fireapis with pre-filled database credentials.
5. For security reasons, you’ll need to manually enter the database password. Fireapis does not retrieve passwords through Supabase integrations.

<figure><img src="/files/gFAK7GNMROscEQCXvLbx" alt=""><figcaption><p>Sync Automatically and Connect to Supabase</p></figcaption></figure>

<figure><img src="/files/F0JcQFsafTz2kFjM9z5D" alt=""><figcaption><p>Supabase OAuth Screen</p></figcaption></figure>

<figure><img src="/files/QgP1AWC6DLeWJN4cEmuA" alt=""><figcaption><p>After Supabase Oauth, the Database Credentials have been fetched from supabase</p></figcaption></figure>

**Option 2: Manually Enter Database Credentials**

If you’re not using Supabase and have your database credentials ready, provide the following details:

1. **Host**: The database host address (e.g., `xkjnwjoei.rds.amazonaws.com`).
2. **Port**: The port number where your database is hosted (e.g., `5432`).
3. **Database Name**: The name of your database (e.g., `domain_prod_db`).
4. **Username**: Your database username (e.g., `postgres`).
5. **Password**: Your database password (e.g., `postgres`).

<figure><img src="/files/PXEZnHkUwWqy0jNVpvfW" alt=""><figcaption><p>Enter Database Credentials Manually</p></figcaption></figure>

#### Completing the Setup

1. After providing the database details, click **Save**.
2. Fireapis will verify the connection and sync the database tables from your  database to manage your database through Fireapis environment.
3. Once the connection is successful, you’ll be redirected to the **Payment Page** to complete the subscription.
4. After payment, you can start building tables, logics, and webhooks for your backend.

{% hint style="info" %}
Point to remember:

* **Environment Setup is Mandatory**: You cannot create tables or use the environment until the setup is complete.
* **Free Plan Limitation**: The Free Plan allows you to create only one environment. Once created, the option to add more free environments will be disabled unless you upgrade your plan.
  {% endhint %}

<figure><img src="/files/OKFEkAnx01LrjQ40o3gP" alt="" width="563"><figcaption><p>Environment Created with URL.</p></figcaption></figure>

Next section will cover [Configuring a Domain for your environment.](/the-basics/environment/configure-domain)


# Configure Domain

Configure your own domain for the environment

When you create an environment, it comes with a default fireapis domain (e.g., yourproduct.fireapis.com). In this section, you can configure your own domain, such as devapi.yourproduct.com. \
\
With this configuration, all the requests you make can be routed through the domain you've configured for that environment.

{% hint style="info" %}
Even if you have your own domain, the default domain that comes with your environment (e.g., your product.fireapis.com) can still be used.
{% endhint %}

Steps for Configuring a Custom Domain:

1. Click the three dots on the left side of your selected environment under the environment list.

***

<figure><img src="/files/eCjuTjiW6sYb8yGeD9Ut" alt="" width="563"><figcaption><p>Location to configure the domain</p></figcaption></figure>

***

<figure><img src="/files/oOG4BV47DNHwhJYK00PV" alt="" width="563"><figcaption><p>Configure Domain option in the environment menu</p></figcaption></figure>

***

2. You will now see the "**Configure Domain**" popup.

***

<figure><img src="/files/Im7mk0WoOydphq2SWc0Y" alt="" width="563"><figcaption><p>Configure Domain popup</p></figcaption></figure>

***

2. In popup, enter your own domain, which must follow the format of a subdomain ( e.g., *api.yourproduct.com).*
3. Do not use your main domain (e.g., yourproduct.com or fireapis.com). Always use a format like api.yourproduct.com or \*.yourproduct.com, where \* represents a custom name. For best practices on domain configuration for your backend, refer to our guidelines.
4. Once you save your configuration, Now few things needs to done on our side in your DNS provider. Steps will be also be there in the Popup UI itself refer below image.

***

<figure><img src="/files/fgcd072bu94sJuPHfWDB" alt="" width="563"><figcaption><p>DNS configuration with your DNS provider</p></figcaption></figure>

***

6. Open your DNS provider (e.g., Cloudfare, Route53, GoDaddy, Namecheap, etc.) and add the CNAME value with the name and values provided in the popup UI  exactly in your DNS provider.
7. After you add the CNAME record, it may take anywhere from a few minutes to a few hours for the changes to take effect. During this time, you will see "**NOT VERIFIED"** status in the Domain popup.

***

<figure><img src="/files/kHHBv2PdNX5Bwz234uhy" alt="" width="563"><figcaption><p>Verify Connectivity button</p></figcaption></figure>

{% hint style="info" %}
You will have to obtain an SSL certificate for your own domain. The default sub domain (e.g., yourproduct.fireapis.com) will automatically  come with SSL certificates provided by Fireapis.
{% endhint %}

{% hint style="info" %}
Please note that our Server throws errors for the http\:// protocol. Please use https\:// protocol where again https\:// protocol always needs a SSL certificates. You can lean more in getting SSL certificates.
{% endhint %}

8. To verify that your domain configuration is working correctly, manually click the " **Verify Connectivity**" button in the popup UI.&#x20;
9. If the configuration is successful, then the UI will show "**VERIFIED"** status in your domain popup UI.


# Auth

Configure the authentication flow for your endpoints

* You can configure authentication settings for each environment (e.g., development, production).
* These settings are specific to the environment you are working in.

#### Secret Key:

* The secret key is used to decode (deparse) the token passed in the header of each request.
* The secret key must match the key used to generate the token. If the keys do not match, the token becomes invalid, leading to authentication errors.
* Secret keys are securely stored through environment variables, and you can select them from a **list of secrets** in a dropdown menu for easy configuration.

<figure><img src="/files/3B0WqED92liGqiod1i8d" alt="Configure secrets key in auth configuration"><figcaption><p>Configure secrets key in auth configuration</p></figcaption></figure>

#### Fields (Token Payload Validation):

* Specify the fields that should be present inside the token (payload).
* When the token is decoded, these fields are checked to ensure the request is valid.
* If the required fields are missing, the system will return an "unauthorized" error for each request.

<figure><img src="/files/BPyey3PTAhxsB95Bt1jy" alt="Configure Fields in Auth section for token"><figcaption><p>Configure Fields in Auth section for token validation</p></figcaption></figure>

#### Error Message Customization:

* You can configure a custom error message to be returned in the response if:
  * The token is invalid.
  * The token cannot be authenticated for other reasons.
* This allows you to provide user-friendly error messages.

<figure><img src="/files/VoZPExP1GnT049Hc930k" alt="Configure error message in auth configuration"><figcaption><p>Configure error message in Authentication configuration</p></figcaption></figure>

### Authentication for API end points <a href="#authenticate-for-endpoints" id="authenticate-for-endpoints"></a>

This section explains how to configure real-time authentication for your API endpoints.

#### Step 1: Create a Login or Signup or Magic link Logic

We have published a blog on [how to create magic link logics](https://fireapis.com/blog/how-to-implement-magic-link-logic-1/). Checkout out for refrence.

1. **Define Input Payload**: Start by creating a login or signup  or from magic link login flow that accepts an input payload with the user's email.
2. **Process User Details**: Add actions to process the user details for the given email. These actions will handle validation and fetching user-specific data.
3. **Generate Token**: Create an action to generate a token. The token should include `user_id` and `user_email` as its payload.

#### Step 2: Configure Authentication Settings

1. **Navigate to Auth Tab**:
   * Go to the "Auth" tab in the platform.
   * Configure the secret key using the secrets manager. This key should be the same as the one used during token generation.
2. **Add Fields**:
   * Specify fields such as `user_id` and `user_email`.
   * Define error messages for scenarios where the token is invalid or expired.
3. **Save Configuration**:
   * Save these configurations to complete the authentication setup.

#### Step 3: Enable Authentication for API Endpoints

1. **Table CRUD Endpoints**:
   * Navigate to the "Tables" section and select any table to view its details.
   * Locate the **Is Authenticate Endpoint** toggle.
   * Enable this toggle to validate the token for every request. If a token is not passed, it will be considered invalid.
2. **Logic Endpoints**:
   * To enable authentication for logic APIs, follow the same process.
   * Navigate to the logic details and toggle the **Is Authenticate Endpoint** option.
   * When enabled, all requests to the logic endpoints must include a valid authentication header containing the token.

By following the above steps, you can configure token-based authentication for your API endpoints and ensure secure access to your resources.


# Secrets

This section offers a secure way to manage your secret keys and variables, acting as a secrets manager for sensitive information.

In this section, you can store sensitive information required for your logic or marketplace, such as API keys and secret keys. You can add as many secrets as needed, with no restrictions. Once a value is added, it will be hidden to ensure the security of your secrets.

<figure><img src="/files/dlxrGiGlycL8IV76Mrm7" alt="Adding secrets key in secrets manager"><figcaption><p>Adding Secrets Key in Secrets Manager</p></figcaption></figure>

Additionally, these keys will be displayed by default in the data source model when new secrets are added, making it easy to reference them when needed.

<figure><img src="/files/NsUoFb7oc4759PHRND8Y" alt="Secrets get hidden after save in secrets manager"><figcaption><p>Secrets Get Hidden After Save in Secrets Manager</p></figcaption></figure>


# Tables

Fireapis lets you add tables without any restriction. We also support different type of relational link between tables in a particular environment

Tables created within an environment will be always specific to that environment, You won't be able to use them in other tables.

We use PostgreSQL database to manage all your data. Whatever PostgreSQL supports, we will also support and continuously improve upon.

{% hint style="info" %}
All the timestamp-related fields will be stored in **UTC timezone**
{% endhint %}

Below are the common column types supported in tables:

1. **Text:** Store a text or string value, for example: "fireapis no-code backend".
2. **Number:** Store only an integer (whole number). For example: 22, 23. Decimal numbers are not accepted in this column type. For example: 22.30, 23.54.
3. **Number with Decima**l: Store a decimal numbers. For example: 22.32, 23.12. This type of column for pricing  or weighted quantities, etc.
4. **Boolean:** Store only a true or false value. Text or numbers will not be accepted.
5. **Date & Time:** Store a timestamp with date and time. For example: 2024-05-15T14:07:10.619Z.
6. **URL:** Store only URLs type column. For example: <https://fireapis.com>.
7. **IP Address:** Store text in IP format. For example: 192.168.0.103
8. **Date:** Store a timestamp with only the date; time will always be 00:00:00. With this field, you won't be able to retrieve time. Example input 2024-05-15T14:07:10.619Z, which will store only the date.
9. **Time:** Store a timestamp with only the time; date will not be stored. This field always return the time when retrieved. Example input 2024-05-15T14:07:10.619Z, which will store only the time.
10. **Reference to Another Table:** Store a relationship between tables. Learn more about table relationship and their purposes on our blog. \
    \
    Types of Relation Supported by Fireapis:
    * &#x20;**One to One**:

      This type of relation is useful in the following cases:\
      **First case:** If you want to link a user with their profile. In this case, your can link the user table to the profile table, as each user will always have one profile.\
      **Second case: I**f you have orders, which always contain one customer,  you can link the customer table in a one-to-one relationship with the orders table.
    * **Many to One**:\
      This type of relation is useful in the following cases:\
      **First case:** If an order can have many menu items, you can link the menu items table to the orders table.\
      **Second case:** If a user has many conversation ,then the conversation table will have a many-to-one relationship with the users table.

{% hint style="info" %}
You can learn more about table relationships and their implementation in detail on our blog.
{% endhint %}


# Creating Table

Fireapis provides simple interfaces for creating tables, reduces your learning curve.

Here's how to create a table using Fireapis

1. Go to **Tables** tab inside an environment.

<figure><img src="/files/1ZeLE1lGNGXHkz9K66yq" alt=""><figcaption><p>Create Table</p></figcaption></figure>

2. Click **Create,** and the "Create Table" popup will appear on the right side.

{% embed url="<https://youtu.be/LL175HvajzU>" %}
Table creation flow in Fireapis
{% endembed %}

3. Above we have a video showing how to create a table with basic fields. You can find more information about creating tables with different field types in our blog section or in the showcases section.
4. Once you've created the table, it won't actually be created in the real database yet. One more step is needed to complete the table creation in your actual database.
5. After you've finished creating all your tables in the environment, you need to run **Migrate Changes,** which will create or modify your tables accordingly. Refer to the images below.

<figure><img src="/files/YXKqRCaZQFhtipB7Ggbd" alt="" width="563"><figcaption><p>Migrate change button</p></figcaption></figure>

<figure><img src="/files/zRp6ydrrN0wVJp1Jtoee" alt="" width="563"><figcaption><p>Explanation of migrate changes</p></figcaption></figure>

6. Click **Migrate** in the Migrate popup UI, which will then actually create or update the table in real database.

In the next section, we will go over[ testing the tables with pre-created endpoints](/the-basics/tables/testing-tables).


# Testing Tables

Fireapis allows you to test your tables with pre-created endpoints with an interactive user interface.

Once you've created a table and migrated it, you can test operations such as creating, updating, deleting and listing records from the specified table

Here's how you can test your tables:

1. Click the table you want to test.

<figure><img src="/files/I1ol5HbN6c5VcSPIvD5e" alt=""><figcaption><p>Location of test in table.</p></figcaption></figure>

2. You will see the **Test** button in the table view (refer to the image above). Click the **Test** button to open the test UI popup.

<figure><img src="/files/1xin0J0XjNHOx0c8rNoB" alt=""><figcaption><p>Test User Interface</p></figcaption></figure>

3. Refer to the image above, where you can test different endpoints that are pre-created by Fireapis. In the example above, we used the **POST** endpoint, which adds a  new record to your database based on the input you provide.

<figure><img src="/files/hDvHWcXMedzip39b2KEs" alt=""><figcaption><p>After test result</p></figcaption></figure>

4. In the image above, you can see the response from the **POST** API call. You can find more information about the test user interface here.

{% hint style="info" %}
In **POST** API call, you **don't need** to pass the ID (which is the primary column type), as Fireapis automatically assigns the primary key as a **unique value by default.** [Learn more about different endpoints in Fireapis.](/the-basics/tables/endpoints)
{% endhint %}


# Add a New Column

Fireapis allows you to add a new column to an existing table.

Here are the steps and instructions for adding a new column to an existing table

1. Go to the **Properties** tab in the particular table.

<figure><img src="/files/oJPxHwMHD8hI8nsSb8ts" alt=""><figcaption><p>Location of "Add New Column"</p></figcaption></figure>

2. You can see the **Add Column** button. When you click the **Add Column** button, the "Add Column" popup will appear.

<figure><img src="/files/IDVVa77o3ypEaShRTUES" alt=""><figcaption><p>Add Column Popup</p></figcaption></figure>

3. Enter the column name and type. By default, the "Allow Null" option will be enabled when you add a new column to an existing table.&#x20;
4. Once you click the **Add** button, your column will appear in the table, but it won't actually be created in the database.
5. To update the database, you need to click **Migrate,** which will create or modify the table accordingly in the database.


# Table Properties

In this section, you can learn more about the properties of your selected table.

The **Table Properties** section provides an initial version of the core properties of the table. In the future, you will be able to find additional information, suck as table size, indexing, and performance details.

<figure><img src="/files/PUA7Lu3sWPRXfyse4Z1x" alt=""><figcaption><p>Properties Section</p></figcaption></figure>

In this section, you can view the columns, their types, and constraints (column settings). You can also <mark style="color:blue;">delete a column</mark>, <mark style="color:blue;">add a column</mark> and <mark style="color:blue;">edit column here.</mark>


# Endpoints

Fireapis provides various pre-created endpoints during the table creation process, which are sufficient for most common use cases.

These Endpoint provide request URLs and information on how to use them. Most business use cases can be solved with these APIs. However, if you need more complex business logic, then you can refer to the **logics** section.

<figure><img src="/files/CQG3bZBLitgqH8MtdqRp" alt=""><figcaption><p>Endpoint Section</p></figcaption></figure>

The image above shows the different endpoints, and below you will find more details about each one.

Here's different endpoint details

{% hint style="info" %}
{{table}} represent your actual table name.&#x20;

{{environmentName}} represent your actual environment name
{% endhint %}

<mark style="color:yellow;">**POST**</mark>**&#x20;-  Create a new record in {{table}}**

This is a **POST** type endpoint, useful for adding a record to your table using the endpoint. This endpoints can be used in the no-code UI builder or any frontend client application.

In this case, the **PK(Primary Key)** column will be **disabled** by default, as it is automatically **created** by **Fireapis** as a **unique** value.

<figure><img src="/files/l7NScnepNPBT67F7Tx2j" alt=""><figcaption><p>Disabled Primary key Column</p></figcaption></figure>

You can find the implementation of this endpoint by using the generated URL. Here are the configuration details:

**Header:** Common header for every endpoint request.

**URL:** https\://{{environmentName}}.fireapis.com/{{table}}

**Data or Body:** JSON as provided in the endpoint section.

For more details, Refer to the images below.

<figure><img src="/files/X5TyJVIlcfaahrr0980r" alt=""><figcaption><p>[POST] Create a New Record in Table.</p></figcaption></figure>

<mark style="color:green;">**GET -**</mark>**&#x20;Get a record in {{table}} by ID**

This is a **GET** type endpoint, useful for retrieving a record using its primary key (ID by default in Fireapis).

Configuration details:

**Header:** Common header for every endpoint request.

**URL:** https\://{{environmentName}}.fireapis.com/{{table}}/\_\_id\_\_

**Data or Body:** No input data is required for a **GET** request.

{% hint style="info" %}
**\_\_id\_\_** represent the primary key value of a record. For example, to fetch the record with ID of 2 from your table.
{% endhint %}

For more details, Refer to the images below.

<figure><img src="/files/GRXrulQYrNGdADF4iSci" alt=""><figcaption><p>Get a Record from {{table}} by id</p></figcaption></figure>

<mark style="color:blue;">**PUT**</mark>**&#x20;- Update record in {{table}} by id**

This endpoint is PUT type endpoint which will be useful for updating a record using their primary key which is id by default in fireapis.

Here the list of configurations

**Header** - Refers common header for every end point request

**URL** - https\://{{environmentName}}.fireapis.com/{{table}}/\_\_id\_\_

**Data or Body** - JSON which is given in this endpoint section

{% hint style="info" %}
**\_\_id\_\_** represent the primary key value of an record, for eg: you want to fetch id of 2 from your table.
{% endhint %}

For all above details, Refer below images:

<figure><img src="/files/iDegQj7RX7o5dQU7hNzp" alt=""><figcaption><p>Update a Record in {{table}} by ID</p></figcaption></figure>

<mark style="color:red;">**DELETE**</mark>**&#x20;- Delete a record in {{table}} by ID**

This is a **DELETE** type endpoint, useful for deleting a record using its primary key (ID by default in Fireapis).

Configurations details:

**Header:** Common header for every endpoint request.

**URL:** https\://{{environmentName}}.fireapis.com/{{table}}/\_\_id\_\_

**Data or Body:** No input data is required for a **DELETE** request.

{% hint style="info" %}
**\_\_id\_\_** represent the primary key value of a record. For example, you want to fetch id of 2 from your table.

**Warning:** Deleting a record will permanently removes it, so be cautious when performing this action.
{% endhint %}

For more details, refer to the images below.

<figure><img src="/files/46ht9CT3w2RMRFGkqisT" alt=""><figcaption><p>Delete a record  in {{table}} by ID</p></figcaption></figure>

<mark style="color:green;">**GET**</mark>**&#x20;- Get all records in {{table}}**

This is a **GET** type endpoint, useful for retrieving all  records from particular table, with paginated enabled by default.

Configuration details:

**Header:** Common header for every endpoint request.

**URL:** https\://{{environmentName}}.fireapis.com/{{table}}/all?page=1\&take=10

**Data or Body:** No input data is required for **GET** request.

**Query Params:**  ?page=1\&take=10 in URL represent query parameters.\
1\. page: The page number for the request data\
2\. take: The Number of records to be listed on each page\
For example, ?page=2\&take20 means getting the second page with 20 records per page.&#x20;

{% hint style="info" %}
This endpoint always includes pagination by default to **optimize performance.**
{% endhint %}

For more details, Refer to the images below.

<figure><img src="/files/UZXj7Hp4w7OZ36mMdIdj" alt=""><figcaption><p>Get all record in {{table}}</p></figcaption></figure>

We have covered all the endpoints in detail and their usage.


# Data

Frieapis gives you a view of the data in your table through our user interface

Go to the **Data** section of the table, which displays the data in that table. This user interface provides pagination to navigate through pages and also shows the total records counts at the bottom.

<figure><img src="/files/yKx67Rt8b5DVO3agImw5" alt=""><figcaption><p>Data section in table</p></figcaption></figure>


# Deleting a Column

A column from a table can be deleted with a simple click using Fireapis.

Here are the steps for deleting column:

1. Go to the **Properties** tab inside table.

<figure><img src="/files/mUus33LvOUBVgJPMFRSH" alt=""><figcaption><p>Deleting Column Button Location</p></figcaption></figure>

2. In the image above, you can find the **Delete** button next to each column. Click that **Delete** button.

<figure><img src="/files/mfFXNBIr36kgBdqp4k9K" alt=""><figcaption><p>Delete Column Confirmtion Popover</p></figcaption></figure>

3. A confirmation popover appears. If the **Delete** button is clicked in the confirmation popover, the column will be deleted
4. Column will be removed, but it won't be deleted from the actual table.
5. To remove the column from the real database, you need to click **Migrate Changes**.
6. Once migrated, the column will be successfully removed from the real database.


# Deleting a Table

Fireapis allows you to delete your table. Before deleting, if you need a backup, please contact chat support.

Deleting a table will permanently remove the table and its data, which may be difficult or impossible to recover.

{% hint style="info" %}
If you need a backup of your table data, please contact chat support or email *<vasanth@fireapis.com>*.
{% endhint %}

Here are the steps for deleting a table:

1. Select the table you want to delete. On the  left side, you will find the **Delete** button.

<figure><img src="/files/lcnWJmt5VBrFakJq3nQq" alt=""><figcaption><p>Delete Table Button Location</p></figcaption></figure>

2. A confirmation popover will appear. Clicking **Delete** in the Confirmation popover will remove the table from view.

<figure><img src="/files/BBik6GHm7Y836aP3FJRW" alt=""><figcaption><p>Delete Confirmation Popover</p></figcaption></figure>

3. The table will still exist in the database. To remove it from the database, you need to click the **Migrate Changes** button (Learn more about this).
4. After clicking **Migrate Changes,** the table will be successfully removed from the database.


# Webhooks

Transfer your data to another application or service for each action triggered in a table using webhooks.

Fireapis allows your to configure webhooks for create, update and delete actions in a table. These events can also be configured as separate webhooks.

### **Creating Webhooks**

1. Go to the **Webhooks** section in the tables area and Click **Create,** which opens the "Create Webhook" popup.

<figure><img src="/files/y6KxvcEYlNpdjy92WBBr" alt=""><figcaption><p>Create Webhook </p></figcaption></figure>

2. Enter the name of the webhook.&#x20;
3. Enter the target URL where the request will be sent along with the data.
4. Select the table from the list for which you want the webhooks to be triggered.
5. Select the action ( Create, Update, and Delete ). Based on the selected action, the webhook request will be made to the target URL.
6. After clicking the **Create** button, you will see the webhooks created and listed in the user interface.

### **Testing Webhooks**

1. Click the **Test** button for any webhook in the webhooks listing.

<figure><img src="/files/0vzQUif1hbpMTy1N2AEG" alt=""><figcaption><p>Test Button of Webhook</p></figcaption></figure>

2. The **Test Webhook** popup will appear.
3. Select the action and click the **Send** button.
4. The event will be sent to the target URL, if it is valid and working.

{% embed url="<https://youtu.be/wLfY9tf0LOo>" %}
Test Webhook Popup Working
{% endembed %}

The video above demonstates how the **Test Webhook** popup works and how you can test if your webhooks URL is receiving event from Fireapis.

### **Updating a Webhook**

1. Click the webhook you want to update.

<figure><img src="/files/d51QUJ8tQDY1pdMVDDiL" alt=""><figcaption><p>Updating a Webhook </p></figcaption></figure>

2. The **Update Webhook** popup will appear, where you can edit the required details and save the changes.

### **Deleting a Webhook**

Deleting a webhook is simple. Below is the image that explains how to delete a Webhook.

&#x20;

<figure><img src="/files/56oRbEjEiATVW1JlDbch" alt=""><figcaption><p>Deleting a Webhook</p></figcaption></figure>

**Realtime testing of webhooks**

The video below demonstrates how webhooks are triggered in real time when using endpoints for various action performed in a table.

{% embed url="<https://youtu.be/LzTcqtZ7sCY>" %}
Video of Real Time Testing of Webhooks
{% endembed %}


# Marketplace

Fireapis offers functionality where you can integrate with other services and use them.

If you want to connect Airtable and use it for your backend (like retrieving or storing data in Airtable), you can easily do so in Fireapis by  adding and connecting to the marketplace.

Currently, we have a few marketplaces listed in our application:

1. Stripe
2. Fusioo
3. Airtable
4. Notion
5. Google Sheets

For more integrations, please contact us via chat or email at *<vasanth@fireapis.com>*

Any new marketplace request can be added within a day after confirmation.

### Add Marketplace Integration

1. Go to **Marketplace** tab and click the **Create** button, which will open the marketplace list popup.
2. Select the marketplace you need, and you will see the marketplace added to the marketplace listing.

<figure><img src="/files/8LrzjMkZQvvSIN7pm4st" alt=""><figcaption><p>Marketplace List</p></figcaption></figure>

3. After connecting your marketplace credentials, you can start using the endpoints.

### Connecting marketplace

Before connecting, you marketplace will be listed as **Not verified**.

1. Click the **Connect** button on the marketplace you are going to authenticate.

<figure><img src="/files/Fk1tFEo9pAek9rPIRjOU" alt=""><figcaption><p>Not verified marketplace</p></figcaption></figure>

2. You will then see the steps on how to authenticate your marketplace. There are two types of marketplace verification in Fireapis:

   1. **API key or personal token-based authentication**\
      In this case, you need to create a personal token on your marketplace site (e.g., Airtable or Notion) and update it here.
   2. **OAuth-based authentication**\
      In  this case, you do not need to take any action on the marketplace site. you only need to provide consent on the  OAuth confirmation modal.\
      Upon confirmation, we will recieve an access token from your marketplace site for your account, and you can start using the endpoints of that marketplace.

   Most marketplaces use OAuth-based authentication, which only require your consent to proceed.
3. Once step 2 is done correctly, then you will see **Verified** status in the marketplace list.

<figure><img src="/files/v6SIuHbwJmoEfjMqSmA0" alt=""><figcaption><p>API key Addition of Connection Marketplace</p></figcaption></figure>

The next step is to test your credentials by testing any of the marketplace endpoint.

### Testing marketplace

Testing your marketplace integration require some knowledge of the marketplace's API usage.

For example, if you're testing your Airtable marketplace integration, you will need items like the base\_id and table\_id , which can be found in their documentation.

We plan to update these details in our docs soon.

1. Click the **Test** button for the marketplace you want to test.
2. The test Popup will open, showing a list of endpoints that belongs to that marketplace.

<figure><img src="/files/pLrue9DIjEUF0p86bDVb" alt=""><figcaption><p>Testing of Marketplace Integration</p></figcaption></figure>

3. The image above contains only one endpoints, but in your account, you can see more.

Please reach out to us via chat or email if you need help finding your details from other third-party application or service like Airtable or Notion.


# Logics

Build custom or complicated business use cases using the Logics feature in Fireapis.

We have released only the beta version of the logics. We will be releasing updated version by version in the upcoming weeks.

1. Query builder actions
2. If Conditions
3. Data transformation action (for loop, map loop)
4. Math operation action
5. Constants declaring action
6. Utils action (like generating random number or ids, etc.,)

{% hint style="info" %}
We will keep updating the logics docs periodically to make it simplified
{% endhint %}

In Fireapis , Logics is needed when you have complicated usecase where you are not able to achieve it through endpoints, then you can create list of actions which collectively exectues as an logics

You can get the result output from one action to next action, this will be useful in real case like&#x20;

Action- 1 : You are making Api request to another URL, which gives you a list of data

Action- 2: You can transform your data from the response you got from action1&#x20;

Action - 3: Then you can query builder action to update those data into our DB

So the above case is a simple case. We are making upgrades to make this logics as simple as possible to solve the complicated use case with simple user interface using fireapis.

If you have feedbacks on beta version of fireapis, Please write a email or give your feedback in support chat.

The Logics feature allows you to add a list of actions to address complex or custom use cases. This document provides insights into testing logics and using the Dynamic Data Source Selection popup.

#### Key Actions in Logics

1. **Query Builder Actions**: Perform database operations efficiently.
2. **If Conditions**: Add conditional logic to handle various scenarios.
3. **Data Transformation Actions**: Use loops (e.g., for loop, map loop) to manipulate data.
4. **Utils Actions**: Utilize utilities like generating random numbers or IDs.
5. **Build Object**: Build JSON object structures useful for structuring your responses.
6. **Build Array**: Create arrays of objects or strings, helpful for managing lists.
7. **Date Utils**: Handle date-related calculations, formatting, and manipulations.
8. **Token Generation**: Create a JWT (JSON Web Token) for authentication and session management. Configure the data to be included in the token.
9. **Token Decryption**: Decrypt tokens using a secret key.
10. **Hashing**: Secure your data by hashing it.
11. **Validate Hash**: Verify the validity of hashed text.
12. **Encrypt**: Secure your data by encrypting it.
13. **Decrypt**: Decrypt encrypted data using a secret key.

We will periodically update the Logics documentation to simplify and enhance user understanding.

#### When to Use Logics

Use the Logics feature when you have a complicated use case that cannot be achieved through standard endpoints. Logics allow you to create a sequence of actions that execute collectively.

For example:

* **Action 1**: Make an API request to another URL to retrieve a list of data.
* **Action 2**: Transform the data received in Action 1.
* **Action 3**: Use a query builder action to update the transformed data into your database.

This example illustrates a straightforward use case. We are continuously improving Logics to provide a simple interface for solving even the most complex scenarios using Fireapis.

If you have feedback on the beta version of Fireapis, please share it via email or through the support chat. Your input helps us improve the platform.


# Dynamic Data Source Selection

This popup gives you the ability to select your data dynamically from the previous action or input payload.

The Dynamic Data Source Selection popup allows you to customize dynamic data usage wherever needed. Data can be selected from:

* Previous actions
* Input payload
* Environment Secrets Manager
* Decoded tokens (e.g., user tokens)

#### Examples with Screenshots

**Using Email from Input Payload**:

* Select the email from the input payload of the API request.
* Use it for querying the database to check if the user exists.

<figure><img src="/files/HJzGt4QVSnCIDfOo2yB0" alt=""><figcaption><p>Data is taken from input payload</p></figcaption></figure>

**API Key from Secrets Manager**:

* Retrieve the API key for the SendGrid email service from the Secrets Manager.
* Use it securely for sending emails.

<figure><img src="/files/rG5UtxTD9LNUYA1g1fnM" alt=""><figcaption><p>Data is taken from secrets manager</p></figcaption></figure>

**Custom User Detail Handling**:

* Take user details from previous actions to build custom text.
* Return a custom object with data derived from the results of previous actions.

<figure><img src="/files/add2vq0WrqNJXodmuZtt" alt=""><figcaption><p>Data is taken from previous action results</p></figcaption></figure>

This popup provides a flexible and intuitive way to manage dynamic data across various actions .


# Testing Logics

Section on how to test logics

1. **Select the Trigger Section**:
   * Open the Trigger section of the logic you want to test.
   * The logic configuration will be displayed on the right side.
2. **Configure Input Payload**:
   * Navigate to the **Properties** tab.
   * Configure the input payload required for the logic. For example, if it’s a magic link login, you might need an email as the input payload.
   * Save the configuration.
3. **Enable Authentication (Optional)**:
   * If this logic needs to be authenticated, toggle on **Is Authenticate Endpoints**.
   * Refer to the [authentication guide](/the-basics/auth#undefined) to understand how authentication works.
4. **Create and Configure Actions**:
   * Create the necessary actions for your logic.
   * Configure these actions according to the requirements.
5. **Test the Logic**:
   * Go to the **Test** tab in the logic configuration.
   * If authentication is enabled, you will need to enter your token. If not, this step is unnecessary.
6. **Input Payload in Test Section**:
   * Navigate to the **Input** tab.
   * The input payload configured in the Properties tab will be displayed. You can:
     * Edit the values directly in the form.
     * Use the toggle button to switch to **Input JSON** mode and enter the payload as JSON.
   * Once ready, hit the **Test** button.
7. **View Test Results**:
   * After testing is completed, you will be automatically redirected to the **Results** tab.
   * The Results tab displays the outcome of each action, allowing you to verify if everything is configured properly.

We have attached screenshots below, along with explanations for each step, to help you better understand the testing process.

<figure><img src="/files/BYHzB2GwdFIJB9zlPG0Z" alt=""><figcaption><p>Properties configuration in testing logics</p></figcaption></figure>

<figure><img src="/files/YxliCTAHCG87ap3WL7et" alt=""><figcaption><p>Configuring input payload for testing logics</p></figcaption></figure>

<figure><img src="/files/GanINu3Zp0nkyNvejwIj" alt=""><figcaption><p>Explore results of each action after testing logics</p></figcaption></figure>


# Actions

List of actions for separating each function useful for building your complex use cases.

As discussed earlier in this section, here is a list of actions that will be helpful for building your complex endpoints.

#### Editing Action Names

1. **Select the Action**:
   * Click on the action whose name you want to edit.
2. **Edit the Name**:
   * Click the edit icon in the action section.
   * An input text field will appear. Enter the desired name for the action.
   * Hit the tick button to save the new name.

<figure><img src="/files/ai4ep11uVocCJ1sNuNLF" alt=""><figcaption><p>Action details with few explanation</p></figcaption></figure>

#### **Action Details**:

* In the action section, you will see both the action name and the action ID.
* The action ID is a unique identifier used in the Dynamic Data Source Selection popup to locate and use results for subsequent actions.


# External API Request

Make external API requests effortlessly with our intuitive interface, enabling dynamic value configuration without code.

**API URL**&#x20;

This section contains the request method (e.g., GET, POST, PUT, DELETE) and the API endpoint URL. You can find this information in the documentation provided by your API provider.

If your URL includes dynamic values (e.g., `https://api.restful-api.dev/objects/7`, where `7` is dynamic), you can enter the URL like this: `https://api.restful-api.dev/objects/___$id___`.

<figure><img src="/files/OfrvFWIb6TdL7qbnuEve" alt="Enter API url image"><figcaption><p>Enter API URL </p></figcaption></figure>

The `___$id___` format allows you to replace `7` with a dynamic value. The `___` (three underscores) acts as a marker, and the `$` symbol before `id` indicates the dynamic part. After entering the URL in this format, you’ll see a parameter field for `id`, where you can configure the dynamic value to be used.

<figure><img src="/files/ffKBNpGIqtRpW0zV5I3A" alt="Configuration dynamic portion of url as a parameter"><figcaption><p>Configuration Dynamic Portion of URL as a Parameter</p></figcaption></figure>

<figure><img src="/files/BSbjyHTQ4cQ7cHu0ZwEm" alt="Configuring URL parameter"><figcaption><p>Configuring URL Parameter</p></figcaption></figure>

To set up dynamic values, click the plus (+) icon next to the input field. This will allow you to select the data source model from which the value will be pulled.

#### **HEADERS**

This section allows you to configure the headers required for your external API request. In most cases, you will need to pass an API key or authentication key, which you can find in the documentation from your API provider.

<figure><img src="/files/RMLvS49lHPI7gcZvWCQz" alt="Configuring header section"><figcaption><p>Configuring Header Section</p></figcaption></figure>

To add a header, simply provide the header name and its value. The value can be static or dynamically generated. You can also load the value from environment secrets, where sensitive information like secret keys or other variables are securely stored using the data source model.

For dynamic values, click the plus (+) icon next to the input field. This will load the data source model, allowing you to pull the necessary data dynamically.

#### **QUERY PARAM**

This section allows you to pass parameters as query strings in the URL. Query parameters are commonly used for things like pagination or simple search endpoints.

For example, in the endpoint `https://api.restful-api.dev/objects`, you may want to list all objects. However, if the API supports pagination via query parameters, you could modify the URL like this: `https://api.restful-api.dev/objects?page=1&count=20`.

To achieve this, you can add query parameters by specifying their names (e.g., `page` and `count`). The values for these parameters can be passed dynamically from your request payload (i.e., the data you're sending when triggering your logic created in Fireapis).

<figure><img src="/files/aTgvLfpOZk6OA2H1BCv9" alt="Configuring query parameters section"><figcaption><p>Configuring Query Parameters Section</p></figcaption></figure>

For dynamic values, click the plus (+) icon next to the input field. This will load the data source model, allowing you to pull the necessary data dynamically.

This section allows you to pass the body (data) for your external API requests. It will only be visible when the request method is set to POST or PUT.

For example, for a POST request to `https://api.restful-api.dev/objects`, you might need to send the following body data:

```json
{ "name": "Apple MacBook Pro 16" }
```

<figure><img src="/files/CtekbiOtqkRGQQ1l6VID" alt="Configuring body data for the API request"><figcaption><p>Configuring Body Data for the API Request</p></figcaption></figure>

In Fireapis, you can create the body by specifying key names (e.g., `name`) and setting their values. These values can be configured dynamically to pull from the input payload you pass while executing the logic created in Fireapis.

<figure><img src="/files/FrB0EEEYLYvp1e9YYugg" alt="Configure dynamic data for body data in request"><figcaption><p>Configure dynamic data for body data in request</p></figcaption></figure>

For dynamic values, click the plus (+) icon next to the input field. This will load the data source model, allowing you to pull the necessary data dynamically.

#### URL Dynamic Parameters

This section allows you to dynamically add values to the URL. It is useful when calling a `GET` API that requires an item ID or a reference value in the URL.

This option will appear when you configure the API URL with dynamic values.

For example, for the endpoint `https://api.restful-api.dev/objects/7`, where `7` is a dynamic value, you can enter the URL like this: `https://api.restful-api.dev/objects/___$id___`.

Once you enter this, the configuration will display a parameter named `id` (which is not editable). You can then set the value for `id` by selecting where the data should come from.

<figure><img src="/files/BSbjyHTQ4cQ7cHu0ZwEm" alt="Url parameter configuring"><figcaption><p>URL Parameter Configuring</p></figcaption></figure>

For dynamic values, click the plus (+) icon next to the input field. This will load the data source model, allowing you to pull the necessary data dynamically.

#### Here we have attached a few videos

**Example 1 :** Making a GET API request dynamically using a dynamic URL

{% embed url="<https://youtu.be/FTyFmgEsmLE>" %}
Making a Get API request with a dynamic ID passed in the URL
{% endembed %}

**Example 2 :** Making a POST API request dynamically by passing payload or body data dynamically

{% embed url="<https://youtu.be/Hm5WTCEemms>" %}
Making a POST API request with dynamic payload
{% endembed %}


# Query Builder

The Query Builder allows you to easily create and customize database queries without coding, using a simple interface to select tables, actions, and conditions.

#### **Table**

In this section, you can configure the table on which the query needs to be executed. You will see a list of all the tables created under the selected environment.

#### Query Action

This section allows you to select the action type for the query, which could be `SELECT`, `UPDATE`, `INSERT`, or `DELETE` based on your needs:

* **SELECT**: Used when you need to retrieve data from a table, potentially with specific columns.
* **INSERT**: Used to insert a new entry into the table. You can configure this to fit the data you need to add.
* **UPDATE**: Used to modify an existing entry in the table, typically for a specific item or based on a condition.
* **DELETE**: Used to remove an entry from the table, either for a specific item or based on a condition.

#### Select Columns

This section is visible only when the **SELECT** query action type is chosen. It allows you to select which columns should be returned from the query. You can configure this section to specify only the data you want to retrieve

<figure><img src="/files/QTBZZ6rnQf0P7gfO9Gte" alt="SELECT query section"><figcaption><p>SELECT Query Section</p></figcaption></figure>

#### Insert Columns

This section is used when configuring an `INSERT` query. Here, you can select the columns that will receive values when a new entry is added to the table.

To add a column, click the **Add** button. You can configure the values for each selected column, and these values can also be dynamically sourced by clicking the plus (+) icon next to the input field. This will load the data source model, allowing you to pull in data from other sources or requests during execution.

<figure><img src="/files/i6IILBMQo9uqF5hcDjgP" alt="INSERT query section"><figcaption><p>INSERT query section</p></figcaption></figure>

#### Update Columns

This section is similar to the **Insert Columns** section but is used for `UPDATE` queries. Here, you can specify the columns that need to be modified in an existing entry.

To add a column for updating, click the **Add** button. Configure the values for each selected column, which can also be dynamically sourced by clicking the plus (+) icon next to the input field. This will load the data source model, allowing you to pull in data from other sources or requests at the time of execution.

<figure><img src="/files/Sq8islK86wZXQkeM9CEt" alt="UPDATE query section"><figcaption><p>UPDATE Query Section</p></figcaption></figure>

#### Condition

In this section, you can define the conditions under which the query should be executed.

For example, if you need to retrieve a user whose email is `contact@fireapis.com`, you would configure the following:

* **Table**: `user`
* **Query Action**: `SELECT`
* **Select Columns**: Choose which columns to return (e.g., `name`, `email`, etc.)
* **Condition**: Set the condition to check if the email equals `contact@fireapis.com`.

Dynamic values for the condition (e.g., the email) can be configured by clicking the plus (+) icon next to the input field. This will load the data source model, allowing you to pull dynamic data from the request or other sources when the logic is executed.

<figure><img src="/files/FHvGRYLVlfE4RmYDDl32" alt="DELETE query section"><figcaption><p>DELETE Query Section</p></figcaption></figure>

Below, we have added a few video explanations for your reference.


# Data Transformation

This action allows you to transform an array or object into a new object or array, enabling flexible data manipulation and reformatting.

#### **Data Selection**

In this section, you specify the path from which the object or array data will be taken for the transformation process.

**Example: Object Type**\
If you want to transform an existing object into a new object while retaining its current key-value pairs, consider the following:

* **Old Object**: `{"id":4,"name":"vasanth","is_active":true}`
* **New Object**: `{"id":4,"name":"vasanth","is_active":true, "email":"contact@fireapis.com"}`

You will select the path from which the old object should be accessed in the Data Selection section. For dynamic data, you can click the plus (+) icon next to the input field to load the data source model, allowing you to pull in data dynamically.

<figure><img src="/files/AZeLR5CNfSd5tCS8OFku" alt="Data selection in data transformation section"><figcaption><p>Data selection in data transformation section</p></figcaption></figure>

#### Form Data

This section allows you to configure how the new object should be created.

Continuing with the previous example, you can add keys and their values to form the new object. For instance, you could add a key named `email`, and select the path or source from which to pull that value. Again, for dynamic data, use the plus (+) icon to access the data source model for easy selection.

<figure><img src="/files/UyxiCG4aflZeNKicWnTi" alt="Form data section in data transformation"><figcaption><p>Form data section in data transformation</p></figcaption></figure>

Below, we have attached a detailed explanation for this action.


# Build Object

This section allows you to create a new object that can be utilized for further actions. You can define the structure and key-value pairs of the object to suit your needs.

#### Object Data

This section consists of two parts: **Key Name** and **Value**. The key name can be static, while the value can be dynamic by specifying the path or source from which these values should be retrieved.&#x20;

To access dynamic data, you can click the plus (+) icon next to the value input to load the data source model.&#x20;

To add more key-value pairs, simply use the **Add Key-Value** button located below this section.

<figure><img src="/files/l6LBAJqUL6B9qmJ8vA8x" alt="Build Object section"><figcaption><p>Build Object Section</p></figcaption></figure>


# Build Conditions

In this section, you can set up conditions that trigger specific actions. Define the criteria for each condition and the actions that should run when those conditions are met.

In this section, you can set up **if** and **otherwise if** conditions. The first **if** condition is checked; if it's true, the corresponding actions will be executed. If it's false, the **otherwise if** condition will be validated, and the process repeats based on the checks.

Each condition allows you to configure the following:

* **Condition**: Define the criteria that need to be validated for the **if** statement. You can use the plus (+) icon to load the dynamic data source model for easy selection. For more information, refer to the video explanation provided in this section.

<figure><img src="/files/nBO3E5fAyvAk6wi1WSIT" alt="Adding conditions"><figcaption><p>Adding Conditions</p></figcaption></figure>

* **Actions**: Specify the actions that should be executed when the condition is met. The results of these actions will be returned based on the condition validation.

<figure><img src="/files/gFXZCaUkAEjdFdXkOAOY" alt="Configuring conditions and their actions"><figcaption><p>Configuring Conditions and their Actions</p></figcaption></figure>

You can add multiple conditions here.&#x20;

<figure><img src="/files/OJ6AVC8LGLd7HCQBeFZV" alt="Add multiple actions"><figcaption><p>Add Multiple Actions</p></figcaption></figure>

Below, we have included a video for a detailed explanation of these actions.


# Other Utilities

This section offers utility actions like token generation, token decryption, encryption, decryption, and UUID generation to help manage security and data handling tasks.

* **Token Generation**: Create secure tokens for user authentication and session management.
* **Token Decryption**: Decrypt tokens to retrieve the original data securely.
* **Encryption**: Encrypt sensitive data to protect it from unauthorized access.
* **Decryption**: Decrypt encrypted data to access the original information.
* **Hashing**: Generate hashes for data integrity checks and secure password storage.
* **Validate Hashing**: Verify that the provided data matches its hashed version.
* **UUID Generator**: Generate unique identifiers (UUIDs) for use in databases and applications.

Each of these utilities will be addressed in detail on individual pages for a comprehensive understanding of their functionalities and use cases.


# Token Generation

You can create a JWT (JSON Web Token) for authentication and session management. This allows you to configure which data should be included in the token.

In the **Token Generation** section, you can configure the following:

#### **Token Secret Key**

Specify the secret key to use for generating the token. This key is essential for validating the token and ensuring a more secure system. Always select keys from the **Secrets** section.

<figure><img src="/files/FUObmaRXtQld7rowNuqn" alt="Configure token secret key"><figcaption><p>Configure Token Secret Key</p></figcaption></figure>

#### **Expiry Time**

Set the expiry time for the token, indicating how long it will remain valid. After this time, the token becomes invalid. You can choose from a dropdown list of available values.

<figure><img src="/files/uSoW58gE89Nx723IkZL3" alt="Configure expiry time"><figcaption><p>Configure Expiry Time</p></figcaption></figure>

#### **Token Data**

Define the data that should be included in the token. You can add key-value pairs, where the key represents the name of the value. For dynamic values, use the dynamic data source model by clicking the plus (+) icon.

<figure><img src="/files/qEvF9ye1DTL9sJy1ahkz" alt="Configure token data in token generation"><figcaption><p>Configure Token Data in Token Generation</p></figcaption></figure>


# Token Decryption

Decrypt token using a secret key.

In the **Decode Token** action, you can configure the following settings to decrypt a token:

#### Token :

Choose the token source using the **Dynamic Data Source Selector** popup. You can pass the token through the input payload or from the results of a previous action.

#### Token Secret Key :

Set up the secret key used to generate the token. You can select this from the **Secrets Manager**, where you store sensitive information like API keys or tokens.

#### Error message :

Define the error message to display if the token is invalid or expired.

<figure><img src="/files/lGg4eIEZ5HsFilLblVz6" alt=""><figcaption><p>Decode token Action Configuration</p></figcaption></figure>

<figure><img src="/files/RnULpRfGfpFd4OSz484M" alt=""><figcaption><p>Decode Token Action Result</p></figcaption></figure>


# Hashing

Secure your data by hashing it

#### Hashing

Hashing is a technique used to secure your data by converting plain text into a unique hashed representation that cannot be directly reverted to its original form.

This method is commonly used for storing passwords, as it is not a good practice to store plain text passwords. Instead, passwords are hashed and stored in the database.\
While hashed text cannot be reversed, you can validate a password by comparing it with the hashed text.&#x20;

In this action, you can configure the following:

#### Input Hashable Data

Specify the data to be hashed using the **Dynamic Data Source Selector** popup.

<figure><img src="/files/p9Z4JZBcEpH5vqLC3HDs" alt=""><figcaption><p>Hashing Action Config</p></figcaption></figure>

<figure><img src="/files/q7AsPHDB7Em7fboCGEER" alt=""><figcaption><p>Hash Action Result</p></figcaption></figure>


# Validate Hash

Verify the validity of hashed text.

This action validates hashed text against a given input to check its validity. As mentioned earlier, hashed text cannot be reversed to its original form. However, you can confirm whether the given input matches the hashed text.

In this action, you can configure the following:

#### Hash input

Set up the data source for the hashed text. You can provide it as static text or dynamically using the **Dynamic Data Source Selector** popup.

#### Validate input

Set up the data source for the input text that needs to be validated against the hashed text. This can also be provided as static text or dynamically using the **Dynamic Data Source Selector** popup.

<figure><img src="/files/SrYSW22tPHIs5qZmDBVc" alt=""><figcaption><p>Validating Hash Action Configuration</p></figcaption></figure>

<figure><img src="/files/HehRY5szX6AaIVPfwAwr" alt=""><figcaption><p>Validate Hash Action Results</p></figcaption></figure>


# Encrypt

Secure your data by encrypting it.

Encryption is the process of securing your data using a secret key. The secret key is required to access the encrypted data.

In this action, you can configure the following:

#### Encryption Input:

Set up the data to be encrypted. You can provide this data as a static value or dynamically using the **Dynamic Data Source Selector** popup.

#### Encryption key:

Set up the secret key for encryption. This key will be used to both encrypt and decrypt the data. You can provide the key as a static value or dynamically using the **Dynamic Data Source Selector** popup.

<figure><img src="/files/GIckNvxXxIX2WPGgfrlB" alt=""><figcaption><p>Encrypt Action Configuration</p></figcaption></figure>

<figure><img src="/files/6WNSs1iK4VC2boxdV3GN" alt=""><figcaption><p>Encrypt Action Result</p></figcaption></figure>


# Decrypt

Decrypt encrypted data using a secret key.

In this Decrypt your input action, you can configure the following :&#x20;

#### Decryption input:

Set up the encrypted data to be decrypted. This data can be provided as a static value or dynamically using the **Dynamic Data Source Selector** popup.

#### Encryption key:

Set up the secret key used during the encryption process. This key can be provided as a static value or dynamically using the **Dynamic Data Source Selector** popup.

<figure><img src="/files/XUjZHrPH1O3VbSr2TjXY" alt=""><figcaption><p>Decryption Action Configurations</p></figcaption></figure>

<figure><img src="/files/8GDSXG3ARr4lwhVdHHrb" alt=""><figcaption><p>Decryption Action Result</p></figcaption></figure>


# Date Utilities

Utility action  to manipulate, format & perform calculations on date.

This group of utilities helps you work with dates by performing calculations, formatting, and managing time zones. Below are the available actions:

1. **Find difference between dates:**

   Calculate the difference between two dates (start and end) in your chosen unit, such as years, months, days, etc.
2. **Add/Subtract dates:**

   Perform calculations to add or subtract a specific number of units (like days, months, or years) to a given date and get the result.
3. **Format Date:**

   Convert programmatic dates (e.g., timestamps from a database) into a human-readable format. You can customize the format to match your design requirements.
4. **Apply Timezone to Date:**

   Convert a given date or timestamp into a different timezone based on your selection.

In the next section, we’ll explore how to configure each of these actions in detail.


# Find Difference Between Dates

Calculate the difference between a start date and an end date in a specific unit (e.g., hours, days, years, etc.).

This action allows you to calculate the time difference between two dates based on the unit of measurement you choose. Below are the configuration options:

#### Pick Start Date

Use the **Dynamic Data Source Selector** popup to select or enter the start date from a previous action or the provided payload.

#### Pick End Date

Similarly, use the **Dynamic Data Source Selector** popup to select or enter the end date from a previous action or the provided payload.

#### Select Unit of Measurement

Choose the unit for the difference calculation, such as years, months, days, hours, minutes, or seconds. The result will be displayed based on this selection.

We’ve included screenshots to demonstrate how to configure this action and the corresponding results. Below is the sample payload data used for this logic:

```json
{
  "start_date": "2024-02-03",
  "end_date": "2025-02-03"
}
```

<figure><img src="/files/M3D2pcJOX75Rg3HuvpzU" alt=""><figcaption><p>Find Difference Between Dates Action Configuration</p></figcaption></figure>

<figure><img src="/files/EaNln1JZb9Jhs8Qj0PqU" alt=""><figcaption><p>Find Difference Between Dates Action Result</p></figcaption></figure>


# Add/Subtract Dates

Add or subtract a specific number of units (e.g., years, months, days) to a given date.

This action allows you to calculate a new date by performing addition or subtraction on a selected date. Below are the configuration options:

#### Pick Date

Use the **Dynamic Data Source Selector** popup to enter or select the date from a previous action or payload. This is the date on which the addition or subtraction will be performed.

#### Select Operation

Choose whether to **Add** or **Subtract** from the selected date.

#### Enter the Unit

Specify the number of units (e.g., years, months, days, hours, minutes) to perform the operation.

We’ve included screenshots that show how to set up this action and the resulting calculated dates. Below are the details of the sample payload data used:

```json
{
  "start_date": "2024-02-03",
  "end_date": "2025-02-03"
}
```

<figure><img src="/files/qMbnHH2sJ6onsEZyZacZ" alt=""><figcaption><p>Add or Subtract Date Action Configuration</p></figcaption></figure>

<figure><img src="/files/RlkoIGg2F0eZhVslYLCv" alt=""><figcaption><p>Add or Subtract Date Action Result</p></figcaption></figure>


# Format Date

Convert a date or timestamp into a human-readable format based on your specific requirements.

This action allows you to format programmatic dates (e.g., timestamps from a database) into a customized, human-friendly format. Below are the configuration steps:

#### Pick date

Use the **Dynamic Data Source Selector** popup to enter or select a date from a previous action or payload. This is the date that will be formatted.

#### Output Format Configuration

Customize the output format by adding text and format values. You can combine multiple formats to create your desired date format.

#### Preview

See a preview of the formatted date based on your selected configuration.

Screenshots are provided to illustrate the configuration process and the resulting formatted dates. Below is the sample payload data used for demonstration:

```json
{
  "start_date": "2024-02-03",
  "end_date": "2025-02-03"
}
```

<figure><img src="/files/oijrwyUL4My7QhxSJA8G" alt=""><figcaption><p>Format Date Action Configuration</p></figcaption></figure>

<figure><img src="/files/A787fK9dxM0LPMz2jxLW" alt=""><figcaption><p>Format Date Action Result</p></figcaption></figure>


# Apply Timezone to Date

Convert a given date or timestamp to a different timezone of your choice.

This action allows you to change the timezone of a date or timestamp to align with your selected timezone. Below are the configuration steps:

#### Pick Date

Use the **Dynamic Data Source Selector** popup to enter or select a date from a previous action or payload. This is the date to which the timezone will be applied.

#### Timezone of Input Date

Specify the timezone of the selected input date. If left blank, the input date will be treated as **UTC** by default.

#### Timezone of Output Date

Select the desired timezone from the list of available timezones to which the input date should be converted.

We’ve included screenshots to demonstrate how to set up this action and the resulting date conversion. Below is the sample payload data used:

```json
{
  "start_date": "2024-02-03",
  "end_date": "2025-02-03"
}
```

<figure><img src="/files/B402wxCO7qnzd63MvWeh" alt=""><figcaption><p>Apply Timezone Conversion Action Configuration</p></figcaption></figure>

<figure><img src="/files/S6JEoKUcWuQZZbtTywk6" alt=""><figcaption><p>Apply Timezone Conversion Action Result</p></figcaption></figure>


# What Next?

Covers the next features to be in fireapis

## Features in the Next Release:

New actions for functions, including:

* Conditional actions
* looping through data
* webhook-based functions
* Bulk create, update, and delete operations for API resources
* Adding extra storage to an account usinf add-ons

A few more third-party APIs will be added to the marketplace.

If you have any suggestions for improvements in any area, please feel free to share your feedback via chat support or email us at <vasanth@fireapis.com>


