{"openapi":"3.0.3","info":{"title":"Gnist Context — Webhook Subscriptions","description":"Manage webhook subscriptions for push-based data delivery — subscribe to entity changes, list subscriptions, and track delivery status.\n\n- **MCP endpoint:** `https://context.gnist.ai/mcp/webhooks/`\n- **Toolkit page:** `/toolkits/webhooks`\n- **Full API spec:** `/api/openapi.json`\n- **Get an API key:** `/signup`","version":"1.0.0","contact":{"name":"GnistAI","url":"https://gnist.ai"}},"servers":[{"url":"https://context.gnist.ai","description":"Production"}],"paths":{"/rest/webhooks/subscribe":{"post":{"tags":["Platform"],"summary":"subscribe","description":"Create a webhook subscription for data change notifications.\n\nWhen data matching the entity_type changes, a signed POST request\nwill be sent to the callback_url with the change payload.\n\nThe returned secret is used to verify webhook signatures (HMAC-SHA256).\nStore it securely — it is only shown once.\n\nArgs:\n    api_key: Your Gnist API key.\n    entity_type: The type of entity to monitor for changes.\n    callback_url: HTTPS endpoint to receive webhook deliveries.\n\nReturns:\n    Subscription details including id and signing secret, or error.","operationId":"webhooks_subscribe","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"api_key":{"description":"Your Gnist API key (starts with 'gnist_').","type":"string"},"entity_type":{"description":"Entity type to subscribe to (e.g. 'brreg_company', 'doffin_tender').","type":"string"},"callback_url":{"description":"HTTPS URL where webhook events will be delivered.","type":"string"}},"required":["api_key","entity_type","callback_url"],"type":"object"}}}}}},"/rest/webhooks/unsubscribe":{"post":{"tags":["Platform"],"summary":"unsubscribe","description":"Remove a webhook subscription (soft delete).\n\nThe subscription will stop receiving deliveries immediately.\n\nArgs:\n    api_key: Your Gnist API key.\n    subscription_id: The subscription UUID to deactivate.\n\nReturns:\n    Confirmation or error if subscription not found.","operationId":"webhooks_unsubscribe","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"api_key":{"description":"Your Gnist API key (starts with 'gnist_').","type":"string"},"subscription_id":{"description":"UUID of the subscription to remove.","type":"string"}},"required":["api_key","subscription_id"],"type":"object"}}}}}},"/rest/webhooks/list_subscriptions":{"post":{"tags":["Platform"],"summary":"list_subscriptions","description":"List all active webhook subscriptions for your API key.\n\nReturns subscriptions with their entity type, callback URL, and status.\n\nArgs:\n    api_key: Your Gnist API key.\n\nReturns:\n    List of active subscriptions.","operationId":"webhooks_list_subscriptions","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"api_key":{"description":"Your Gnist API key (starts with 'gnist_').","type":"string"}},"required":["api_key"],"type":"object"}}}}}},"/rest/webhooks/reset_subscription":{"post":{"tags":["Platform"],"summary":"reset_subscription","description":"Reset a subscription's circuit breaker.\n\nWhen a subscription has too many consecutive delivery failures,\nits circuit breaker opens and deliveries are paused. Use this\ntool to manually re-enable delivery.\n\nArgs:\n    api_key: Your Gnist API key.\n    subscription_id: The subscription UUID to reset.\n\nReturns:\n    Confirmation or error if subscription not found.","operationId":"webhooks_reset_subscription","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"api_key":{"description":"Your Gnist API key (starts with 'gnist_').","type":"string"},"subscription_id":{"description":"UUID of the subscription to reset.","type":"string"}},"required":["api_key","subscription_id"],"type":"object"}}}}}},"/rest/webhooks/list_deliveries":{"post":{"tags":["Platform"],"summary":"list_deliveries","description":"List recent webhook deliveries.\n\nShows delivery attempts with status (pending/delivered/failed),\nnumber of attempts, and HTTP response codes.\n\nArgs:\n    api_key: Your Gnist API key.\n    subscription_id: Optional filter to a specific subscription.\n    limit: Maximum deliveries to return (1-200, default 50).\n\nReturns:\n    List of recent deliveries.","operationId":"webhooks_list_deliveries","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"api_key":{"description":"Your Gnist API key (starts with 'gnist_').","type":"string"},"subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Filter to a specific subscription UUID. Omit for all subscriptions."},"limit":{"default":50,"description":"Maximum number of deliveries to return.","maximum":200,"minimum":1,"type":"integer"}},"required":["api_key"],"type":"object"}}}}}},"/rest/webhooks/get_webhook_metrics":{"post":{"tags":["Platform"],"summary":"get_webhook_metrics","description":"Get webhook delivery metrics.\n\nReturns aggregated delivery statistics per subscription: total deliveries,\nsuccess/failure/pending counts, and last delivery timestamp.\n\nArgs:\n    api_key: Your Gnist API key.\n    subscription_id: Optional filter to a specific subscription.\n    hours: Time window in hours (1-720, default 24).\n\nReturns:\n    Delivery metrics grouped by subscription.","operationId":"webhooks_get_webhook_metrics","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"api_key":{"description":"Your Gnist API key (starts with 'gnist_').","type":"string"},"subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Filter to a specific subscription UUID. Omit for all subscriptions."},"hours":{"default":24,"description":"Time window in hours (default 24, max 720).","maximum":720,"minimum":1,"type":"integer"}},"required":["api_key"],"type":"object"}}}}}},"/rest/webhooks/report_feedback":{"post":{"tags":["Platform"],"summary":"report_feedback","description":"Report a bug, feature request, or general feedback for this data source.\n\nUse this when something doesn't work as expected, when you'd like\na new feature, or when you have suggestions for improvement.\n\nArgs:\n    feedback: Describe the issue or suggestion.\n    feedback_type: One of 'bug', 'feature_request', or 'general'.","operationId":"webhooks_report_feedback","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"feedback":{"type":"string"},"feedback_type":{"default":"general","type":"string"}},"required":["feedback"],"type":"object"}}}}}}},"tags":[{"name":"Platform","description":"Data sources: Platform"}],"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"gnist-api-key","description":"API key passed via request header."},"ApiKeyQuery":{"type":"apiKey","in":"query","name":"gnist_api_key","description":"API key passed via query parameter."}}}}