# Custom APIs

## Available only on paid subscriptions - please contact us once on a subscription to enable.

The Custom Action tool allows you to define custom web requests for the bot to use.

<figure><img src="https://3098247345-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUZKi9A4XwKvuOPgMvVMe%2Fuploads%2Fgit-blob-757e6771ddb35342779d5d31832fa0ce0baa6007%2Fimage%20(1).png?alt=media" alt="custom action tool" width="563"><figcaption><p>Preview of custom action tool (subject to change)</p></figcaption></figure>

<table><thead><tr><th width="277.11328125">Fields</th><th>Description</th></tr></thead><tbody><tr><td>Name</td><td>Name of your custom action. This will determine how the action can be called inside of your custom prompt. The name will be automatically converted to <code>custom_api_&#x3C;name></code>.</td></tr><tr><td>URL</td><td><p>Endpoint you want to make a request to. Query parameters are supported.<br><br>Example:</p><pre class="language-url"><code class="lang-url">https://your-domain.com/path?q={{param}}
</code></pre></td></tr><tr><td>Payload Template <em>(Optional)</em></td><td><p>Request body to be sent to the endpoint. Can be empty.<br><br>Example:</p><pre class="language-json"><code class="lang-json">{
  "fieldName": "value",
  "anotherField": "{{param2}}" // this can be passed in by the AI by configuring the prompt
}
</code></pre></td></tr><tr><td>Headers <em>(Optional)</em></td><td>Request headers to be sent to the endpoint. Can be empty.</td></tr></tbody></table>

***

### How to use?

You can use the tool just like any other existing tools. Refer to the following guide for more information.

{% tabs %}
{% tab title="Where to Enable" %}
{% hint style="info" %}
You can have multiple instances of custom action.
{% endhint %}

In the sidebar, click on **Customize** to open up the customize fly-out.

<figure><img src="https://3098247345-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUZKi9A4XwKvuOPgMvVMe%2Fuploads%2Fgit-blob-e72a23815c8fd15aaf3653e24ec863b144d7398e%2Fimage%20(1)%20(1).png?alt=media" alt="" width="366"><figcaption></figcaption></figure>

In the fly-out, click on **Create new action**.

<figure><img src="https://3098247345-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUZKi9A4XwKvuOPgMvVMe%2Fuploads%2Fgit-blob-ae2d2804b818dabf789ec676604e1c9162ae4b6c%2Fimage%20(2).png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

Then look for **Custom Action**.

<figure><img src="https://3098247345-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUZKi9A4XwKvuOPgMvVMe%2Fuploads%2Fgit-blob-82de1b87e5a544f596e04ea44d4674345053162a%2Fimage%20(3).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

Finally, define your custom web request and hit **Create Custom Web Request**. Once created, custom action will appear under **Actions**.
{% endtab %}
{% endtabs %}


---

# 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://docs.eesel.ai/integrations/custom-apis.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.
