# Implementing the Endpoint (/docs/webhooks/getting-started/consuming-the-webhook-notifications)

A minimal webhook handler in Node and Python that reads the raw body and answers with a 2xx.

First you will need to create an endpoint to receive the webhook. Keep the body
as a string until you have verified the signature, because the signature is
computed over the exact bytes Spoke sends:

```js tab="Node"
// Using express

const express = require('express')

const app = express()

app.post(
  '/spoke-webhook',
  express.text({ type: '*/*' }),
  (request, response) => {
    // Verify the signature first. See "Securing the Endpoint".
    const event = JSON.parse(request.body)

    console.log(event.type, event.data.id)

    response.sendStatus(200)
  },
)
```

```python tab="Python"
# Using FastAPI

import json

from fastapi import FastAPI, Request, Response

app = FastAPI()

@app.post("/spoke-webhook")
async def receive_webhook(request: Request):
    # Verify the signature first. See "Securing the Endpoint".
    event = json.loads(await request.body())

    print(event["type"], event["data"]["id"])

    return Response(status_code=200)
```

Answer quickly and do the heavy work afterwards. See
[Delivery attempts](/docs/webhooks/getting-started/best-practices#delivery-attempts).

Next, [secure the endpoint](/docs/webhooks/getting-started/securing-the-endpoint)
by verifying the signature before you act on the body.