# CueDM developer docs

> CueDM sends a private Instagram DM to everyone who comments a keyword on a post or reel, through Meta's official Instagram API. These docs cover connecting to it from code and from AI agents: a hosted MCP server, a REST API, and webhooks.

Three ways in, by who is connecting:

- An AI app (Claude, ChatGPT, Cursor, Claude Code): the remote MCP server at https://cuedm.com/api/mcp, Streamable HTTP, signed in with OAuth 2.1. No key to paste. Tools: list_accounts, list_recent_posts, list_automations, get_automation, get_automation_results, list_knowledge, create_comment_automation, update_automation, delete_automation, duplicate_automation, get_automation_activity, list_automation_templates, set_automation_active, update_knowledge, remove_knowledge, list_conversations, get_conversation, draft_reply, send_reply, update_conversation, search_contacts, update_contact, tag_contacts, enroll_prospects, list_prospects, remove_prospects, create_campaign, update_campaign, list_campaigns, list_drafts, approve_draft, reject_draft, list_events, list_publishing_accounts, list_posts, get_post, create_post_draft, update_post, schedule_post, delete_post, review_post, get_best_times, list_hashtag_groups, save_hashtag_group, delete_hashtag_group, get_post_results, list_post_templates, save_post_template, delete_post_template, set_brand_voice, list_media, add_media_from_url, list_broadcasts, get_broadcast_audience, send_broadcast, cancel_broadcast, get_bio_page, update_bio_page, list_agents, update_agent, get_usage, add_knowledge.
- Your own code: the REST API at https://cuedm.com/api/v1 with a workspace API key (Studio plan) as `Authorization: Bearer cuedm_…`. The OpenAPI document at https://cuedm.com/api/v1/openapi.json lists every endpoint and field.
- No-code tools and servers: webhooks, signed with HMAC-SHA256. Events: dm.sent, dm.failed, link.clicked, contact.created, contact.email_captured, bio.subscribed, bio.unsubscribed, message.received, conversation.needs_reply, ai.draft_created, comment.received, post.published, post.failed, broadcast.finished, prospect.opener_sent, prospect.replied, prospect.window_closing, campaign.goal_reached.

Conventions: JSON everywhere; a success is the resource itself; an error is `{ "error": { "code", "message", "hint"?, "issues"? } }` with a matching status; POST and PATCH take an `Idempotency-Key` header; times are ISO 8601 UTC.

OAuth discovery for MCP clients: https://cuedm.com/.well-known/oauth-protected-resource and https://cuedm.com/.well-known/oauth-authorization-server. Clients may identify themselves with a client ID metadata document URL or register dynamically.

Every docs page has a "Copy page" button that copies it as Markdown.

## Get started

- [Overview](https://cuedm.com/docs): What the CueDM API and webhooks do, what they cost, and a first request in five minutes.
- [Authentication](https://cuedm.com/docs/authentication): Create a workspace API key, send it as a bearer token, and handle rate limits and errors.

## AI agents

- [Connect an AI agent](https://cuedm.com/docs/ai-agents): Let Claude, ChatGPT, Cursor or Claude Code set up and check automations through CueDM's MCP server, signed in with your account.

## Webhooks

- [Receiving webhooks](https://cuedm.com/docs/webhooks): Add an endpoint, verify the signature on every request, and understand retries and delivery.
- [Event reference](https://cuedm.com/docs/events): Every event CueDM sends, when it fires, and the exact payload your endpoint receives.

## API

- [API reference](https://cuedm.com/docs/reference): Every endpoint under /api/v1: the workspace, accounts and posts, automations, the knowledge base, webhook subscriptions and sample payloads.

## Guides

- [Zapier and Make](https://cuedm.com/docs/zapier-and-make): Send DMs, clicks and new emails to Google Sheets, your email list or Slack without writing code.

## Machine-readable

- [OpenAPI 3.1 document](https://cuedm.com/api/v1/openapi.json): every REST endpoint, parameter and response
- [Interactive API reference](https://cuedm.com/api/v1/docs): the same, with a request builder
- [Product overview for AI](https://cuedm.com/llms.txt): what CueDM is, plans and pricing

## Optional

- Support: support@cuedm.com
