API Library – Complete Overview & How It Works
The API Library in Geta.ai allows you to connect your chatbot or voice bot with external systems such as CRMs, ERPs, marketing tools, or custom applications.
You can create APIs, import cURL requests, add headers, insert contact properties dynamically, process payloads with custom logic, and even send API outputs back into your bot flow or save them inside contact properties.
This guide explains how to use every part of the API Library in a simple, step-by-step way.
1. Opening the API Library
To access and create APIs:
Log in to Geta.ai
Click the three-dots menu in the navigation bar
Select API Library
Click Create to add a new API
– OR –
Click Import cURL to upload an existing API request
2. Importing a cURL Request
If you already have a cURL:
Click Import cURL
Paste the cURL command
Click Import
Your API will be automatically created with method, headers, payload, and URL filled in
3. Choosing the API Method
The Methods dropdown allows you to select the type of API call:
GET — Fetch data
POST — Send data
PUT — Update data
PATCH — Partially update
DELETE — Remove data
Choose the method your endpoint requires.
4. Selecting Payload Type
Choose the format your API accepts:
JSON
Multipart Form-Data (for files or media)
5. Configuring the URL
Enter the endpoint URL your bot will hit.
You can also click the three-dots menu inside the URL field to insert:
APIs → previously created API variables
Contact Properties → fields like First Name, Email, User Type
(Useful when you want to pass user-specific data to the API)
Example:https://client-api.com/get-user?name={{first_name}}
6. Adding Headers
Headers help authenticate or define your request type.
Click Add Header
Enter the Header Key (e.g., Content-Type, Authorization)
Enter the Header Value (e.g., application/json, Bearer Token)
Use the plus (+) icon to add more
Use the minus (-) icon to remove
You can again use the three-dots menu inside header fields to insert APIs or contact properties dynamically.
7. Configuring the Payload
The Payload Content is the data you send in the API body.
Examples:
Sending a WhatsApp message
Submitting lead details
Passing user inputs
You can:
Insert contact properties
Insert API values
Include dynamic user responses
Modify or remove these values anytime
Example payload snippet:
{ "name": "{{first_name}}", "email": "{{email}}", "to": "918XXXXXXXX", "template": "welcome_template"}
8. Add Function to Process Payload (Optional Logic Layer)
This feature lets you apply custom logic before the payload is sent.
You can:
Modify values
Add new fields
Run conditions
Transform data
Example:
function processPayload(payload) { payload.age += 5; payload.status = "Updated"; return payload;}
This is extremely useful when API requires formatted or computed data.
9. Testing the API
Click Run Test to check if your API works.
If successful, Geta.ai will show:
✔ Message sent successfully
✔ API Response
✔ Success: true
This helps you validate the setup before using it inside your bot.
10. Using API Output
After a successful test, click the three-dots menu inside the Response section to choose how the API output should be used:
Use in Bot
Pass API response directly inside your bot flow.
Save as Contact Property
Store the API response (full or partial) into contact fields.
When chosen, you’ll get:
All Index → saves the entire JSON
Selected Index → choose specific value from array/object
Both
Use the API output inside the bot and also save it into contact properties.
11. Finalizing & Updating
Once all settings are complete:
Click Update to save the API
You can search or filter APIs by method (GET, POST, PUT, PATCH, DELETE)
Your API is now ready to be used inside Bot Builder.
12. Using the API Inside Bot Builder
You can attach your API to:
Action Node
After user input nodes
Lead creation nodes
Condition-based flows
CRM update steps
Example:
If a user enters their Name, you can save it as a Contact Property and then:
Go to Action Node
Select API Library
Choose your API
The bot will send the name directly to your CRM
Summary
The API Library in Geta.ai enables:
Full API creation
Dynamic URL + payload customization
Contact property insertion
Header configuration
Custom payload logic
Response mapping
Use inside chatbot workflows
It is one of the most powerful tools in Geta.ai for deep integration and automation.