---
title: "Custom integration API"
description: "Connect any external system to your AI agent with the custom integration REST API and outbound webhooks."
---

# Custom integration API

> Connect any external system to your AI agent with the custom integration REST API and outbound webhooks.

## Overview

The custom integration connects any external system to your AI agent through standard REST APIs and webhooks. Unlike platform-specific integrations (WhatsApp, Slack, etc.), this integration gives you full control over how messages flow between your system and Moveo.

This integration enables:

- **Bidirectional communication** via HTTP: send messages through the REST API, receive responses through webhooks.
- **Session management**: create, read, update, and close sessions programmatically.
- **Conversation tagging**: add and remove tags on a live session for routing and reporting.
- **File handling**: upload and download files through presigned URLs.
- **Conversation control**: hand over to human agents, and close and reopen conversations.
- **Security**: API key authentication, IP allowlisting, and HMAC-SHA256 webhook signature verification.
- **Event filtering**: subscribe only to the webhook events you need.

---

## Prerequisites

Before setting up the custom integration, ensure you have:

✅ **Moveo account setup**

- An active [AI agent](/docs/ai-agents/overview) configured.
- An [environment](/docs/environments/environments-overview) selected for the integration.

✅ **Technical requirements**

- An HTTPS endpoint to receive webhook events.
- A server or application capable of making HTTP requests.
- Ability to verify HMAC-SHA256 signatures (recommended).

---

## How it works

The custom integration operates through two communication channels:

1. **Your system sends a request** to the Moveo custom integration API to create a session.
2. **Your system sends user messages** through the API to the session.
3. **Moveo processes the message** through your AI agent.
4. **Moveo delivers the response** to your webhook endpoint as an HTTP POST.
5. **Your system verifies the signature** and processes the response.
6. **Session lifecycle continues**: you can read and update context, tag the conversation, hand over to agents, close conversations, or close the session through the API.

Inbound calls are acknowledged, not answered: sending a user message returns `202 Accepted` with a `request_id`, and the AI agent's reply arrives later on your webhook. Match the two using `request_id`.

```
Your System                         Moveo
    │                                 │
    │── POST /sessions ──────────────>│  Create session
    │<── 201 { session_id } ──────────│
    │                                 │
    │── POST /sessions/:id/messages ─>│  Send user message
    │<── 202 Accepted ────────────────│
    │                                 │
    │                                 │── AI Agent processes
    │                                 │
    │<── POST webhook (brain_send) ───│  Bot response delivered
    │── 200 OK ──────────────────────>│
    │                                 │
```

---

## Next steps

- [Setup guide](https://docs.moveo.ai/api/custom-integration/custom-integration-setup.md): create and configure a custom integration.
- [API reference](https://docs.moveo.ai/api/custom-integration/custom-integration-inbound-overview.md): endpoints reference for sessions, messages, conversations, and files.
- [Outbound webhooks](https://docs.moveo.ai/api/custom-integration/custom-integration-outbound-webhooks.md): receive bot responses and events.
- [Complete example](https://docs.moveo.ai/api/custom-integration/custom-integration-example.md): end-to-end integration walkthrough.
