Add a Custom API Request element
Right-click on an empty area of your canvas and select Custom API request. Click the element once to open the configuration sidebar.Configure the request
Request URL
Enter the full HTTPS endpoint URL in the Request URL field. HTTP is not supported — all requests must use a secure HTTPS connection. You can embed flow variables inside the URL using#ATTRI/variableName:
Request method
Click the method dropdown to select the HTTP verb:| Method | Typical use |
|---|---|
GET | Retrieve data without a body |
POST | Create a new resource |
PUT | Replace an existing resource |
PATCH | Partially update an existing resource |
DELETE | Remove a resource |
Request headers
Click Change header to add or modify HTTP headers. Supported header types include:- Authorization — authentication credentials (API key, Bearer token).
- WWW-Authenticate — server-initiated authentication challenges.
- Accept-Charset — acceptable character sets (e.g., UTF-8).
- Content-Type — the media type of the request body (e.g.,
application/json). - Cache-Control — caching directives for the request.
Request body (POST, PUT, PATCH)
Choose a body type from the dropdown:- Raw JSON
- Raw Text / HTML
- Form Data
- URL Encoded
Send a JSON object as the body. Enter valid JSON in the editor, using
#ATTRI/variableName to inject variable values:Save response values to variables
After a successful request, map values from the JSON response body to flow variables using JSONPath expressions. In the sidebar, click Add transformation rule and fill in:A JSONPath expression that points to the value you want to extract. Use
$ for the root and .property to navigate object keys.Examples:$.temperature— extracts thetemperaturefield from the root.$.data.user.name— navigates nested objects.$.results[0].title— accesses the first item in an array.
The Plural attribute name where the extracted value will be stored. For example:
currentTemperature.Use the test button
Click Test request at the bottom of the sidebar to send the request immediately and inspect the raw JSON response. Click on any value in the response to copy its JSONPath automatically.Use saved variables in speech and other elements
Once a response value is stored in a variable, reference it anywhere in your flow with#ATTRI/variableName:
Authentication
Plural supports the following authentication methods:- API key — include the key as a custom header (for example,
X-API-Key: your_key_here). - Bearer token — add an
Authorizationheader with the valueBearer your_token_here.
CORS workaround
If the API you are calling does not support CORS (cross-origin resource sharing), you will receive a browser-level error when calling it from an Avatar flow. To work around this:Change the
Content-Type header value from application/json to text/plain. Many APIs will still parse the body correctly, and the browser will not enforce CORS preflight for text/plain requests.Requirements profile for API integration
If you are documenting or sharing integration requirements with an API provider, reference these specifications:- Supported methods — POST, PUT, PATCH for write operations; GET for read; DELETE for removal.
- Body types — Raw JSON, Raw Text/HTML, Form Data, URL Encoded.
- CORS — If CORS is not supported, clients must set
Content-Type: text/plain. - Transport security — HTTPS only. HTTP requests are rejected.
- Authentication — API key in header or Bearer token. OAuth and SSL certificates are not supported.
Connect the outputs
The Custom API Request element has two outputs:- Success — the request returned a 2xx HTTP status code.
- Error — the request failed (network error, 4xx, or 5xx response).
