Macha

Building Custom API Tools for AI Agents: A Practical Guide

Macha Team

Written by

Macha Team

Last edited May 11, 2026

Zendesk Expert Reviewed

Verified

Your AI agent can read Zendesk tickets and search your knowledge base. But what about your order management system? Your shipping provider's tracking API? Your internal CRM? Custom API tools let you connect any REST endpoint to your AI agent — so it can look up orders, check inventory, verify payments, or call any service your business runs on.

Building Custom API Tools for AI Agents: A Practical Guide

What is a custom API tool?

A custom API tool is a configured HTTP endpoint that your AI agent can call during a conversation. You define the URL (with parameter placeholders), the HTTP method, authentication, and a description that tells the AI when to use it. The agent calls the tool, gets the response, and uses the data in its reply.

No code required. You're essentially teaching the agent: "when you need shipping status, call this URL with the order number, and here's what the response means."

Anatomy of a custom tool

Every custom tool has:

  • Name and description — the AI reads this to decide when to call the tool. Be specific: "Look up the shipping status of a your shop order by order number" is better than "Get order status".
  • Method + URL — e.g., GET https://api.yourshop.com/orders/{{order_number}}/status. Parameters in double curly braces are replaced at runtime.
  • Parameters — each placeholder gets a name, type, description, and required flag. The AI fills these from the conversation context.
  • Authentication — none, API key, bearer token, or basic auth. Credentials are encrypted and never exposed.

Example: shipping status lookup

A real-world example — connecting a shipping-status endpoint:

  • Method: GET
  • URL: https://www.example.com/api/order/{{order_number}}/shipping-status
  • Auth: None (public tracking endpoint)
  • Parameter: order_number (string, required) — "The 12-digit order number including leading zeros"

When the agent needs to check an order's status, it extracts the order number from the ticket (or custom field), calls this URL, and gets back the carrier, tracking events, and delivery date. It then formats a customer-friendly response.

Best practices

  • Write descriptive tool labels. Include the service name and resource: "your shop: Get Order Shipping Status" not "Get Status". The AI uses the label to decide which tool to call when multiple are available.
  • Keep parameter descriptions clear. Tell the AI the format: "12-digit number starting with 01, preserve leading zeros." The AI is surprisingly good at following format instructions.
  • Test before attaching to agents. Use the built-in test endpoint to verify the URL, auth, and response shape before adding the tool to a production agent.
  • Use response mapping. If the API returns a deeply nested response, set the response-mapping field (e.g., order) to strip the outer wrapper. The AI sees cleaner data and makes better decisions.

Combining custom tools with Zendesk

The power of custom tools is in combination. A WISMO agent might use:

  1. Get Ticket (Zendesk) — read the customer's message
  2. Get Custom Fields (Zendesk) — extract the order number from a Zendesk field
  3. Get Shipping Status (custom tool) — call the shop's API with the order number
  4. Add Internal Note (Zendesk) — post the drafted response for human review

Four tools, one agent, fully automated. The custom tool bridges the gap between your support platform and your business systems.

Zendesk
5.0 on Zendesk Marketplace

Loved by support teams worldwide

See what support teams are saying about Macha AI.

The application seems excellent to me! We are still testing, and we need support for some details and they were extremely efficient too!

Daniela Costa

Daniela Costa

Head of Support, Seabra

Macha has been a great addition to our support toolkit. It generates clear, well-organized responses that fit naturally into our workflow. One feature we particularly appreciate is its ability to automatically reply in the same language as the ticket.

Marius F

Marius F

Support Head, Zentana

We've been using Macha for a little while now and it's been really great addition so far! It's powerful, convenient, and makes getting work done a lot easier for our agents.

Alexander Wedén

Alexander Wedén

Head of Support

Support team is very helpful and responsive. Really enjoy how lightweight this is within Zendesk itself vs other more intrusive tools.

Cathleen Wright

Cathleen Wright

Zendesk Admin, Cortex IO

So far it's pretty good! Our queries are a little nuanced, so we can't always use it, but it's got enough utility for us. It can even incorporate our bilingual country with greetings in a second language.

Jae Oliver

Jae Oliver

Head of Support, Wise

Really enjoying using Macha, it has made a noticeable difference to our support team in a short amount of time. I really like the ticket summary feature, saves us a lot of time.

Harry Jackson

Harry Jackson

Head of Support, Crumb

Macha AI is a great addition to my workspace! It's powerful, convenient, and it really makes productivity so much easier for our agents!

Dave G

Dave G

Head of Support, Cyber Power Systems

Very impressed! AI integration for Zendesk has certainly come a long way and Macha seems to set the standard for now. This will for sure save lot of time in our support team.

Pauli Juel

Pauli Juel

Head of CS, Dokument24

Macha has been working great for us so far! The auto-responses are accurate and our resolution time has dropped significantly.

Lana T

Lana T

Zendesk Admin, Swotzy

Macha AI is a great addition. The knowledge base feature means our agents always have the right answers at their fingertips.

Mischa Wolf

Mischa Wolf

Head of Support, Topi

We're enjoying this integration so far. It's made our support team more efficient and our customers get faster responses.

Paula G

Paula G

Head of Customer Support, Xly Studio

The team enjoys using it. It saves considerable time on common questions and the integration options are excellent.

Kilian Leister

Kilian Leister

Support Head, Didriksons

Ready to supercharge your team with AI?

Get started in minutes. Connect your tools, configure your agents, and let AI handle the rest.