> For the complete documentation index, see [llms.txt](https://docs.uptiq.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uptiq.ai/ai-workbench-qore/platform-resources/skill-library/api-call.md).

# API Call

Let an agent call any HTTP endpoint that has no pre-built connector, with API Call or API Call Advanced.

**API Call** lets an agent call an HTTP endpoint that isn't in the [Apps & Services](/ai-workbench-qore/console/agent-builder/build/apps-and-services.md) or [MCP Tools](/ai-workbench-qore/console/agent-builder/build/mcp-tools.md) catalogs. That might be your CRM, a core banking system, or an internal service.

If the service is in one of those catalogs, use the connector there instead, because it handles authentication for you. Use API Call for everything else.

The **Skill Library** tab of [Add Skill](/ai-workbench-qore/console/agent-builder/build/adding-a-skill-to-the-agent.md) offers two versions:

| Skill                 | Use it when                                                                                                                                                            |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **API Call**          | A request made of a URL, headers, and query parameters, with no request body                                                                                           |
| **API Call Advanced** | Parts of the request change with each call. It adds a **Body** tab, and supports dynamic variables in headers, query parameters, path parameters, and the request body |

A skill you attach is set on that agent only.

## Add an API Call skill

1. On the Builder Canvas, select **+ Add Skill**, and open the **Skill Library** tab.
2. Select **API Call** or **API Call Advanced**.
3. Fill in the form. See [The form](#the-form).
4. Select **Attach**.

## The form

The top of the form holds the request itself:

| Field           | What to enter                                                                             |
| --------------- | ----------------------------------------------------------------------------------------- |
| **Name**        | What the planner calls the skill                                                          |
| **Description** | When to use the skill. The planner reads it to decide whether this skill fits the request |
| **Url**         | Required. The endpoint to call                                                            |
| **Method**      | **Get**, the default, **Post**, **Put**, **Patch**, or **Delete**                         |

{% hint style="info" %}
**Write the description for the planner.** The planner uses the skill only when its description matches the request. "Creates a client record in the CRM after an application is approved" works better than "CRM API".
{% endhint %}

Below the request fields, a set of tabs holds the rest:

| Tab               | What it holds                                                                                                                                                         |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Authorization** | How the request authenticates. See [Authorization](#authorization)                                                                                                    |
| **Headers**       | Headers sent with the request, as **Key** and **Value** pairs. Select **Add Entry** for each one                                                                      |
| **Params**        | Query parameters, as **Key** and **Value** pairs. Select **Add Entry** for each one                                                                                   |
| **Body**          | **API Call Advanced** only. The request body, as **Key** and **Value** pairs. Select **Add Mapping** for each one                                                     |
| **Input Schema**  | The input the skill expects from the agent. Add fields with **Key**, **Type**, **Description**, and **Required**, or switch to **Advanced** to edit it as JSON Schema |
| **Output Schema** | The output the skill returns, in the same **Basic** and **Advanced** views                                                                                            |

{% hint style="warning" %}
**API Call has no Body tab,** even when the method is **Post**. To send a request body, use **API Call Advanced**.
{% endhint %}

### Authorization

| Option           | What you enter                                                             |
| ---------------- | -------------------------------------------------------------------------- |
| **Basic**        | A **Username** and a **Password**                                          |
| **Bearer Token** | A **Token**                                                                |
| **API Key**      | The key, as **Key** and **Value** pairs. Select **Add Entry** for each one |

{% hint style="warning" %}
**Keep credentials in secrets.** Store keys and tokens in [Secrets & Variables](/ai-workbench-qore/console/agent-builder/build/secrets-and-variables.md), and reference them, for example `$secret.CRM_TOKEN`, rather than typing the value into the form.
{% endhint %}

## API Call Advanced

**API Call Advanced** builds each request from the values the agent passes in. Define those values in **Input Schema**, then reference them in the headers, query parameters, path parameters, or body.

### Example: create a client in your CRM

An agent approves loan applications, and your CRM needs each new client's details so the service team can take over.

1. Add an **API Call Advanced** skill named **Create CRM client**, and describe it as "Creates a client record in the CRM after an application is approved."
2. Set **Url** to your CRM's create-client endpoint, such as `https://api.yourcrm.com/v1/clients`, and **Method** to **Post**.
3. On **Authorization**, choose **Bearer Token**, and enter the token as a secret reference.
4. On **Headers**, add `Content-Type` with the value `application/json`.
5. On **Input Schema**, add `firstName`, `lastName`, and `email`.
6. On **Body**, map each body field to its input.
7. Select **Attach**.

When an application is approved, the planner chooses **Create CRM client**, fills the input from the application, and sends the request.

## Related pages

* [Skill Library](/ai-workbench-qore/platform-resources/skill-library.md): every skill you can turn on or configure.
* [Adding a skill to the agent](/ai-workbench-qore/console/agent-builder/build/adding-a-skill-to-the-agent.md): the Add Skill flow.
* [Secrets & Variables](/ai-workbench-qore/console/agent-builder/build/secrets-and-variables.md): where to keep keys and tokens.

***

{% columns %}
{% column width="83.33333333333334%" %}

<p align="right"><em>Maintained by</em> <mark style="color:green;">Abhishek Paul</mark><br><code>AI-assisted, human-approved</code></p>
{% endcolumn %}

{% column width="16.666666666666664%" %}

<div align="left"><img src="https://1326225582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0qmgQjJ5aArDTj2ACFHG%2Fuploads%2Fgit-blob-d034645b4f8f8ee661985f5306b60ded3289653c%2Fmaintainer-abhishek-paul.png?alt=media" alt="" width="60"></div>
{% endcolumn %}
{% endcolumns %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.uptiq.ai/ai-workbench-qore/platform-resources/skill-library/api-call.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
