# API & Developers — Mihu AI

API & Developers

# Build with the Mihu AI Platform

RESTful APIs, SDKs, and webhooks to integrate AI voice and messaging agents into your applications. Ship faster with comprehensive docs and examples.

View Documentation (https://developers.mihu.ai) API Console (https://app.mihu.ai/)

99.9%

API Uptime

<100ms

Avg Response

50+

Endpoints

cURL Python Node.js

REST API

1 # Initiate an outbound call

2 curl --request POST \

3 --url https://demo.mihu.ai/api/v1/call \

4 --header 'Authorization: Bearer <token>' \

5 --header 'Content-Type: application/json' \

6 --data '{

7 "agentId" : "32d8fc98-be1e-4d32-..." ,

8 "participant" : {

9 "number" : "+1 (415) 555-0123" ,

10 "about" : "Customer John Doe"

11 }

12 }'

1 import requests

2

3 url = "https://demo.mihu.ai/api/v1/call"

4 headers = {

5 "Authorization" : "Bearer <token>" ,

6 "Content-Type" : "application/json"

7 }

8 data = {

9 "agentId" : "32d8fc98-be1e-4d32-..." ,

10 "participant" : { "number" : "+1 (415) 555-0123" }

11 }

12 response = requests. post (url, headers=headers, json=data)

1 const response = await fetch (

2 'https://demo.mihu.ai/api/v1/call' ,

3 {

4 method : 'POST' ,

5 headers : {

6 'Authorization' : 'Bearer <token>' ,

7 'Content-Type' : 'application/json'

8 },

9 body : JSON.stringify ({

10 agentId : '32d8fc98-be1e-4d32-...' ,

11 participant : { number : '+1 (415) 555-0123' }

12 })

13 }

14 );

201 Created

Copy

Quick Start

## Up and Running in Minutes

Get started with the Mihu AI API in three simple steps.

1

### Get Your API Token

Sign in to your dashboard and generate a private API token with optional expiration.

Authorization : Bearer <token>

2

### Set Base URL

All API requests are made to our secure endpoint with your bearer token.

https://demo.mihu.ai/api/v1

3

### Make Your First Call

Initiate an outbound call with your agent and start automating conversations.

POST /call { agentId, participant }

Authentication

## Secure API Access

Choose between API keys for server-to-server or OAuth 2.0 for user-delegated access.

### API Keys

Generate API keys to authenticate your requests. Create private tokens with optional expiration dates for secure access.

Add API Key

Name of the API Key

Set Expires Date

No Expire

Create Private Token

••••••••••••••••••••••••••••••••

••••••••••••••••••••••••••••••••

### OAuth 2.0

Industry-standard authorization for user-delegated access. Perfect for marketplace integrations.

1

#### Redirect to Authorization

Send users to Mihu's consent screen

GET /oauth/authorize?client_id=...

2

#### Receive Authorization Code

User grants permission, you get a code

?code=abc123&state=xyz

3

#### Exchange for Access Token

Trade the code for an access token

POST /oauth/token

API Reference

## Comprehensive Endpoint Documentation

Explore our RESTful API with detailed request/response examples for every endpoint.

API Reference

Call

POST /call

WhatsApp

POST /whatsapp/template

Appointments

GET /appointments

POST /appointments

Contacts

GET /contacts

POST /contacts

Tasks

GET /tasks

POST /tasks

Campaigns

GET /campaigns

Schedules

GET /schedules

Transcriptions

GET /transcriptions

POST /api/v1/call

### Initiate Outbound Call

Initiates an outbound call using a specified AI agent. The agent will call the participant number and follow the configured prompt instructions.

#### Request Parameters

Parameter

Type

Required

Description

agentId

string

Required

UUID of the AI agent to use for the call

participant.number

string

Required

Phone number to call (E.164 format)

participant.about

string

Optional

Context about the participant for the AI

prompt.content

string

Optional

Custom prompt to override agent's default

prompt.overwrite

boolean

Optional

Whether to overwrite default prompt

message.start

string

Optional

Opening message when call connects

#### Example Request

POST /api/v1/call

application/json

{ "agentId" : "32d8fc98-be1e-4d32-a12e-146f397fb1cb" , "prompt" : { "overwrite" : true , "content" : "You are Michael from the support team..." }, "participant" : { "number" : "+1 (415) 555-0123" , "about" : "Customer named John Doe. Order #12345." }, "message" : { "start" : "Hello! This is Michael from support." } }

#### Response

200 OK

application/json

{ "success" : true , "message" : "Operation completed successfully" , "data" : { "callId" : "call_abc123def456" , "status" : "initiated" } }

Webhooks

## Real-Time Event Notifications

Set up Webhooks to trigger actions on external services in real-time. Stay informed on updates and changes to ensure seamless integration.

Webhooks Configuration

Webhook URL

Secret Key

Event Type

Conversation Update

Conversation End Report

Conversation Status

Intent Call

Text Evaluation

Voice Evaluation

Save Changes

Current Webhook Configuration

URL: https://example.com/webhooks/mihu

Active Events: Conversation End Report, Text Evaluation, Voice Evaluation

Example Payload conversation.end_report

{ "event" : "conversation.end_report" , "timestamp" : "2024-01-15T14:32:18Z" , "data" : { "conversation_id" : "conv_abc123def456" , "agent_id" : "32d8fc98-be1e-4d32-a12e-146f397fb1cb" , "direction" : "outbound" , "participant" : { "number" : "+1 (415) 555-0123" , "name" : "John Doe" }, "duration_seconds" : 187 , "status" : "completed" , "transcript_url" : "https://..." , "recording_url" : "https://..." , "sentiment" : "positive" , "summary" : "Customer inquired about order status..." } }

## Ready to Start Building?

Get your API key and ship your first integration in minutes. Free tier includes 1,000 API calls per month.

Get API Key (https://app.mihu.ai/register) Read the Docs (https://developers.mihu.ai)
