CueDMDocs
API reference

API

API reference

Every endpoint under /api/v1: the workspace, webhook subscriptions and sample payloads.

Basics

All endpoints are under https://cuedm.com/api/v1, take and return JSON, and need a workspace API key. Everything a key can see or change belongs to that key's workspace.

POST /hooksWebhooks
Subscribe a URL to events.
DELETE /hooks/:idWebhooks
Unsubscribe.
GET /events/:event/sampleEvents
Recent payloads for one event.

What the API covers today

The API reads the workspace and manages webhook subscriptions. That's what Zapier, Make and most integrations need. Automations, contacts and messages aren't available through the API yet. If you need them, email support@cuedm.com and tell us what you're building.

Get the workspace

GET/api/v1/me

Returns the workspace the key belongs to and its connected Instagram accounts. Use it to check that a key works and to label the connection with the workspace's name.

cURL
curl https://cuedm.com/api/v1/me \
  -H "Authorization: Bearer $CUEDM_API_KEY"
Response
{
  "success": true,
  "data": {
    "workspace": {
      "id": "cmfz8o3gq0000l50gk3ah2d9e",
      "name": "Your Brand",
      "plan": "STUDIO"
    },
    "accounts": [
      {
        "id": "cmfz8p1aa0002l50g3n7c5k2x",
        "username": "yourbrand"
      }
    ]
  }
}
workspace.idstring
The same ID as workspaceId in webhook payloads.
workspace.namestring
The workspace's name.
workspace.planstring
FREE, CREATOR or STUDIO.
accounts[].idstring
The Instagram account in CueDM, as in account.id in events.
accounts[].usernamestring
Its Instagram handle. Only connected accounts are listed.

List webhooks

GET/api/v1/hooks

Every webhook in the workspace, oldest first. This includes webhooks added in Settings. Signing secrets are never returned here.

cURL
curl https://cuedm.com/api/v1/hooks \
  -H "Authorization: Bearer $CUEDM_API_KEY"
Response
{
  "success": true,
  "data": [
    {
      "id": "cmg51b2c90003l50g6q0v1d3z",
      "url": "https://example.com/webhooks/cuedm",
      "events": [
        "dm.sent",
        "contact.email_captured"
      ],
      "enabled": true,
      "description": "example.com",
      "createdAt": "2026-09-29T10:00:00.000Z"
    }
  ]
}

Create a webhook

POST/api/v1/hooks

Subscribes a URL to one or more events. The webhook appears in Settings like any other and is signed the same way. This is the REST hook “subscribe” call that Zapier and Make use.

Body

urlstringrequired
A public https:// URL, up to 2,048 characters.
eventsstring[]
The events to send. Send events, event or both; at least one is required.
eventstring
One event, for callers that subscribe to a single event.
descriptionstring
A label for Settings, up to 120 characters. Defaults to “Zapier”, “Make” or the URL's host.

Events: dm.sent, dm.failed, link.clicked, contact.created, contact.email_captured, bio.subscribed, bio.unsubscribed.

curl https://cuedm.com/api/v1/hooks \
  -H "Authorization: Bearer $CUEDM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/webhooks/cuedm", "events": ["dm.sent", "contact.email_captured"]}'

Answers 201 Created with the webhook and its signing secret. This is the only time the secret is returned, so store it now.

201 Created
{
  "success": true,
  "data": {
    "id": "cmg51b2c90003l50g6q0v1d3z",
    "url": "https://example.com/webhooks/cuedm",
    "events": [
      "dm.sent",
      "contact.email_captured"
    ],
    "enabled": true,
    "description": "example.com",
    "createdAt": "2026-09-29T10:00:00.000Z",
    "secret": "whsec_…"
  }
}

A 400 means the URL or events were missing or invalid; the response lists the valid event names in events. It's also returned when the workspace already has 10 webhooks.

Delete a webhook

DELETE/api/v1/hooks/:id

Removes the webhook and stops its deliveries, including any retries still waiting. It answers 200 even if the webhook was already gone, so an unsubscribe can safely run twice.

cURL
curl -X DELETE https://cuedm.com/api/v1/hooks/cmg51b2c90003l50g6q0v1d3z \
  -H "Authorization: Bearer $CUEDM_API_KEY"
Response
{
  "success": true
}

Sample payloads

GET/api/v1/events/:event/sample

The last three payloads this workspace sent for an event, newest first, in the same shape a webhook receives. If the event has never fired, you get one example payload instead, so you can still map fields in a Zap or scenario. An unknown event answers 404.

cURL
curl https://cuedm.com/api/v1/events/contact.email_captured/sample \
  -H "Authorization: Bearer $CUEDM_API_KEY"
Response
{
  "success": true,
  "data": [
    {
      "id": "sample_contact_email_captured",
      "event": "contact.email_captured",
      "workspaceId": "cmfz8o3gq0000l50gk3ah2d9e",
      "occurredAt": "2026-09-21T10:02:00.000Z",
      "data": {
        "contact": {
          "id": "contact_sample",
          "igUserId": "1234567890",
          "username": "maya.fits",
          "email": "maya@example.com",
          "accountId": "acct_sample",
          "automationId": "auto_sample"
        }
      }
    }
  ]
}

Stuck, or something here is wrong? Email support@cuedm.com and a person will answer.