- Pre-Call API: once, before the conversation starts.
- In-Call API: during the conversation, when the flow reaches the node.
- Post-Call API: after the conversation ends, as a post-call action.
Adding an API Node
In the PearlVibe editor, click Add Node at the bottom of the canvas, then pick the moment the request should run. You can also ask PearlVibe to add one for you in the chat (Build mode).- In-Call API
- Pre-Call API
- Post-Call API
In the In-Call tab, pick API in the Actions section, then connect it where the request should run.



Configuring the Request
1
Description
Explain what this API does and what data it returns (e.g. “Returns open appointment slots for the requested day”). The description is required, up to 150 characters. Pearl reads it to understand what the request is for.



2
URL & Method
In URL, pick the method in the dropdown before the address (GET, POST, PUT, DELETE, or PATCH), then type the endpoint URL. Click Variable to insert a variable, among those available in the node’s context (see Context Differences) and your environment variables, for example 

{apiBaseUrl}/orders. Variables are inserted as they are, without URL encoding.

The available fields depend on the method:
- The Body section is shown only for POST, PUT, and PATCH (hidden for GET and DELETE).
- The Response Output Schema is available for every method except DELETE.
A request times out after 10 seconds, and only a 2xx status counts as a success. If your API is behind a firewall, allow the NLPearl IP addresses listed in IP Whitelisting. This applies to Pre-Call, In-Call, and Post-Call requests alike.
3
Headers
Add any header required by the API, such as 

Content-Type or Authorization, as Key / Value pairs. Header values are static: only environment variables are replaced in them, since they are filled in across the whole flow before each call. When you don’t set a Content-Type, application/json is sent.

For a dynamic authorization token, use a Credential instead of a static header.
4
Body (POST / PUT / PATCH)
Provide Key / Value pairs, sent as JSON. Type in the empty row at the bottom to add one; hover a row to delete it.

Each Value is either one of your Variables or a Static & Custom value. Static values support these types:When using a variable in the body, be aware that:


For each row you can tick the Required checkbox:
- Checked: if the value is missing, the request is not sent. During the conversation, Pearl is told which value is missing and asks the customer for it. In a Pre-Call API, there is no one to ask, so the node takes its Not Success path.
- Unchecked: the request is sent even if the value is missing; the key is simply left out.
- Each variable keeps its configured data type (e.g. a Whole Number is sent as a number, a Text as a string). During the conversation, a value that doesn’t match the type stops the request.
- You can mix static values and variables in the same body.
- For nested JSON, use dot notation in the Key (
customer.address.street) and square brackets for array indices (order.items[0].productId). See Using Nested Objects below.
{ {agentName} }- the variable is replaced, the outer braces are kept.query { boards(ids: {agentName}) { id } }- the variable is replaced, the rest of the query is left untouched.{ agentName }- braces containing spaces around the ID are not recognized as a variable; the text is sent literally.
Using Nested Objects
Many APIs expect a nested JSON structure in their request body. Use dot notation and array indices in the Key column to build nested payloads while keeping them organised and readable.How to define nested keys
- Use dot notation for properties (
customer.address.street) - Use square brackets for array indices (
order.items[0].productId)
You can pair nested paths with any variable type: Text, Number, Boolean, etc.
Resulting body:
body.json
Response Output Schema & Variable Assignment
Available for every method except DELETE. The Response Output Schema lets you filter the API response so only the relevant data flows back into the conversation. Without filtering, the entire JSON is returned, which can reduce precision because the AI receives too much unrelated information. Even for small responses, setting a schema is strongly recommended to keep Pearl focused. Each row of the schema has three parts:

How it works
- Provide a list of JSON Path strings, one per row.
- The system extracts only those paths from the API response; everything else is discarded.
- As soon as one row has a variable, Pearl receives only the assigned variables, not the rest of the response. Rows without a variable then don’t reach Pearl.
- The same variable can’t be assigned to two paths, and environment variables can’t be assigned.
Path syntax
A path walks down the API response to the value you want. The simplest form is a chain of keys, and it covers most responses:
A path can also choose, which is what you need as soon as an API answers with a list and you only want one entry out of it:
Filters accept
==, !=, <, <=, >, >=, contains, startswith, and endswith. A path can be up to 2,048 characters, with at most two .. searches and eight nested brackets; beyond that, it selects nothing.
A slice or a recursive .. search can match several values at once. Assign one of those to a variable and the variable has to allow multiple values — see Assigning to a variable below.
These are not the same as the paths in the Key column of the request body. There,
order.items[0].productId builds a nested payload. Here, the same shape reads a value out of the response.Using a variable inside a path
A path can carry a{variableId} placeholder — the same syntax used everywhere else (see Flow Variables) — for a variable the request itself sends, in the URL or the body. It is replaced with the value sent in this request before the response is read, so the path can depend on what the conversation has collected:preferredDateIso, that path returns the first slot on that day. If the value is missing, nothing is extracted.Benefits:
- Keeps the response size small
- Improves the quality and relevance of AI outputs
- Prevents hitting the 10,000-character truncation limit
- Ensures only the necessary fields are carried into the next steps of the conversation
Assigning to a variable
Key things to know:- The variable’s type must match the data type returned by the API at that path.
- If the value returned is a list, make sure the variable is configured to allow multiple values.
- A variable can store up to 2,000 characters. Any data beyond this limit is truncated.
Outside of Pre-Call APIs, assigning a variable is optional. Without any assigned variable, Pearl receives the filtered JSON for the rest of the conversation, but it isn’t stored for later reuse.
Credentials (Authentication)
If your API requires authentication, use a Credential. In the node’s Options, turn on Credentials and pick one in Token. Add New opens your Pearl’s credentials, and the pencil next to the selected one (Edit) opens its settings. Leave Credentials off if no authentication is needed. Credentials are shared by the whole Pearl.

To add, connect, or manage credentials (connected accounts, API keys, bearer tokens, refresh tokens), see Credentials.
Context Differences
The same API node behaves differently depending on where you place it in the flow.
Environment variables are available in all three.
- Pre-Call API
- In-Call API
- Post-Call API
Runs once before the conversation begins. Typical uses:

- Inbound: look up the caller using the auto-captured phone number and call id.
- Outbound: preload data from Pre-Call variables already stored on the lead.
Only Pre-Call variables are available (system variables like phone number, call id, first/last name, email, plus your own Pre-Call variables).
- Assigning response values to variables is required: that’s how pre-call data becomes usable in the conversation. The rows marked Required must come back for the node to take the Success path.
- Transitions: a Success branch by default. Turn on On Error Transition in the Transitions tab to add a Not Success branch. It is taken when a required input is missing, the API answers with a non-2xx status, the response can’t be read, a required value doesn’t come back, or the request fails.
- Pre-Call API nodes can’t be renamed or duplicated.


Testing Your API
Use the Test the API block at the bottom of the form. Testing sends a real request to your API.1
Fill in the test values
Give a sample Value to every variable used in the request.



2
Run the test
Click Run test (Run again afterwards). To work with more room, click Expand: the form and the test values sit on the left, the answer on the right, and Send runs the request.



3
Inspect the answer
The result starts with a verdict (Answer received, The API answered with an error, Couldn’t reach the URL, or The test couldn’t run), the status code with the time it took, and the request line. Then switch between Request, Response (Filtered or Unfiltered, if an Output Schema is set), and Assigned Variables.



Variables
Learn how to create and use variables inside API nodes.







