---
title: REST Client & Webhooks in NextViper
description: Interacting with Nuratix contacts, webhooks, and domains using NextViper.
---
> For the complete documentation index, see [llms-docs.txt](/llms-docs.txt) or the site index [llms.txt](/llms.txt). Full docs corpus: [llms-full-docs.txt](/llms-full-docs.txt). Prefer markdown URLs (append `.md`) for agent consumption. Product skill: [skill.md](/skill.md).


# NextViper REST Client & Webhooks

NextViper allows you to build full microservices, background email jobs, and webhook receivers.

## Managing Contacts

```nextviper
import std.http

let headers = {
    "Authorization": "Bearer nr_your_api_key_here",
    "Content-Type": "application/json"
}

// Add a subscriber to Nuratix audience
let contact = {
    "email": "alex@example.com",
    "first_name": "Alex",
    "last_name": "Mercer",
    "unsubscribed": false
}

let res = http.post("https://nuratix.com/api/contacts/v1", contact, headers)
print("Contact created: " + res.body)
```

## Receiving Nuratix Inbound Webhooks

NextViper features a built-in fast HTTP web server:

```nextviper
import std.http

let app = http.server()

app.post("/webhook", fn(req, res) {
    print("Received Nuratix webhook event: " + req.body)
    return res.json({"received": true}, 200)
})

print("Starting NextViper webhook receiver on port 8080...")
app.listen(8080)
```
