Skip to main content
Roberty

Call an API

Call external APIs directly from the agent.

Call an API

Lets the agent make HTTP requests to external APIs, with the method, headers and body set in the configuration. The agent decides the request's body from the conversation's context.

Configuration

FieldRequiredWhat it is
API endpointYesThe full URL of the endpoint to call (e.g. https://api.example.com/v1/customers)
HTTP methodYesThe request's method: GET, POST, PUT, DELETE or PATCH
Headers (JSON)NoThe request's headers as a JSON object (e.g. { "Authorization": "Bearer token123", "Content-Type": "application/json" })

How it works

Given a task involving that API, the agent:

  1. Uses the configured endpoint and method.
  2. Applies the headers from the configuration.
  3. Decides the request's body from the conversation's context.
  4. Returns the HTTP status and the data in the response.

Input parameters (at run time)

ParameterWhat it is
BodyThe request's body (for POST, PUT and PATCH). The agent fills it in from the context

Response

FieldWhat it is
StatusThe response's HTTP code (200, 201, 404)
DataWhat the API returned
tip

Use the action's description to tell the agent what the API does and when to use it. The more precise the description, the better the agent decides when and how to call the endpoint.