Skip to main content
The API Request block lets your Phonely flow connect with any external web service or app that supports APIs. You can use it to send or receive data, such as updating your CRM, fetching an order status, or sending a webhook notification - directly during a call. Making An Api Request In Phonely Gi
1

What the API Request Block Does

This block acts as a bridge between Phonely and another system.
It can:
  • Send data collected from callers (e.g., names, phone numbers, emails).
  • Retrieve data (e.g., product info, availability, or pricing).
  • Trigger workflows in apps like Zapier, Make, or your internal API.
You can connect it to any REST API using a cURL command or manual setup.
2

Adding the API Request Block to a Flow

  1. Connect it below a Collect or Ask Exactly block if you want to send the data collected earlier.
For example, you can collect a caller’s name and email first, then use the API Request block to send those details to your CRM.
  1. In your flow editor, click the ➕ (plus) icon below an existing block.
  2. In the popup menu, look under Live Call Actions.
  3. Select API Request.
    • You’ll see a new block added to your canvas labeled API Request.
    Api Request Block Pn
3

Setup

When you open the block, you’ll see two ways to define your API request:

Option 1: Import from cURL

If you already have a cURL command (e.g., from Postman or developer docs):
  1. Paste it into the cURL Command box.
  2. Click Import from cURL.
    Phonely automatically extracts the method, endpoint, headers, and body.
Example:
curl -X POST "https://jsonplaceholder.typicode.com/posts" \
-H "Content-Type: application/json" \
-d '{
  "title": "Phonely Flow Test",
  "body": "This is a test API request from my Phonely flow.",
  "userId": 1
}'
After import, Phonely converts this into structured fields under Configure.

Option 2: Build Manually

If you don’t have a cURL command, click Build Manually.
You’ll then define all settings step by step in the Configure tab.
Manually Build Api Request Flow Gi
4

Configure

The Configure tab is where you define what your API request should do.

1. API Method

Select the type of request from the dropdown:
  • GET – Retrieve data from a system.
  • POST – Send new data (most common).
  • PUT or PATCH – Update an existing record.
  • DELETE – Remove a resource.
Example: Choose POST when sending form data or new entries to an external app.

2. API URL

Enter the endpoint where the request should go, e.g.:
https://jsonplaceholder.typicode.com/posts
This is the destination for your data.

3. Headers

Headers define metadata or authentication details for your API call.
Click + Add to add key-value pairs such as:
KeyValue
Content-Typeapplication/json
AuthorizationBearer YOUR_API_KEY
Always include Content-Type: application/json for JSON-based APIs.

4. Query Parameters (optional)

Use this if your API uses query strings in the URL (e.g., filtering or pagination).Example:
KeyValue
userId5
limit10

5. Body (For POST, PUT, PATCH Requests)

Define what data will be sent.
Switch between Code (for JSON) and Raw (for plain text).
Example:
{
  "title": "Phonely Flow Test",
  "body": "This is a test API request from my Phonely flow.",
  "userId": 1
}
You can make your API requests dynamic by inserting variables captured earlier in your flow. Type @to open the variable picker or select from Available Variables or Auto-Gather Variables to include dynamic data in your request.

6. Advanced Settings

Click to expand this section.
These options help control the flow behavior during API communication.
Api Request Advanced Options Pn
SettingDescription
Enable Error HandlingLets you catch failed API calls and redirect the flow.
Retry on FailureRetries automatically if the server doesn’t respond.
Interim MessageSends a short message to the caller (e.g., “Please hold while I send your request.”).
Post Interim Message DelayAdds a short pause after the interim message.
Call Outcome TaggingAdd labels for analytics or call reports (e.g., “api_success” or “crm_update”).
Click Continue to save and move on to the Test step.
5

Test Stage

Testing ensures your configuration works before you publish your flow.
  1. Click Test.
    Phonely will send the request exactly as you configured.
  2. The response will display instantly, showing whether it succeeded or failed.
If successful, you’ll see:
Status: 201 Created
{
  "id": 101,
  "title": "Phonely Flow Test",
  "body": "This is a test API request from my Phonely flow.",
  "userId": 1
}
If failed, you’ll get an error message explaining what went wrong (e.g., invalid URL, authentication error, or timeout).
6

Usecases for API Requests

ScenarioActionExample Use Case
CRM integrationPOSTSend collected lead data to HubSpot or Zoho CRM
SMS gatewayPOSTSend a text message via Twilio
Data lookupGETFetch an order status or product info
NotificationPOSTTrigger a Slack or Discord webhook
Ticket creationPOSTCreate a support ticket in Zendesk or Freshdesk