Webhooks

API Reference

The Webhook API provides endpoints for creating, retrieving, updating, and deleting webhooks. This page covers all available operations with examples.

Base URL

https://mgmtapi.geins.io/API/Webhook

Authentication

All webhook endpoints require:

  • X-ApiKey header with your Management API key
  • Basic Auth (username:password)

Create a Webhook

Register a new webhook to listen for specific entity events.

Request

POST /API/Webhook

Request Body

FieldTypeRequiredDescription
EntitystringYesEntity type to monitor. See Entities and Actions
NamestringYesDescriptive name for the webhook
DescriptionstringNoDetailed purpose and functionality description
ActionsstringYesComma-separated list of actions (e.g., create,update,delete)
MethodstringYesHTTP method (typically POST or GET)
UrlstringYesTarget endpoint URL (supports placeholders)
BodystringNoRequest payload (supports placeholders)
HeadersstringNoAdditional HTTP headers (e.g., Content-Type: application/json)
RetrybooleanNoEnable automatic retries on failure (default: false)

cURL Example

curl -X POST "https://mgmtapi.geins.io/API/Webhook" \
     -H "Content-Type: application/json" \
     -H "X-ApiKey: {MGMT_API_KEY}" \
     -u "{MGMT_USERNAME}:{MGMT_PASSWORD}" \
     -d '{
           "Entity": "Order",
           "Name": "Order Notification",
           "Description": "Webhook for order updates",
           "Actions": "update,cancel",
           "Method": "POST",
           "Url": "https://yourwebhookendpoint.com/notifications/{{entity}}?action={{action}}",
           "Body": "{\"order_id\":\"{{id}}\"}",
           "Headers": "Content-Type: application/json",
           "Retry": true
         }'

Response

Success (200 OK):

{
    "Resource": "a062696f-26c8-49ed-8067-697378d60b75",
    "Message": "Success.",
    "Details": null
}

Get a Webhook

Retrieve details about a specific webhook using its unique ID.

Request

GET /API/Webhook/{webhookId}

Path Parameters

ParameterTypeRequiredDescription
webhookIdGUIDYesUnique identifier of the webhook

cURL Example

curl -X GET "https://mgmtapi.geins.io/API/Webhook/123e4567-e89b-12d3-a456-426614174000" \
     -H "Accept: application/json" \
     -H "X-ApiKey: {MGMT_API_KEY}" \
     -u "{MGMT_USERNAME}:{MGMT_PASSWORD}" \

Response

Success (200 OK):

{
    "Resource": {
        "Id": "123e4567-e89b-12d3-a456-426614174000",
        "Entity": "Order",
        "Name": "Order Notification",
        "Description": "Webhook for order updates",
        "Actions": "update,cancel",
        "Method": "POST",
        "Url": "https://yourwebhookendpoint.com/notifications/{{entity}}?action={{action}}",
        "Body": "{\"order_id\":\"{{id}}\"}",
        "Headers": "Content-Type: application/json",
        "Retry": true
    },
    "Message": "Success.",
    "Details": null
}

Update a Webhook

Modify an existing webhook's configuration.

Request

PUT /API/Webhook/{webhookId}

Path Parameters

ParameterTypeRequiredDescription
webhookIdGUIDYesUnique identifier of the webhook to update

Request Body

Same fields as Create a Webhook. All fields can be updated.

cURL Example

curl -X PUT "https://mgmtapi.geins.io/API/Webhook/123e4567-e89b-12d3-a456-426614174000" \
     -H "Content-Type: application/json" \
     -H "X-ApiKey: {MGMT_API_KEY}" \
     -u "{MGMT_USERNAME}:{MGMT_PASSWORD}" \ \
     -d '{
           "Entity": "Order",
           "Name": "Order Creation and Update Webhook",
           "Description": "Webhook for order creation and update events",
           "Actions": "create,update",
           "Method": "POST",
           "Url": "https://yourwebhookendpoint.com/{{entity}}/{{action}}/{{id}}",
           "Body": "{\"entity\":\"{{entity}}\",\"action\":\"{{action}}\",\"orderId\":\"{{id}}\"}",
           "Headers": "Content-Type: application/json",
           "Retry": true
         }'

Response

Success (200 OK):

{
    "Message": "Success.",
    "Details": null
}

Delete a Webhook

Remove a webhook from the system.

Request

DELETE /API/Webhook/{webhookId}

Path Parameters

ParameterTypeRequiredDescription
webhookIdGUIDYesUnique identifier of the webhook to delete

cURL Example

curl -X DELETE "https://mgmtapi.geins.io/API/Webhook/123e4567-e89b-12d3-a456-426614174000" \
     -H "X-ApiKey: {MGMT_API_KEY}" \
     -u "{MGMT_USERNAME}:{MGMT_PASSWORD}" \

Response

Success (200 OK):

{
    "Message": "Success.",
    "Details": null
}

List All Webhooks

Retrieve all registered webhooks for your account.

Request

GET /API/Webhook/List

Parameters

None. Returns all webhooks without filtering.

cURL Example

curl -X GET "https://mgmtapi.geins.io/API/Webhook/List" \
     -H "Accept: application/json" \
     -H "X-ApiKey: {MGMT_API_KEY}" \
     -u "{MGMT_USERNAME}:{MGMT_PASSWORD}" \

Response

Success (200 OK):

{
    "Resource": [
        {
            "Id": "123e4567-e89b-12d3-a456-426614174000",
            "Entity": "Order",
            "Name": "Order Notification",
            "Description": "Webhook for order updates",
            "Actions": "update,cancel",
            "Method": "POST",
            "Url": "https://yourwebhookendpoint.com/notifications/{{entity}}?action={{action}}",
            "Body": "{\"order_id\":\"{{id}}\"}",
            "Headers": "Content-Type: application/json",
            "Retry": true
        },
        {
            "Id": "987fcdeb-51a2-43f7-b829-123456789abc",
            "Entity": "Product",
            "Name": "Product Price Monitor",
            "Description": "Monitor product price changes",
            "Actions": "update",
            "Method": "POST",
            "Url": "https://analytics.example.com/product-changes",
            "Body": null,
            "Headers": "Content-Type: application/json",
            "Retry": false
        }
    ],
    "Message": "Success.",
    "Details": null
}

Error Handling

Common HTTP status codes returned by the Webhook API:

Status CodeDescriptionCommon Cause
200 OKRequest successfulGET, PUT operations succeeded
201 CreatedWebhook created successfullyPOST operation succeeded
204 No ContentWebhook deleted successfullyDELETE operation succeeded
400 Bad RequestInvalid requestUnsupported actions for entity, malformed JSON
401 UnauthorizedAuthentication failedMissing or invalid API key/credentials
404 Not FoundWebhook not foundInvalid webhook ID
500 Internal Server ErrorServer errorContact support