# List all webhooks Returns a paginated list of your webhooks. If no webhook endpoints are available, the resulting array will be empty. This request should never throw an error. > 🔑 Access with > > [Organization access token with **webhooks.read**](/reference/authentication) > > [OAuth access with **webhooks.read**](/reference/authentication) # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "Mollie Connect", "version": "1.0.0", "license": { "name": "Attribution-NonCommercial-ShareAlike 4.0 International", "identifier": "CC-BY-NC-SA-4.0" } }, "servers": [ { "url": "https://api.mollie.com" } ], "security": [ { "apiKey": [] }, { "organizationAccessToken": [] }, { "oAuth": [] } ], "paths": { "/v2/webhooks": { "get": { "summary": "List all webhooks", "x-speakeasy-name-override": "list", "tags": [ "Webhooks API" ], "operationId": "list-webhooks", "security": [ { "organizationAccessToken": [ "webhooks.read" ] }, { "oAuth": [ "webhooks.read" ] } ], "description": "Returns a paginated list of your webhooks. If no webhook endpoints are available, the resulting array will be empty. This request should never throw an error.\n\n> 🔑 Access with\n>\n> [Organization access token with **webhooks.read**](/reference/authentication)\n>\n> [OAuth access with **webhooks.read**](/reference/authentication)", "parameters": [ { "schema": { "type": "string", "example": "hook_B2EyhTH5N4KWUnoYPcgiH" }, "name": "from", "description": "Provide an ID to start the result set from the item with the given ID and onwards. This allows you to paginate the result set.", "in": "query" }, { "name": "limit", "description": "The maximum number of items to return. Defaults to 50 items.", "in": "query", "schema": { "type": [ "integer", "null" ], "minimum": 1, "maximum": 250, "default": 50, "example": 50 } }, { "name": "sort", "description": "Used for setting the direction of the result set. Defaults to descending order, meaning the results are ordered from newest to oldest.\n\nPossible values: `asc` `desc`", "in": "query", "schema": { "type": "string", "example": "desc" } }, { "name": "eventTypes", "description": "Used to filter out only the webhooks that are subscribed to certain types of events.\n\nPossible values: `payment-link.paid` `balance-transaction.created` `sales-invoice.created` `sales-invoice.issued` `sales-invoice.canceled` `sales-invoice.paid` `*`", "in": "query", "schema": { "type": "string", "description": "The list of events to enable for this webhook. You may specify `'*'` to add all events, except those that require explicit selection.\n\nPossible values: `payment-link.paid` `balance-transaction.created` `sales-invoice.created` `sales-invoice.issued` `sales-invoice.canceled` `sales-invoice.paid` `*`", "x-speakeasy-name-override": "webhook-event-types", "x-enumDescriptions": { "payment-link.paid": "Occurs when a payment link has been paid.", "balance-transaction.created": "Occurs when a balance transaction is created to add to your available balance. It currently only supports positive amounts and non-captured payments.", "sales-invoice.created": "Occurs when a sales invoice has been created.", "sales-invoice.issued": "Occurs when a sales invoice has been issued.", "sales-invoice.canceled": "Occurs when a sales invoice has been canceled.", "sales-invoice.paid": "Occurs when a sales invoice has been paid.", "*": "All event types." }, "example": "payment-link.paid" } }, { "name": "testmode", "description": "You can enable test mode by setting the `testmode` query parameter to `true`.\n\nTest entities cannot be retrieved when the endpoint is set to live mode, and vice versa.", "in": "query", "schema": { "type": "boolean", "example": false } } ], "responses": { "200": { "description": "A list of webhooks. For a complete reference of the webhook object, refer to the [Get hook endpoint](get-webhook) documentation.", "content": { "application/hal+json": { "schema": { "type": "object", "required": [ "count", "_embedded", "_links" ], "properties": { "count": { "type": "integer", "description": "The number of items in this result set. If more items are available, a `_links.next` URL will be present in the result as well.\n\nThe maximum number of items per result set is controlled by the `limit` property provided in the request. The default limit is 50 items.", "minimum": 1, "maximum": 250, "example": 5 }, "_embedded": { "type": "object", "required": [ "webhooks" ], "properties": { "webhooks": { "description": "A list of webhooks.", "type": "array", "items": { "type": "object", "required": [ "resource", "id", "url", "createdAt", "name", "eventTypes", "status", "mode", "profileId", "_links" ], "properties": { "resource": { "type": "string", "description": "Indicates the response contains a webhook subscription object. Will always contain the string `webhook` for this endpoint.", "readOnly": true, "example": "webhook" }, "id": { "type": "string", "description": "The identifier uniquely referring to this subscription.", "readOnly": true, "example": "hook_tNP6fpF9fLJpFWziRcgiH" }, "url": { "type": "string", "description": "The subscription's events destination.", "example": "https://example.com/webhook-endpoint" }, "profileId": { "type": [ "string", "null" ], "description": "The identifier uniquely referring to the profile that created the subscription.", "readOnly": true, "example": "pfl_YyoaNFjtHc" }, "createdAt": { "type": "string", "description": "The subscription's date time of creation.", "readOnly": true, "example": "2023-03-15T10:00:00+00:00" }, "name": { "type": "string", "description": "The subscription's name.", "example": "Profile Updates Webhook" }, "eventTypes": { "type": "array", "items": { "type": "string", "description": "The list of events to enable for this webhook. You may specify `'*'` to add all events, except those that require explicit selection.\n\nPossible values: `payment-link.paid` `balance-transaction.created` `sales-invoice.created` `sales-invoice.issued` `sales-invoice.canceled` `sales-invoice.paid` `*`", "x-speakeasy-name-override": "webhook-event-types", "x-enumDescriptions": { "payment-link.paid": "Occurs when a payment link has been paid.", "balance-transaction.created": "Occurs when a balance transaction is created to add to your available balance. It currently only supports positive amounts and non-captured payments.", "sales-invoice.created": "Occurs when a sales invoice has been created.", "sales-invoice.issued": "Occurs when a sales invoice has been issued.", "sales-invoice.canceled": "Occurs when a sales invoice has been canceled.", "sales-invoice.paid": "Occurs when a sales invoice has been paid.", "*": "All event types." }, "example": "payment-link.paid" }, "description": "The events types that are subscribed.", "example": [ "profile.create", "profile.blocked" ] }, "status": { "type": "string", "description": "The subscription's current status.\n\nPossible values: `enabled` `blocked` `disabled` `deleted`", "example": "enabled" }, "mode": { "type": "string", "description": "Whether this entity was created in live mode or in test mode.\n\nPossible values: `live` `test`", "readOnly": true, "example": "live" }, "_links": { "type": "object", "description": "An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.", "required": [ "self" ], "properties": { "self": { "type": "object", "description": "In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "description": "The actual URL string.", "example": "https://..." }, "type": { "type": "string", "description": "The content type of the page or endpoint the URL points to.", "example": "application/hal+json" } } } }, "readOnly": true } } } } } }, "_links": { "type": "object", "description": "Links to help navigate through the lists of items. Every URL object will contain an `href` and a `type` field.", "required": [ "self", "previous", "next", "documentation" ], "properties": { "self": { "description": "The URL to the current set of items.", "type": "object", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "description": "The actual URL string.", "example": "https://..." }, "type": { "type": "string", "description": "The content type of the page or endpoint the URL points to.", "example": "application/hal+json" } } }, "previous": { "description": "The previous set of items, if available.", "type": [ "object", "null" ], "properties": { "href": { "type": "string", "description": "The actual URL string.", "example": "https://..." }, "type": { "type": "string", "description": "The content type of the page or endpoint the URL points to.", "example": "application/hal+json" } } }, "next": { "description": "The next set of items, if available.", "type": [ "object", "null" ], "properties": { "href": { "type": "string", "description": "The actual URL string.", "example": "https://..." }, "type": { "type": "string", "description": "The content type of the page or endpoint the URL points to.", "example": "application/hal+json" } } }, "documentation": { "type": "object", "description": "In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "description": "The actual URL string.", "example": "https://..." }, "type": { "type": "string", "description": "The content type of the page or endpoint the URL points to.", "example": "application/hal+json" } } } } } } }, "examples": { "list-webhook-200": { "summary": "Get a list of webhooks.", "value": { "_embedded": { "webhooks": [ { "resource": "webhook", "id": "hook_yjtBMWDCGw5YFSPQ3HPzH", "url": "https://mollie.com", "profileId": "pfl_8XcSdLtrNK", "createdAt": "2024-12-06T10:09:56+00:00", "name": "Webhook #2", "eventTypes": [ "payment-link.paid", "sales-invoice.created" ], "status": "enabled", "mode": "live", "_links": { "self": { "href": "...", "type": "application/hal+json" }, "documentation": { "href": "https://docs.mollie.com/reference/get-webhook", "type": "text/html" } } }, { "resource": "webhook", "id": "hook_qHknfTxaDx6s8JNhuGPzH", "url": "https://mollie.com", "profileId": "pfl_8XcSdLtrNK", "createdAt": "2024-12-06T10:08:48+00:00", "name": "Webhook #1", "eventTypes": [ "payment-link.paid" ], "status": "blocked", "mode": "live", "_links": { "self": { "href": "...", "type": "application/hal+json" }, "documentation": { "href": "https://docs.mollie.com/reference/get-webhook", "type": "text/html" } } } ] }, "count": 2, "_links": { "documentation": { "href": "https://docs.mollie.com/reference/list-webhook", "type": "text/html" }, "self": { "href": "https://api.mollie.localhost/v2/webhooks?from=hook_yjtBMWDCGw5YFSPQ3HPzH&limit=2", "type": "application/hal+json" }, "previous": { "href": "https://api.mollie.localhost/v2/webhooks?from=hook_5foxphpBru4xNPCDJJPzH&limit=2", "type": "application/hal+json" }, "next": { "href": "https://api.mollie.localhost/v2/webhooks?from=hook_fTqARmWsfs9oXvKbZEPzH&limit=2", "type": "application/hal+json" } } } } } } } }, "400": { "description": "The request contains issues. For example, if the specified `from` value is not a valid ID.", "content": { "application/hal+json": { "schema": { "type": "object", "description": "An error response object.", "required": [ "status", "title", "detail", "_links" ], "properties": { "status": { "type": "integer", "description": "The status code of the error message. This is always the same code as the status code of the HTTP message itself.", "minimum": 400, "maximum": 599, "example": 404 }, "title": { "type": "string", "description": "The HTTP reason phrase of the error. For example, for a `404` error, the `title` will be `Not Found`.", "example": "Not Found" }, "detail": { "type": "string", "description": "A detailed human-readable description of the error that occurred.", "example": "The resource does not exist" }, "field": { "type": "string", "description": "If the error was caused by a value provided by you in a specific field, the `field` property will contain the name of the field that caused the issue.", "example": "description" }, "_links": { "type": "object", "required": [ "documentation" ], "properties": { "documentation": { "type": "object", "description": "The URL to the generic Mollie API error handling guide.", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "example": "https://docs.mollie.com/errors" }, "type": { "type": "string", "example": "text/html" } } } } } } }, "example": { "status": 400, "title": "Bad Request", "detail": "Invalid cursor value", "field": "from", "_links": { "documentation": { "href": "...", "type": "text/html" } } } } } } }, "x-speakeasy-pagination": { "type": "url", "outputs": { "nextUrl": "$._links.next.href" } }, "x-readme": { "code-samples": [ { "language": "shell", "code": "curl -X GET https://api.mollie.com/v2/webhooks/hook_B2EyhTH5N4KWUnoYPcgiH \\\n -H \"Authorization: Bearer access_UsJwq8nzcHbSrDuh82pyjjEaTbd5SAPtVebEJ5BH\"" }, { "language": "php", "code": "setAccessToken('access_UsJwq8nzcHbSrDuh82pyjjEaTbd5SAPtVebEJ5BH');\n\n$webhook = $mollie->send(\n new GetWebhookRequest(id: 'hook_B2EyhTH5N4KWUnoYPcgiH')\n);", "install": "composer require mollie/mollie-api-php" }, { "language": "node", "code": "/*\nWe don't have a Node.js code example for this\nAPI call yet.\n\nIf you have some time to spare, feel free to\nshare suggestions on our Discord:\nhttps://discord.gg/VaTVkXB4aQ\n*/", "install": "npm install @mollie/api-client" }, { "language": "python", "code": "'''\nWe don't have a Python code example for this\nAPI call yet.\n\nIf you have some time to spare, feel free to\nshare suggestions on our Discord:\nhttps://discord.gg/VaTVkXB4aQ\n'''", "install": "pip install mollie-api-python" }, { "language": "ruby", "code": "# We don't have a Ruby code example for this\n# API call yet.\n#\n# If you have some time to spare, feel free to\n# share suggestions on our Discord:\n# https://discord.gg/VaTVkXB4aQ", "install": "gem install mollie-api-ruby" } ] } } } }, "components": { "securitySchemes": { "apiKey": { "type": "http", "scheme": "bearer", "x-default": "live_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" }, "organizationAccessToken": { "type": "http", "scheme": "bearer", "x-default": "access_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" }, "oAuth": { "type": "oauth2", "flows": { "authorizationCode": { "authorizationUrl": "https://my.mollie.com/oauth2/authorize", "tokenUrl": "https://api.mollie.com/oauth2/tokens", "scopes": {} } } } } }, "x-readme": { "explorer-enabled": false, "samples-languages": [ "shell", "php", "node", "python", "ruby" ] } } ```