Skip to main content

Command Palette

Search for a command to run...

How to Test and Verify an HTTP API Integration in ZazzyAgent

Updated
View as Markdown

An API integration should be tested before it becomes part of a customer-facing automation.

A flow can be perfectly connected while the API configuration itself is incorrect.

Testing helps verify the complete request before customers depend on it.

What should you test?

Don't test only whether the endpoint exists.

Verify:

Endpoint
HTTP Method
Authentication
Headers
Parameters
Request Body
Response
Response Mapping

Every part can fail independently.

Start with the API configuration

Open the HTTP API integration in ZazzyAgent.

Review:

Endpoint

Check the URL carefully.

A small typo can produce a 404 error.

HTTP method

Make sure the method matches the external API.

For example:

GET
POST
PUT
DELETE

The correct method depends on the API.

Authentication

Check:

  • API key

  • Bearer token

  • Required authentication headers

  • Credential validity

Headers

Verify all required headers.

For example:

Content-Type
Authorization
x-api-key

Parameters

Check all required values.

Request body

If the API expects JSON or other request data, verify the structure.

Verify the connection

The HTTP API setup includes a verification step before the integration is saved.

Use that verification process to confirm that the configured request can reach the external service.

A successful verification is useful, but it does not guarantee that every customer-facing flow will work.

The live flow may use different dynamic data.

Test with a real subscriber value

When an API depends on subscriber information, use a real test customer or test subscriber value.

For example:

Order Number
Customer ID
Phone
Email

This is especially important when the API request contains dynamic data.

Test the request manually first

Before debugging the Flow Builder, understand what the API expects.

You should know:

Method
URL
Headers
Parameters
Body
Expected Response

Then compare those requirements with your ZazzyAgent configuration.

Test the happy path

Start with a value that should definitely work.

Example:

Order ID:
12345

Expected:

status = shipped
tracking_number = TRK12345

Once that works, test failure scenarios.

Test invalid data

Try an invalid identifier:

Order ID:
999999999

The API may return:

{
  "error": "Order not found"
}

Your automation should handle that response cleanly.

Test missing data

Also test what happens when a required value isn't supplied.

For example:

Customer
   ↓
Order Number
   ↓
Empty

The automation should not blindly call an API that requires an order number.

Instead, ask for the missing information or route the customer appropriately.

Test authentication failure

Temporarily test with an invalid credential in a controlled environment when appropriate.

The purpose is to confirm that your error handling works.

Your customer should receive something like:

We couldn't retrieve that information right now. Please try again.

They should not receive:

401 Unauthorized

or raw technical details.

Test the API response

A successful HTTP request does not necessarily mean the response contains usable data.

For example, an API may return:

{
  "status": "success"
}

while your flow expects:

{
  "order_status": "shipped"
}

The request succeeded.

Your mapping is still wrong.

See How to Use API Response Data in ZazzyAgent.

Test response mapping

If you map API data into custom fields, verify that the correct values are stored.

For example:

API response
     ↓
order_status
     ↓
Order Status

Then use that field in the next step.

If the field is empty, inspect the response structure and mapping rather than rebuilding the entire flow.

Test the complete flow

After the API itself works, test the actual customer journey.

For example:

Customer
   ↓
User Input
   ↓
Save Order Number
   ↓
HTTP API
   ↓
Response
   ↓
Response Mapping
   ↓
Condition
   ↓
Customer Reply

This catches problems that API verification alone cannot detect.

Test both success and failure paths

A production-ready API automation should have at least:

API Call
   ↓
Successful?
  ↙       ↘
Yes       No
 ↓         ↓
Continue  Fallback

The fallback could:

  • Ask the customer to try again

  • Request corrected information

  • Explain that the service is temporarily unavailable

  • Transfer the conversation to a human

Test unusual customer input

Real users will not always provide clean values.

Test:

  • Extra spaces

  • Wrong capitalization

  • Long text

  • Invalid IDs

  • Missing values

  • Multiple languages

  • Special characters

This is especially important when customer input becomes an API parameter.

Check error logs when necessary

If the API works during verification but fails inside the live flow, inspect the relevant error information.

Start from the exact point where the process breaks:

Flow started?
      ↓
Input saved?
      ↓
API called?
      ↓
Request correct?
      ↓
API responded?
      ↓
Response correct?
      ↓
Mapping worked?
      ↓
Next node executed?

This is much faster than randomly changing settings.

See How to Check Bot Error Logs in ZazzyAgent.

A proper pre-launch checklist

Before publishing an API-powered flow, verify:

Request

  • Correct endpoint

  • Correct method

  • Correct headers

  • Correct parameters

  • Correct request body

Security

  • Credentials are protected

  • Secrets are not shown to customers

Response

  • Expected response received

  • Correct fields mapped

  • Missing values handled

Flow

  • Success branch works

  • Failure branch works

  • Invalid input works

  • Customer receives a useful message

Test the live scenario

Once everything works in configuration, perform an end-to-end test exactly like a customer would.

For example:

Customer:
Where is my order?

Bot:
What is your order number?

Customer:
12345

Bot:
[API request]

Bot:
Your order is out for delivery.

You are testing the entire chain, not just the API.

The difference between verification and testing

These are related but not identical.

Verification

Checks whether the configured API request can be validated.

Flow testing

Checks whether the API behaves correctly when used inside the actual automation.

You should do both.

Best practice

Don't wait until customers report an API problem.

Test:

Happy path
+
Invalid input
+
Missing input
+
API failure
+
Empty response
+
Mapping failure

That gives your automation a much better chance of behaving correctly in real conversations.

For the broader API architecture, see HTTP API in ZazzyAgent: Complete Guide to External API Automation.

The key idea

A verified API is not necessarily a finished automation.

Test the request, the response, the mapping, and the complete customer journey before relying on it in production.