Skip to main content
PATCH
/
v1
/
webhooks
/
{webhookId}
Node.js SDK
import Migma from 'migma';

const migma = new Migma('YOUR_API_KEY');

const { data, error } = await migma.webhooks.update('WEBHOOK_ID', {
  active: false
});
{
  "success": true,
  "data": {
    "success": true
  },
  "error": "<string>"
}

Authorizations

Authorization
string
header
required

API key authentication. Use 'Authorization: Bearer YOUR_API_KEY' where YOUR_API_KEY is obtained from the Migma dashboard under Settings → API Integration.

Path Parameters

webhookId
string
required

Webhook ID (MongoDB ObjectId)

Body

application/json
url
string<uri>

The webhook endpoint URL (must be HTTPS)

events
string[]

Array of event types to subscribe to

Minimum array length: 1
active
boolean

Whether the webhook is active

description
string

Optional description for the webhook

customHeaders
object

Optional custom headers to include in webhook requests

Response

Webhook updated

success
boolean
required
data
object
error
string | null