Developer API
Instagram Automation API —
Build Custom Integrations with Zaprep
Manage Instagram automations, fetch collected leads, and connect AI assistants programmatically. REST API plus a hosted MCP server with OAuth 2.0 — all built on the official Meta Graph API.
Free plan available · No credit card required · API access on all plans
Built with security & compliance in mind
Two Ways to Integrate: REST API + MCP Server
Whether you are building a custom dashboard, automating campaign setup, or connecting an AI assistant, Zaprep has a first-class integration path.
Programmatic Control
Generate API keys from your dashboard and use standard HTTP requests to manage accounts, automations, and contacts. Works with any language, any platform.
- Authorization: Bearer zap_... header
- JSON request and response format
- Generate multiple keys per workspace
- Keys SHA-256 hashed at rest
AI Assistant Integration
Connect Claude or any MCP-compatible AI assistant directly to Zaprep. The hosted MCP server handles OAuth — no manual token management required.
- Server URL: zaprep.com/api/mcp
- RFC 8414 discovery metadata
- Tools: list, create, toggle, delete automations
- No API key needed in AI context
What You Can Do with the Zaprep API
The API covers the full automation lifecycle — from connecting accounts to exporting leads — so you can build exactly the integration your workflow needs.
Programmatic Automation Management
Create, update, toggle, and delete Instagram automation rules via REST — no need to log into the dashboard. Integrate Zaprep into your own admin panels, internal tools, or CI/CD workflows.
MCP Server for AI Assistants
Connect Claude, GPT-powered tools, or any MCP-compatible AI assistant. The hosted MCP server at /api/mcp uses OAuth 2.0 + PKCE — no copy-pasting tokens, no manual credential management.
Official Meta Graph API Under the Hood
Every automation Zaprep executes — whether triggered from the dashboard or the API — flows through the official Meta Graph API. No scraping. No browser bots. Full compliance with Instagram's platform policies.
API Keys with Workspace Scoping
Generate multiple API keys from Settings → API Keys. Each key is scoped to your workspace and supports all accounts in it. Keys are SHA-256 hashed at rest and shown only once at creation time.
Team Access Built In
API keys belong to the workspace owner, but admin team members can also generate keys. Every API call resolves to the correct workspace regardless of which member created the key.
Contact Export and Lead Data
Pull your collected Instagram contacts — emails captured via DM flows, commenter usernames, and conversation metadata — directly via the API. Feed them into your CRM, email platform, or data warehouse.
API Endpoint Reference
Base URL: https://www.zaprep.com. All endpoints require Authorization: Bearer zap_... header.
/api/instagram/accountsList connected Instagram Business accounts in your workspace
/api/automationsList all automation rules for your workspace
/api/automationsCreate a new automation rule (comment, DM, or story reply)
/api/automations/:idUpdate or toggle an existing automation rule
/api/automations/:idDelete an automation rule permanently
/api/contactsFetch collected contacts (emails + IG usernames) with optional filters
/api/mcpMCP server endpoint — connect AI assistants via OAuth 2.0 + PKCE
Full request/response schemas are documented in the developer dashboard after signup.
How to Integrate the Zaprep API in 6 Steps
From generating your first API key to syncing contacts into your CRM — a complete walkthrough for developers.
Generate an API Key
Log into your Zaprep dashboard. Navigate to Settings → API Keys. Click "Generate new key", give it a name (e.g., "Zapier integration" or "Internal CRM"), and copy the key immediately — it is only shown once.
Authenticate Your Requests
Add the Authorization: Bearer zap_your_key_here header to every API request. The key prefix "zap_" identifies it as an API key (versus an OAuth token). The API accepts both JSON and returns JSON.
List Your Instagram Accounts
Call GET /api/instagram/accounts to retrieve all connected Instagram Business accounts in your workspace. Each account object includes the igAccountId, display name, and follower count — use the accountId field for subsequent automation calls.
Manage Automations Programmatically
Use GET /api/automations to list all rules, POST /api/automations to create a new rule (specify trigger type, keyword, account, and action payload), PATCH /api/automations/:id to update, and DELETE /api/automations/:id to remove. Toggle active/inactive with PATCH and the "active" boolean field.
Fetch Collected Contacts
Call GET /api/contacts to retrieve emails and Instagram usernames collected via your DM email-capture flows. Filter by accountId or date range. Use this endpoint to sync leads into Mailchimp, Klaviyo, a CRM, or a custom database.
(Optional) Connect via MCP for AI Workflows
In Claude.ai → Settings → Integrations, enter https://www.zaprep.com/api/mcp. Complete the OAuth flow. Now Claude can create automations, list accounts, and manage rules via natural language — no API key needed in the AI context.
Quick Start: Your First API Call
List your connected Instagram accounts in under 60 seconds.
cURL
curl https://www.zaprep.com/api/instagram/accounts \ -H "Authorization: Bearer zap_YOUR_API_KEY"
JavaScript (fetch)
const res = await fetch(
'https://www.zaprep.com/api/instagram/accounts',
{
headers: {
'Authorization': 'Bearer zap_YOUR_API_KEY'
}
}
)
const { accounts } = await res.json()Example Response
{
"accounts": [
{
"id": "acct_01hx...",
"igAccountId": "17841455374652642",
"username": "yourinstagram",
"followerCount": 12450,
"connectedAt": "2025-03-12T10:00:00Z"
}
]
}MCP Connection: Instead of an API key, point your AI assistant at https://www.zaprep.com/api/mcp and complete the OAuth flow. The MCP server exposes list_accounts, list_automations, create_automation, toggle_automation, and delete_automation as callable tools.
Real-World API Integration Examples
How developers, agencies, and product teams are using the Zaprep API in production workflows.
Agency Dashboard Integration
Problem
You manage Instagram for 20 clients and need a unified view across all their automation rules, send volumes, and collected leads.
Solution
Use the Zaprep REST API to pull rule status, message counts, and contact data for each client account into your internal agency dashboard. Create and update automations for clients directly from your tool — no need to log into Zaprep for each account.
AI-Powered Campaign Creation
Problem
Your team uses Claude or another AI assistant to plan Instagram campaigns. You want the AI to create the automation rules, not just draft copy.
Solution
Connect Zaprep to Claude via the MCP server. When your team asks Claude to "set up a keyword automation for our new product launch on post 12345", Claude calls the Zaprep MCP tool directly — the automation is live in seconds.
Webhook + CRM Pipeline
Problem
Every time a user completes your DM email-capture flow, you need to add them to Klaviyo and tag them in your CRM automatically.
Solution
Poll GET /api/contacts on a schedule (or use a serverless function triggered by your own webhook) to pull new contacts. Push them into Klaviyo via their API and upsert into your CRM. The Zaprep contacts endpoint returns igUserId, email, and collection timestamp for clean deduplication.
Giveaway Automation at Scale
Problem
You run weekly giveaways on Instagram. Each giveaway needs a fresh automation rule created on Monday and disabled on Friday.
Solution
Schedule a script that calls POST /api/automations every Monday with the new post ID and keyword, and PATCH /api/automations/:id with "active: false" every Friday. No manual dashboard clicks. Full audit log of every rule change.
Security, Compliance, and Meta Policy
Every API call you make through Zaprep is built on the foundation of the official Meta Graph API — not scraping, not browser automation.
Official Meta Graph API
All Instagram messages, comments, and account data flow through graph.instagram.com — the same infrastructure Meta provides to approved Business API partners.
Encrypted Token Storage
Instagram access tokens are stored AES-256-GCM encrypted at rest. API keys are SHA-256 hashed. Raw values are never stored in the database after creation.
PKCE OAuth for MCP
The MCP server implements RFC 7591 dynamic client registration and PKCE — the security model recommended for public clients like AI assistants that cannot store a client secret.
No Scraping. No Bots. No Risk.
Zaprep never uses Selenium, Puppeteer, unofficial API endpoints, or any form of browser automation to interact with Instagram. Every action — sending a DM, reading a comment, subscribing to webhooks — uses a Meta-approved Instagram Business Login token issued directly to your account. This means your Instagram account is not at risk of suspension from using Zaprep or its API. See how the automation engine works for full technical details.
Frequently Asked Questions
Common questions about the Zaprep REST API and MCP server.
Does Zaprep have a public REST API?
Yes. Zaprep exposes a REST API at https://www.zaprep.com/api. Generate an API key from your dashboard under Settings → API Keys. Authenticate every request with the Authorization: Bearer zap_... header. The API lets you list Instagram accounts, list automations, create or update rules, toggle them on/off, and fetch collected contacts.
What is the Zaprep MCP server?
Zaprep ships a Model Context Protocol (MCP) server at https://www.zaprep.com/api/mcp. It supports OAuth 2.0 + PKCE so AI assistants like Claude can connect directly without manual API keys. Once authorized, the MCP server exposes tools for listing accounts, managing automations, and creating rules in natural language.
Is the Zaprep API safe to use with Instagram?
Yes. Every API call Zaprep makes to Instagram uses the official Meta Graph API and Instagram Webhooks. There is no scraping, no browser automation, and no unofficial methods. Your account stays compliant with Meta's Platform Policy.
Can I use the API to build automations for multiple Instagram accounts?
Yes, on Starter and Pro plans. The Starter plan supports 2 connected Instagram accounts; Pro supports 5. The API and MCP server both operate in the context of your workspace, so all connected accounts are accessible through the same API key.
How do I connect Zaprep to Claude or another AI assistant via MCP?
In Claude.ai, go to Settings → Integrations and enter https://www.zaprep.com/api/mcp as the MCP server URL. Claude will redirect you through the OAuth consent flow — no manual API key needed. After authorizing, Claude can list, create, and manage your Instagram automations using natural language.
API Access Included on Every Plan
You do not need a special developer plan. REST API and MCP server access are available on Free, Starter, and Pro.
Starter
$19/mo
- 2 Instagram accounts
- 2,000 messages/month
- Unlimited automation rules
- REST API + MCP access
Pro
$49/mo
- 5 Instagram accounts
- 10,000 messages/month
- Follow gate automation
- REST API + MCP access
All plans include a 7-day free trial. No credit card required to start. Full pricing details.
Explore More Zaprep Features
Ready to Build with the Zaprep API?
Sign up for free, generate your API key, and start automating Instagram programmatically in minutes. No credit card required.