# Delete a webhook Delete a single webhook object by its webhook ID. > 🔑 Access with > > [Organization access token with **webhooks.write**](/reference/authentication) > > [OAuth access with **webhooks.write**](/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/{webhookId}": { "parameters": [ { "name": "webhookId", "description": "Provide the ID of the related webhook.", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^hook_.+$", "example": "hook_1234567890" } } ], "delete": { "summary": "Delete a webhook", "x-speakeasy-name-override": "delete", "tags": [ "Webhooks API" ], "operationId": "delete-webhook", "security": [ { "organizationAccessToken": [ "webhooks.write" ] }, { "oAuth": [ "webhooks.write" ] } ], "description": "Delete a single webhook object by its webhook ID.\n\n> 🔑 Access with\n>\n> [Organization access token with **webhooks.write**](/reference/authentication)\n>\n> [OAuth access with **webhooks.write**](/reference/authentication)", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "testmode": { "type": "boolean", "description": "You can enable test mode by setting `testmode` to `true`.\n\nTest entities cannot be retrieved when the endpoint is set to live mode, and vice versa.", "writeOnly": true, "example": false } } } } } }, "responses": { "204": { "description": "No content.", "content": { "application/hal+json": { "schema": {}, "example": {} } } }, "404": { "description": "No entity with this ID exists.", "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": 404, "title": "Not Found", "detail": "No entity exists with token 'uct_abcDEFghij123456789'", "_links": { "documentation": { "href": "...", "type": "text/html" } } } } } }, "422": { "description": "The request contains issues. For example, if the webhook has already been deleted.", "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": 422, "title": "Unprocessable entity", "detail": "This subscription was already deleted.", "_links": { "documentation": { "href": "...", "type": "text/html" } } } } } } }, "x-readme": { "code-samples": [ { "language": "shell", "code": "curl -X DELETE https://api.mollie.com/v2/webhooks/hook_B2EyhTH5N4KWUnoYPcgiH \\\n -H \"Authorization: Bearer access_UsJwq8nzcHbSrDuh82pyjjEaTbd5SAPtVebEJ5BH\"" }, { "language": "php", "code": "setAccessToken('access_UsJwq8nzcHbSrDuh82pyjjEaTbd5SAPtVebEJ5BH');\n\n$mollie->send(\n new DeleteWebhookRequest(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" ] } } ```