Open Context Protocol is live! 🚀 Read the launch post
postWebhookEndpoints

postWebhookEndpoints

Create a webhook endpoint

Details

  • Method: POST
  • Path: /v1/webhook_endpoints
  • Operation ID: PostWebhookEndpoints

Parameters

{}

Response Schema

{
  "description": "You can configure [webhook endpoints](https://docs.stripe.com/webhooks/) via the API to be\nnotified about events that happen in your Stripe account or connected\naccounts.\n\nMost users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints.\n\nRelated guide: [Setting up webhooks](https://docs.stripe.com/webhooks/configure)",
  "properties": {
    "api_version": {
      "description": "The API version events are rendered as for this webhook endpoint.",
      "maxLength": 5000,
      "nullable": true,
      "type": "string"
    },
    "application": {
      "description": "The ID of the associated Connect application.",
      "maxLength": 5000,
      "nullable": true,
      "type": "string"
    },
    "created": {
      "description": "Time at which the object was created. Measured in seconds since the Unix epoch.",
      "format": "unix-time",
      "type": "integer"
    },
    "description": {
      "description": "An optional description of what the webhook is used for.",
      "maxLength": 5000,
      "nullable": true,
      "type": "string"
    },
    "enabled_events": {
      "description": "The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection.",
      "items": {
        "maxLength": 5000,
        "type": "string"
      },
      "type": "array"
    },
    "id": {
      "description": "Unique identifier for the object.",
      "maxLength": 5000,
      "type": "string"
    },
    "livemode": {
      "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.",
      "type": "boolean"
    },
    "metadata": {
      "additionalProperties": {
        "maxLength": 500,
        "type": "string"
      },
      "description": "Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.",
      "type": "object"
    },
    "object": {
      "description": "String representing the object's type. Objects of the same type share the same value.",
      "enum": [
        "webhook_endpoint"
      ],
      "type": "string"
    },
    "secret": {
      "description": "The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation.",
      "maxLength": 5000,
      "type": "string"
    },
    "status": {
      "description": "The status of the webhook. It can be `enabled` or `disabled`.",
      "maxLength": 5000,
      "type": "string"
    },
    "url": {
      "description": "The URL of the webhook endpoint.",
      "maxLength": 5000,
      "type": "string"
    }
  },
  "required": [
    "created",
    "enabled_events",
    "id",
    "livemode",
    "metadata",
    "object",
    "status",
    "url"
  ],
  "title": "NotificationWebhookEndpoint",
  "type": "object",
  "x-expandableFields": [],
  "x-resourceId": "webhook_endpoint"
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('stripe')

# Call this tool
result = await agent.call_tool('postWebhookEndpoints', {
    # Add required parameters here
})