---
docId: doc_8748cd6120d84292b1c0c10be0dd01e7
title: 'Connect a REST API'
description: 'Create an HTTP tool, configure variables, test the request and publish it for your agents.'
---

# Connect a REST API

Turn an HTTP request into a tool the agent can use to query or update an external system. You need that API's URL, method, authentication and expected response.

Open **Integrations → Functions → REST API**.

<span id="step-1-identity"></span>
<span id="paso-1-identidad"></span>


![REST API editor](/images/screenshots/manuales-piloto/integraciones/pantallas-completas/en/api-rest.webp)

## Create the draft

1. Click **New API**.
2. Enter its technical name using lowercase letters, numbers and underscores.
3. Describe what it does and when the agent should use it.
4. Click **Create and configure**.

The API is created as a draft and its editor opens. It is not yet published for agents.

<span id="step-2-define-the-request"></span>
<span id="variables"></span>
<span id="editor-tab"></span>
<span id="paso-2-definir-la-request"></span>
<span id="pestaña-editor"></span>

## Configure the request

In **Request**, complete the method, URL, parameters, headers, authentication and body according to the service's documentation. You can import a cURL and review the fields it filled.

Use variables for values that change between calls. They can be filled by AI, use a fixed value or take data from the context. Describe AI variables and select the source for context variables before publishing.

Store credentials through [Secrets](/help/integrations/functions/secrets). If the destination or configuration linked to a credential changes, complete any authorization the editor requests.

<span id="testing-the-api"></span>
<span id="response-tab"></span>
<span id="advanced-tab"></span>
<span id="probar-la-api"></span>
<span id="pestaña-respuesta"></span>
<span id="pestaña-avanzado"></span>

## Test and choose the response

1. Open **Test** and complete the test data.
2. To check how the request is assembled without calling the destination, open the button's menu and choose **Test without sending**.
3. To call the service, click **Test**. This makes a real request and can modify data if the method does so.
4. Check what was sent, the HTTP status and the response.
5. In **Response**, choose which data the agent receives.

When the request uses Secrets, you may need to save its changes before testing. Follow the panel's instructions; they do not mean every pending change is already applied.

In **Advanced**, configure any additional options the service needs, such as periodic authentication. To refresh a token through a scheduled request, see [Cron Jobs](/help/integrations/functions/cron-jobs).

<span id="step-3-review-and-create"></span>
<span id="managing-the-api"></span>
<span id="publishing-pausing-and-managing"></span>
<span id="paso-3-revisar-y-crear"></span>
<span id="administrar-la-api"></span>
<span id="publicar-pausar-y-administrar"></span>

## Publish and assign

Click **Save** to keep the draft or **Publish** to enable the API. Check its status afterward: if data or authorization is missing, resolve it before using the API.

In **Agents**, link the tool to the agents that need it. You can also do this from their [Tools](/help/agents/tools). Publishing the API does not assign it to every agent automatically.

When you edit an active API, saving can apply the new configuration to agents using it. Check its status after the change; a configuration that cannot be enabled may remain a draft. Publishing agent instructions is a separate action.

<span id="summary-tab"></span>
<span id="logs-tab"></span>
<span id="stats-tab"></span>
<span id="pestaña-resumen"></span>
<span id="pestaña-logs"></span>
<span id="pestaña-stats"></span>

## Review calls or pause

Use **Summary** to review settings and **Calls** to inspect executions and errors. A successful test confirms that case; it does not guarantee every future call will succeed.

In **Summary → Activity**, choose **24 h**, **7 days** or **30 days** to review call volume, successes, errors, typical latency and the agents using the API most. Use **View all calls** to open individual records.

**Pause** stops availability for agents and preserves the configuration. It does not reverse actions the service has already performed. The menu also lets you clone or delete the API.
