Skip to main content

Overview

The Magpipe API allows you to programmatically manage agents, phone numbers, and communications.
This API is currently in beta phase, so there may be changes to endpoints and data structure. We appreciate your understanding and patience as we work to improve the API.

Base URL

All API requests are made to:
https://api.magpipe.ai/functions/v1

Authentication

All API requests require a Bearer token in the Authorization header. You can use either an API key (recommended) or a session token.
curl -X GET "https://api.magpipe.ai/functions/v1/your-endpoint" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
Generate API keys from Settings → API in the dashboard. Keys use the mgp_ prefix and never expire until revoked. See Authentication for full details.

Response Format

All responses are JSON:
{
  "data": { ... },
  "error": null
}
Or on error:
{
  "data": null,
  "error": {
    "message": "Error description",
    "code": "ERROR_CODE"
  }
}

HTTP Status Codes

CodeDescription
200Success
201Created
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing token
404Not Found
429Rate Limited
500Server Error

Rate Limiting

API requests are rate limited to:
  • 100 requests per minute per user
  • 1000 requests per hour per user
Rate limit headers are included in responses:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1234567890

Available Endpoints

Agents

Create and manage AI agents

Calls

Initiate and manage phone calls

Messages

Send and retrieve SMS messages

Phone Numbers

Search and provision phone numbers

Chat Widget

Embed chat widgets on your website

Knowledge Base

Add knowledge sources for RAG

Voice

Clone voices using ElevenLabs

Calendar

Cal.com integration for scheduling

Contacts

Manage your contact directory